Skip to content

Commit e0191ed

Browse files
committed
Add Kotlin to tests
1 parent 585c304 commit e0191ed

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ build/
2929
**/.idea/libraries
3030
**/.idea/dictionaries
3131
**/.idea/runConfigurations.xml
32+
**/.idea/caches
3233

3334
# layout inspector view captures
3435
captures

.idea/caches/build_file_checksums.ser

0 Bytes
Binary file not shown.

build.gradle

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1+
buildscript {
2+
ext.kotlinVersion = '1.2.31'
3+
repositories {
4+
google()
5+
jcenter()
6+
}
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:3.1.0'
9+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
10+
}
11+
}
12+
13+
allprojects {
14+
repositories {
15+
google()
16+
jcenter()
17+
}
18+
}
19+
220
subprojects { project ->
321
group = GROUP
422
version = VERSION_NAME
@@ -20,38 +38,25 @@ subprojects { project ->
2038
check.dependsOn('checkstyle')
2139
}
2240
}
41+
}
2342

24-
buildscript {
25-
repositories {
26-
google()
27-
jcenter()
28-
}
29-
dependencies {
30-
classpath 'com.android.tools.build:gradle:3.1.0'
31-
}
32-
}
33-
34-
repositories {
35-
google()
36-
jcenter()
37-
}
43+
task clean(type: Delete) {
44+
delete rootProject.buildDir
3845
}
3946

4047
ext {
4148
minSdkVersion = 8
4249
targetSdkVersion = 27
4350
compileSdkVersion = 27
4451
buildToolsVersion = '27.0.3'
45-
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
46-
targetCompatibilityVersion = JavaVersion.VERSION_1_7
4752
}
4853

4954
ext.deps = [
50-
// Test dependencies
5155
junit : 'junit:junit:4.12',
5256
truth : 'com.google.truth:truth:0.28',
5357
robolectric : 'org.robolectric:robolectric:3.3',
5458
mockito : "org.mockito:mockito-core:1.10.19",
5559
json : "org.json:json:20160810",
56-
supportAnnotations: "com.android.support:support-annotations:27.1.0"
57-
]
60+
supportAnnotations: "com.android.support:support-annotations:27.1.0",
61+
kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
62+
]

logger/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'kotlin-android'
23

34
android {
45
compileSdkVersion rootProject.ext.compileSdkVersion
@@ -26,6 +27,7 @@ dependencies {
2627
testImplementation deps.robolectric
2728
testImplementation deps.mockito
2829
testImplementation deps.json
30+
testImplementation deps.kotlin
2931
}
3032

3133
apply from: rootProject.file('gradle/maven_push.gradle')

0 commit comments

Comments
 (0)