Build: support local.properties for JPS build. Apply JPS related tweaks only inside IDEA import.
This commit is contained in:
@@ -11,10 +11,10 @@ pill {
|
||||
importAsLibrary = true
|
||||
}
|
||||
|
||||
def jpsBuild = findProperty("jpsBuild")?.toString() == "true"
|
||||
def includeJava9 = BuildPropertiesKt.getKotlinBuildProperties(project).includeJava9
|
||||
|
||||
sourceSets {
|
||||
if (!jpsBuild) {
|
||||
if (includeJava9) {
|
||||
java9
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ task modularJar(type: Jar) {
|
||||
classifier = 'modular'
|
||||
|
||||
from zipTree(jar.outputs.files.singleFile)
|
||||
if (!jpsBuild) {
|
||||
if (includeJava9) {
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,6 @@ compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
}
|
||||
|
||||
if (!jpsBuild) {
|
||||
if (includeJava9) {
|
||||
compileJava9Sources(project, 'kotlin.test')
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ apply plugin: 'kotlin'
|
||||
|
||||
configureJvm6Project(project)
|
||||
|
||||
def jpsBuild = findProperty("jpsBuild")?.toString() == "true"
|
||||
def includeJava9 = BuildPropertiesKt.getKotlinBuildProperties(project).includeJava9
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@@ -13,7 +13,7 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
|
||||
if (!jpsBuild) {
|
||||
if (includeJava9) {
|
||||
java9
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ dependencies {
|
||||
compileOnly "org.jetbrains:annotations:13.0"
|
||||
}
|
||||
|
||||
if (!jpsBuild) {
|
||||
if (includeJava9) {
|
||||
compileJava9Sources(
|
||||
project, 'kotlin.reflect',
|
||||
[sourceSets.main.output, configurations.compileOnly.filter {
|
||||
@@ -52,7 +52,7 @@ jar {
|
||||
|
||||
task java9Jar(type: Jar) {
|
||||
classifier = "java9"
|
||||
if (!jpsBuild) {
|
||||
if (includeJava9) {
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ sourceSets {
|
||||
test {
|
||||
kotlin {
|
||||
srcDir 'test'
|
||||
if(!System.properties.'idea.active') {
|
||||
if(!BuildPropertiesKt.getKotlinBuildProperties(project).inIdeaSync) {
|
||||
srcDir '../jvm/test'
|
||||
srcDir '../common/test'
|
||||
srcDir '../test'
|
||||
|
||||
@@ -28,7 +28,7 @@ sourceSets {
|
||||
test {
|
||||
kotlin {
|
||||
srcDir 'test'
|
||||
if(!System.properties.'idea.active') {
|
||||
if(!BuildPropertiesKt.getKotlinBuildProperties(project).inIdeaSync) {
|
||||
srcDir '../jvm/test'
|
||||
srcDir '../common/test'
|
||||
srcDir '../test'
|
||||
|
||||
@@ -51,7 +51,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
experimental {
|
||||
if(!System.properties.'idea.active')
|
||||
if(!BuildPropertiesKt.getKotlinBuildProperties(project).inIdeaSync)
|
||||
kotlin {
|
||||
srcDir experimentalSrcDir
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ sourceSets {
|
||||
}
|
||||
coroutinesExperimentalMigrationTest {
|
||||
kotlin {
|
||||
if(!System.properties.'idea.active') {
|
||||
if(!BuildPropertiesKt.getKotlinBuildProperties(project).inIdeaSync) {
|
||||
srcDir '../coroutines-experimental/jvm/test'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user