Files
kotlin-fork/libraries/reflect/api/build.gradle
T
Alexander Udalov 1f4dfbf5f3 Fix compilation of Java 9 sources for kotlin-reflect-api
Do not pass the jars for modules such as descriptors, descriptors.jvm,
etc to `--module-path` because javac assumes that these are separate
modules (even though they're listed later as parts of this module in
`--patch-module), and prohibits to have split packages and foreign
service implementations among them
2018-07-13 18:45:09 +02:00

55 lines
1.2 KiB
Groovy

description = ''
apply plugin: 'kotlin'
configureJvm6Project(project)
sourceSets {
main {
java {
srcDir "${rootDir}/core/reflection.jvm/src"
}
}
java9
}
dependencies {
compile project(path: ':kotlin-stdlib', configuration: 'distJar')
compileOnly project(':core:descriptors')
compileOnly project(':core:descriptors.jvm')
compileOnly project(':core:deserialization')
compileOnly project(':core:descriptors.runtime')
compileOnly project(':core:util.runtime')
}
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",
"-module-name", "kotlin-reflection"]
}
}
jar {
manifestAttributes(manifest, project, "internal")
}
task java9Jar(type: Jar) {
classifier = "java9"
// TODO: enable as soon as this doesn't cause D8/DX to crash
// from sourceSets.java9.output
}
artifacts {
archives java9Jar
runtime java9Jar
}