72c52d37ae
"-Xno-kotlin-nothing-value-exception" is needed to temporarily prevent the problem happening in the composite build with Kotlin/Native (ClassNotFoundException from KClassImpl.Data). "-Xno-optimized-callable-references" is added just in case of any similar problem.
69 lines
1.6 KiB
Groovy
69 lines
1.6 KiB
Groovy
description = ''
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
configureJvm6Project(project)
|
|
|
|
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir "${rootDir}/core/reflection.jvm/src"
|
|
}
|
|
resources {
|
|
srcDir("${rootDir}/core/reflection.jvm/resources")
|
|
}
|
|
}
|
|
|
|
if (includeJava9) {
|
|
java9
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile kotlinStdlib()
|
|
compileOnly project(':core:descriptors')
|
|
compileOnly project(':core:descriptors.jvm')
|
|
compileOnly project(':core:deserialization')
|
|
compileOnly project(':core:descriptors.runtime')
|
|
compileOnly project(':core:util.runtime')
|
|
compileOnly "org.jetbrains:annotations:13.0"
|
|
}
|
|
|
|
if (includeJava9) {
|
|
compileJava9Sources(
|
|
project, 'kotlin.reflect',
|
|
[sourceSets.main.output, configurations.compileOnly.filter {
|
|
!it.name.contains("kotlin-stdlib")
|
|
}]
|
|
)
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions {
|
|
freeCompilerArgs = ["-version",
|
|
"-Xallow-kotlin-package",
|
|
"-Xnormalize-constructor-calls=enable",
|
|
"-Xno-optimized-callable-references",
|
|
"-Xno-kotlin-nothing-value-exception",
|
|
"-module-name", "kotlin-reflection"]
|
|
}
|
|
}
|
|
|
|
jar {
|
|
manifestAttributes(manifest, project, "internal")
|
|
}
|
|
|
|
task java9Jar(type: Jar) {
|
|
classifier = "java9"
|
|
if (includeJava9) {
|
|
from sourceSets.java9.output
|
|
}
|
|
}
|
|
|
|
artifacts {
|
|
archives java9Jar
|
|
runtime java9Jar
|
|
}
|