Files
kotlin-fork/libraries/kotlin.test/common/build.gradle
T
Dmitry Savvinov 668bd209f2 Use -Xallow-kotlin-package while compiling common sources
K2MetadataCompiler doesn't perform explicit check of compilation of
'kotlin' package, thus stdlib build wasn't passing '-Xallow-kotlin-package'.

However, we have special hack for compiling stdlib with contracts: if
'-Xallow-kotlin-package' is passed, then allow compiling contracts for
custom functions. We have to do it this way, because we don't want
stdlib artifacts to be marked with pre-release flag, even though
contracts for custom functions are not enabled yet
(see eae9923dbe).

Therefore, it's crucial to pass -Xallow-kotlin-package properly for that
side-effect.
2018-07-09 18:57:58 +03:00

42 lines
784 B
Groovy

description = 'Kotlin Test Common'
apply plugin: 'kotlin-platform-common'
apply plugin: 'pill-configurable'
configureDist(project)
configurePublishing(project)
dependencies {
compile project(':kotlin-stdlib-common')
testCompile project(":kotlin-test:kotlin-test-annotations-common")
}
pill {
importAsLibrary = true
}
jar {
manifestAttributes(manifest, project, 'Test')
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.kotlin
}
classes.dependsOn.remove("compileJava")
artifacts {
archives sourcesJar
archives javadocJar
}
compileKotlinCommon {
kotlinOptions {
freeCompilerArgs = [
"-module-name", project.name,
"-Xallow-kotlin-package"
]
}
}