File tree 4 files changed +12
-15
lines changed
4 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,6 @@ plugins {
13
13
id(" com.github.johnrengelman.shadow" )
14
14
}
15
15
16
- val compileKotlin: KotlinCompile by tasks
17
- compileKotlin.kotlinOptions {
18
- languageVersion = " 1.4"
19
- }
20
-
21
16
class TaskOptions : AllOptions {
22
17
override val versionFileName = " VERSION"
23
18
override val rootPath: Path = rootDir.toPath()
@@ -148,6 +143,16 @@ class TaskOptions: AllOptions {
148
143
}
149
144
150
145
allprojects {
146
+ val kotlinLanguageLevel: String by rootProject
147
+ val jvmTarget: String by rootProject
148
+
149
+ tasks.withType(KotlinCompile ::class .java).all {
150
+ kotlinOptions {
151
+ languageVersion = kotlinLanguageLevel
152
+ this .jvmTarget = jvmTarget
153
+ }
154
+ }
155
+
151
156
repositories {
152
157
jcenter()
153
158
mavenLocal()
Original file line number Diff line number Diff line change @@ -7,8 +7,3 @@ plugins {
7
7
repositories {
8
8
jcenter()
9
9
}
10
-
11
- val compileKotlin: KotlinCompile by tasks
12
- compileKotlin.kotlinOptions {
13
- languageVersion = " 1.4"
14
- }
Original file line number Diff line number Diff line change 1
1
# kotlinVersion=1.4-SNAPSHOT
2
2
kotlinVersion =1.4.0-dev-7446
3
+ kotlinLanguageLevel =1.4
4
+ jvmTarget =1.8
3
5
4
6
shadowJarVersion =5.2.0
5
7
baseVersion =0.7.41
Original file line number Diff line number Diff line change @@ -9,8 +9,3 @@ dependencies {
9
9
testImplementation(" junit:junit:4.12" )
10
10
testImplementation(kotlinDep(" kotlin-test" ))
11
11
}
12
-
13
- val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
14
- compileKotlin.kotlinOptions {
15
- languageVersion = " 1.4"
16
- }
You can’t perform that action at this time.
0 commit comments