File tree 6 files changed +94
-78
lines changed
6 files changed +94
-78
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2
+ * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
import org.jetbrains.kotlin.konan.target.HostManager
5
5
import org.gradle.util.VersionNumber
@@ -183,7 +183,7 @@ allprojects {
183
183
configure(subprojects. findAll { ! sourceless. contains(it. name) && it. name != coreModule }) {
184
184
evaluationDependsOn(" :$coreModule " )
185
185
def platform = PlatformKt . platformOf(it)
186
- apply from : rootProject . file( " gradle/compile -${ platform} .gradle " )
186
+ apply plugin : " kotlin -${ platform} -conventions "
187
187
dependencies {
188
188
// See comment below for rationale, it will be replaced with "project" dependency
189
189
compile project(" :$coreModule " )
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
+ */
4
+
5
+ // Platform-specific configuration to compile JS modules
6
+
7
+ import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
8
+
9
+ plugins {
10
+ kotlin(" js" )
11
+ }
12
+
13
+ dependencies {
14
+ testImplementation(kotlin(" test-js" ))
15
+ }
16
+
17
+ kotlin {
18
+ js(LEGACY ) {
19
+ moduleName = project.name.removeSuffix(" -js" )
20
+ }
21
+
22
+ sourceSets {
23
+ main {
24
+ kotlin.srcDirs(" src" )
25
+ resources.srcDirs(" resources" )
26
+ }
27
+ test {
28
+ kotlin.srcDirs(" test" )
29
+ resources.srcDirs(" test-resources" )
30
+ }
31
+ }
32
+ }
33
+
34
+ tasks.withType<KotlinJsCompile > {
35
+ kotlinOptions {
36
+ moduleKind = " umd"
37
+ sourceMap = true
38
+ metaInfo = true
39
+ }
40
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
+ */
4
+
5
+ // Platform-specific configuration to compile JVM modules
6
+
7
+ import org.gradle.api.*
8
+
9
+ plugins {
10
+ kotlin(" jvm" )
11
+ }
12
+
13
+ java {
14
+ sourceCompatibility = JavaVersion .VERSION_1_6
15
+ targetCompatibility = JavaVersion .VERSION_1_6
16
+ }
17
+
18
+ if (rootProject.extra.get(" jvm_ir_enabled" ) as Boolean ) {
19
+ kotlin.target.compilations.configureEach {
20
+ kotlinOptions.useIR = true
21
+ }
22
+ }
23
+
24
+ dependencies {
25
+ testCompile(kotlin(" test" ))
26
+ // Workaround to make addSuppressed work in tests
27
+ testCompile(kotlin(" reflect" ))
28
+ testCompile(kotlin(" stdlib-jdk7" ))
29
+ testCompile(kotlin(" test-junit" ))
30
+ testCompile(" junit:junit:${version(" junit" )} " )
31
+ }
32
+
33
+ tasks.compileKotlin {
34
+ kotlinOptions {
35
+ freeCompilerArgs + = listOf (" -Xexplicit-api=strict" )
36
+ }
37
+ }
38
+
39
+ tasks.withType<Test > {
40
+ testLogging {
41
+ showStandardStreams = true
42
+ events(" passed" , " failed" )
43
+ }
44
+ val stressTest = project.properties[" stressTest" ]
45
+ if (stressTest != null ) systemProperties[" stressTest" ] = stressTest
46
+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
2
-
3
1
/*
4
- * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2
+ * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
5
3
*/
6
4
7
- apply from : rootProject. file(" gradle/compile-jvm.gradle" )
5
+ import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
6
+
7
+ plugins {
8
+ id(" kotlin-jvm-conventions" )
9
+ }
8
10
9
11
repositories {
10
12
mavenLocal()
You can’t perform that action at this time.
0 commit comments