File tree Expand file tree Collapse file tree 5 files changed +53
-5
lines changed Expand file tree Collapse file tree 5 files changed +53
-5
lines changed Original file line number Diff line number Diff line change 1
1
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
2
3
3
buildscript {
4
- ext. kotlin_version = ' 1.2.30 '
4
+ ext. kotlin_version = ' 1.3.0 '
5
5
6
6
7
7
Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ android {
28
28
29
29
dependencies {
30
30
implementation fileTree(dir : ' libs' , include : [' *.jar' ])
31
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version "
32
31
implementation ' com.android.support:appcompat-v7:28.0.0'
33
32
implementation ' com.android.support.constraint:constraint-layout:1.1.3'
34
33
testImplementation ' junit:junit:4.12'
35
34
androidTestImplementation ' com.android.support.test:runner:1.0.2'
36
35
androidTestImplementation ' com.android.support.test.espresso:espresso-core:3.0.2'
36
+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version "
37
37
}
Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.android.application'
2
2
3
3
apply plugin : ' kotlin-android'
4
-
5
4
apply plugin : ' kotlin-android-extensions'
6
5
7
6
android {
@@ -28,11 +27,11 @@ android {
28
27
29
28
dependencies {
30
29
implementation fileTree(include : [' *.jar' ], dir : ' libs' )
31
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version "
32
30
implementation ' com.android.support:appcompat-v7:28.0.0'
33
31
implementation ' com.android.support.constraint:constraint-layout:1.1.3'
34
32
testImplementation ' junit:junit:4.12'
35
33
androidTestImplementation ' com.android.support.test:runner:1.0.2'
36
34
androidTestImplementation ' com.android.support.test.espresso:espresso-core:3.0.2'
35
+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version "
37
36
implementation project(' :javalibrary' )
38
37
}
Original file line number Diff line number Diff line change 1
1
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
2
3
3
buildscript {
4
- ext. kotlin_version = ' 1.2.30 '
4
+ ext. kotlin_version = ' 1.3.0 '
5
5
repositories {
6
6
google()
7
7
jcenter()
Original file line number Diff line number Diff line change 1
1
# Kotlin-learn
2
2
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
+
You can’t perform that action at this time.
0 commit comments