75ad20f823
Required as a workaround for Proguard bug https://sourceforge.net/p/proguard/bugs/664/ When processing bytecode generated by Kotlin compiler for constructor call with stack spilling during arguments evaluation, ProGuard performs an equivalent transformation for the bytecode, but emits invalid stack frame information. In JVM 1.6, such invalid stack frames are ignored and re-evaluated by JVM during bytecode verification. In JVM 1.8, such invalid stack frames cause VerifyError.
55 lines
1.2 KiB
Groovy
55 lines
1.2 KiB
Groovy
description 'Kotlin Runtime (deprecated, use kotlin-stdlib artifact instead)'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
configureJvm6Project(project)
|
|
configurePublishing(project)
|
|
|
|
dependencies {
|
|
compile group: 'org.jetbrains', name: 'annotations', version:'13.0'
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
if(!System.properties.'idea.active') {
|
|
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, 'Main')
|
|
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",
|
|
"-Xnormalize-constructor-calls=enable",
|
|
"-Xdump-declarations-to", "${buildDir}/runtime-declarations.json",
|
|
"-cp", "${rootDir}/dist/builtins",
|
|
"-module-name", project.name
|
|
]
|
|
}
|
|
}
|