Files
kotlin-fork/libraries/reflect/api/build.gradle
T
Ilya Gorbunov 1727fcf1a8 Make some build properties extensions in buildSrc
They are used only in main build's .gradle.kts files, so it is more
flexible to define them as extensions - no need to republish
kotlin-build-gradle-plugin when another such property is to be added.
2020-04-02 05:21:10 +03:00

67 lines
1.5 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",
"-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
}