@@ -8,6 +8,7 @@ buildscript {
8
8
// can be removed with android-gradle plugin is upgraded to 2.2
9
9
// https://twitter.com/JakeWharton/status/760836175586267136
10
10
classpath ' me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
11
+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:${ kotlinVersion} "
11
12
}
12
13
13
14
// Exclude the lombok version that the android plugin depends on.
@@ -16,13 +17,7 @@ buildscript {
16
17
17
18
apply plugin : ' com.android.application'
18
19
apply plugin : ' me.tatarka.retrolambda'
19
-
20
- ext {
21
- okhttpVersion = " 3.0.1"
22
- retrofitVersion = " 2.0.0"
23
- sdkVersion = 24
24
- supportLibVersion = " 24.2.1"
25
- }
20
+ apply plugin : ' kotlin-android'
26
21
27
22
dependencies {
28
23
compile " com.android.support:support-v13:${ supportLibVersion} "
@@ -38,6 +33,9 @@ dependencies {
38
33
compile " com.squareup.okhttp3:okhttp-urlconnection:${ okhttpVersion} "
39
34
compile ' com.mcxiaoke.volley:library:1.0.19'
40
35
36
+ compile " org.jetbrains.kotlin:kotlin-stdlib:${ kotlinVersion} "
37
+ compile " com.nhaarman:mockito-kotlin:${ mockitoKotlinVersion} "
38
+
41
39
// ----------------------------------
42
40
// Rx dependencies
43
41
@@ -63,7 +61,7 @@ dependencies {
63
61
64
62
android {
65
63
compileSdkVersion sdkVersion
66
- buildToolsVersion ' 25.0.0 '
64
+ buildToolsVersion buildToolsVrs
67
65
68
66
defaultConfig {
69
67
applicationId " com.morihacky.android.rxjava"
@@ -72,12 +70,18 @@ android {
72
70
versionCode 2
73
71
versionName " 1.2"
74
72
}
73
+
75
74
buildTypes {
76
75
release {
77
76
minifyEnabled true
78
77
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
79
78
}
80
79
}
80
+
81
+ sourceSets {
82
+ main. java. srcDirs + = ' src/main/kotlin'
83
+ }
84
+
81
85
compileOptions {
82
86
sourceCompatibility JavaVersion . VERSION_1_8
83
87
targetCompatibility JavaVersion . VERSION_1_8
0 commit comments