Add ir configuration to buildscript

This commit is contained in:
Him188 2020-12-22 20:56:19 +08:00
parent 93aeda2aeb
commit ca04c180f0

View File

@ -74,9 +74,9 @@ allprojects {
repositories {
mavenLocal()
// maven(url = "https://mirrors.huaweicloud.com/repository/maven")
jcenter()
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
maven(url = "https://kotlin.bintray.com/kotlinx")
jcenter()
google()
mavenCentral()
}
@ -88,6 +88,7 @@ allprojects {
configureKotlinTestSettings()
configureKotlinCompilerSettings()
configureKotlinExperimentalUsages()
// useIr()
if (isKotlinJvmProject) {
configureFlattenSourceSets()
@ -97,6 +98,12 @@ allprojects {
}
}
fun Project.useIr() {
kotlinCompilations?.forEach { kotlinCompilation ->
kotlinCompilation.kotlinOptions.freeCompilerArgs += "-Xuse-ir"
}
}
fun Project.configureDokka() {
apply(plugin = "org.jetbrains.dokka")
tasks {