Skip to content

Commit b53dbcf

Browse files
update
1 parent b63ab20 commit b53dbcf

File tree

5 files changed

+53
-5
lines changed

5 files changed

+53
-5
lines changed

JavaAndKotlinDemo/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.2.30'
4+
ext.kotlin_version = '1.3.0'
55

66

77

JavaAndKotlinDemo/kotlinmodule/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ android {
2828

2929
dependencies {
3030
implementation fileTree(dir: 'libs', include: ['*.jar'])
31-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
3231
implementation 'com.android.support:appcompat-v7:28.0.0'
3332
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
3433
testImplementation 'junit:junit:4.12'
3534
androidTestImplementation 'com.android.support.test:runner:1.0.2'
3635
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
36+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
3737
}

KotlinAndJavaDemo/app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apply plugin: 'com.android.application'
22

33
apply plugin: 'kotlin-android'
4-
54
apply plugin: 'kotlin-android-extensions'
65

76
android {
@@ -28,11 +27,11 @@ android {
2827

2928
dependencies {
3029
implementation fileTree(include: ['*.jar'], dir: 'libs')
31-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
3230
implementation 'com.android.support:appcompat-v7:28.0.0'
3331
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
3432
testImplementation 'junit:junit:4.12'
3533
androidTestImplementation 'com.android.support.test:runner:1.0.2'
3634
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
35+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
3736
implementation project(':javalibrary')
3837
}

KotlinAndJavaDemo/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.2.30'
4+
ext.kotlin_version = '1.3.0'
55
repositories {
66
google()
77
jcenter()

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,51 @@
11
# Kotlin-learn
22
kotlin和java混合使用总结
3+
4+
----
5+
6+
## 一、Kotlin项目里面集成Java的module
7+
8+
这一部分源码请看:[https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/KotlinAndJavaDemo](https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/KotlinAndJavaDemo)
9+
10+
----
11+
12+
项目结构图:
13+
14+
15+
16+
![](https://github.com/AweiLoveAndroid/Kotlin-learn/blob/master/pics/KotlinAndJavaDemo%E6%96%87%E4%BB%B6%E7%BB%93%E6%9E%84%E5%9B%BE.png?raw=true)
17+
18+
19+
20+
#### 1.创建java的module
21+
22+
请看源码:[https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/KotlinAndJavaDemo/javamodule](https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/KotlinAndJavaDemo/javamodule)
23+
24+
#### 2.创建java的lib
25+
26+
请看源码:[https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/KotlinAndJavaDemo/javalibrary](https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/KotlinAndJavaDemo/javalibrary)
27+
28+
----
29+
30+
31+
32+
## 二、Java项目里面集成Kotlin的module
33+
34+
这一部分源码请看:[https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/JavaAndKotlinDemo](https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/JavaAndKotlinDemo)
35+
36+
项目结构图:
37+
38+
39+
40+
![](https://github.com/AweiLoveAndroid/Kotlin-learn/blob/master/pics/JavaAndKotlinDemo%E6%96%87%E4%BB%B6%E7%BB%93%E6%9E%84%E5%9B%BE.png?raw=true)
41+
42+
43+
44+
#### 1.创建kotlin的module
45+
46+
请看源码:[https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/JavaAndKotlinDemo/kotlinmodule](https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/JavaAndKotlinDemo/kotlinmodule)
47+
48+
#### 2.创建kotlin的lib
49+
50+
请看源码:[https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/JavaAndKotlinDemo/kotlinlibrary](https://github.com/AweiLoveAndroid/Kotlin-learn/tree/master/JavaAndKotlinDemo/kotlinlibrary)
51+

0 commit comments

Comments
 (0)