846b74885c
Setup common options of java and kotlin compiler tasks.
48 lines
1.0 KiB
Groovy
48 lines
1.0 KiB
Groovy
|
|
description 'Kotlin Runtime'
|
|
|
|
dependencies {
|
|
compile group: 'org.jetbrains', name: 'annotations', version:'13.0'
|
|
}
|
|
|
|
sourceSets {
|
|
if(!System.properties.'idea.active')
|
|
main {
|
|
java {
|
|
srcDir "${rootDir}/../core/builtins/src"
|
|
srcDir "${rootDir}/../core/runtime.jvm/src"
|
|
exclude 'org/jetbrains/annotations/**'
|
|
}
|
|
kotlin {
|
|
exclude 'org/jetbrains/annotations/**'
|
|
}
|
|
}
|
|
}
|
|
|
|
jar {
|
|
manifestAttributes(manifest, project, 'Core')
|
|
from("${rootDir}/../dist/builtins")
|
|
}
|
|
|
|
sourcesJar {
|
|
classifier = 'sources'
|
|
from sourceSets.main.kotlin
|
|
from "${rootDir}/../core/builtins/native"
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions {
|
|
freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
"-Xdump-declarations-to", "${buildDir}/runtime-declarations.json",
|
|
"-cp", "${rootDir}/../dist/builtins",
|
|
"-module-name", project.name
|
|
]
|
|
}
|
|
}
|