-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle
More file actions
executable file
·59 lines (49 loc) · 1.36 KB
/
build.gradle
File metadata and controls
executable file
·59 lines (49 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
group "moshikotlinexample"
version "1.0-SNAPSHOT"
buildscript {
ext {
junitVersion = "4.12"
kluentVersion = "1.30"
kotlinVersion = "1.2.50"
moshiVersion = "1.6.0"
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
apply plugin: "kotlin"
apply plugin: "kotlin-kapt"
apply plugin: 'idea'
repositories {
jcenter()
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
// moshi
implementation "com.squareup.moshi:moshi:$moshiVersion"
implementation "com.squareup.moshi:moshi-adapters:$moshiVersion"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion"
testImplementation "junit:junit:$junitVersion"
testImplementation "org.amshove.kluent:kluent:$kluentVersion"
}
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
// At the moment for non-Android projects you need to explicitly
// mark the code generated by kapt as 'generated source code'
// for correct highlighting and resolve in IDE.
idea {
module {
sourceDirs += file('build/generated/source/kapt/main')
generatedSourceDirs += file('build/generated/source/kapt/main')
}
}