-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
47 lines (40 loc) · 1.06 KB
/
Copy pathbuild.gradle
File metadata and controls
47 lines (40 loc) · 1.06 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
// Build script for project.
buildscript {
// Use the newest version of Kotlin available.
ext.kotlin_version = '1.1.4-3'
// Read from Maven's central repository.
repositories {
mavenCentral()
}
// Use the Gradle for Kotlin plugin for simplified access.
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
// The buildscript classpath dependency allows us to specify Kotlin.
apply plugin: 'kotlin'
// Dependencies used in our project: JRE 8 and JUnit are by default.
dependencies {
testCompile 'junit:junit:4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
}
// Non-standard project structure: Specify source and test directories.
sourceSets {
main.kotlin.srcDirs += 'src'
test.kotlin.srcDirs += 'test'
}
// Again, read from Maven's central repository.
repositories {
mavenCentral()
}
// These two options allow us to compile Kotlin code to JVM 8 bytecode.
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}