JPS build flag: exclude java9 when jps build enabled

This commit is contained in:
Sergey Rostov
2019-01-16 16:01:21 +03:00
parent 1031edc933
commit 12cfd6396d
7 changed files with 33 additions and 11 deletions
+1
View File
@@ -10,3 +10,4 @@ kotlin.compiler.newInferenceEnabled=true
#signingRequired=true #signingRequired=true
#useBootstrapStdlib=true #useBootstrapStdlib=true
#jpsBuild=true
+1
View File
@@ -13,3 +13,4 @@ intellijUltimateEnabled=false
intellijEnforceCommunitySdk=true intellijEnforceCommunitySdk=true
#useBootstrapStdlib=true #useBootstrapStdlib=true
#jpsBuild=true
+1
View File
@@ -13,3 +13,4 @@ intellijUltimateEnabled=false
intellijEnforceCommunitySdk=true intellijEnforceCommunitySdk=true
#useBootstrapStdlib=true #useBootstrapStdlib=true
#jpsBuild=true
+1
View File
@@ -13,3 +13,4 @@ intellijUltimateEnabled=false
intellijEnforceCommunitySdk=true intellijEnforceCommunitySdk=true
#useBootstrapStdlib=true #useBootstrapStdlib=true
#jpsBuild=true
+1
View File
@@ -12,3 +12,4 @@ kotlin.compiler.newInferenceEnabled=true
cidrPluginsEnabled=true cidrPluginsEnabled=true
#useBootstrapStdlib=true #useBootstrapStdlib=true
#jpsBuild=true
+11 -3
View File
@@ -11,8 +11,12 @@ pill {
importAsLibrary = true importAsLibrary = true
} }
def jpsBuild = findProperty("jpsBuild")?.toString() == "true"
sourceSets { sourceSets {
java9 if (!jpsBuild) {
java9
}
} }
dependencies { dependencies {
@@ -36,7 +40,9 @@ task modularJar(type: Jar) {
classifier = 'modular' classifier = 'modular'
from zipTree(jar.outputs.files.singleFile) from zipTree(jar.outputs.files.singleFile)
from sourceSets.java9.output if (!jpsBuild) {
from sourceSets.java9.output
}
} }
artifacts { artifacts {
@@ -59,4 +65,6 @@ compileTestKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"] kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
} }
compileJava9Sources(project, 'kotlin.test') if (!jpsBuild) {
compileJava9Sources(project, 'kotlin.test')
}
+17 -8
View File
@@ -4,13 +4,18 @@ apply plugin: 'kotlin'
configureJvm6Project(project) configureJvm6Project(project)
def jpsBuild = findProperty("jpsBuild")?.toString() == "true"
sourceSets { sourceSets {
main { main {
java { java {
srcDir "${rootDir}/core/reflection.jvm/src" srcDir "${rootDir}/core/reflection.jvm/src"
} }
} }
java9
if (!jpsBuild) {
java9
}
} }
dependencies { dependencies {
@@ -23,12 +28,14 @@ dependencies {
compileOnly "org.jetbrains:annotations:13.0" compileOnly "org.jetbrains:annotations:13.0"
} }
compileJava9Sources( if (!jpsBuild) {
project, 'kotlin.reflect', compileJava9Sources(
[sourceSets.main.output, configurations.compileOnly.filter { project, 'kotlin.reflect',
!it.name.contains("kotlin-stdlib") [sourceSets.main.output, configurations.compileOnly.filter {
}] !it.name.contains("kotlin-stdlib")
) }]
)
}
compileKotlin { compileKotlin {
kotlinOptions { kotlinOptions {
@@ -45,7 +52,9 @@ jar {
task java9Jar(type: Jar) { task java9Jar(type: Jar) {
classifier = "java9" classifier = "java9"
from sourceSets.java9.output if (!jpsBuild) {
from sourceSets.java9.output
}
} }
artifacts { artifacts {