-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
62 lines (48 loc) · 1.42 KB
/
build.gradle
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
60
61
62
buildscript {
ext.kotlin_version = '1.2.60'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
subprojects {
apply plugin: "java"
apply plugin: "kotlin"
def javaVersion = project.getProperties().get('javaVersion') ?: JavaVersion.current()
compileKotlin {
kotlinOptions {
jvmTarget = javaVersion
languageVersion = "1.2"
apiVersion = "1.2"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = javaVersion
languageVersion = "1.2"
apiVersion = "1.2"
}
}
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile 'org.hamcrest:java-hamcrest:2.0.0.0'
testCompile(group: 'junit', name: 'junit', version: '4+') {
exclude group: 'org.hamcrest'
}
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
}
apply plugin: 'idea'
tasks.withType(JavaCompile) {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
}
task wrapper(type: Wrapper) {
gradleVersion = (project.getProperties().get('gradleVersion') ?: gradle.gradleVersion) as String
}