Compiler options to remove nn-assertions

This commit is contained in:
Andrew Golovashevich 2024-04-20 17:40:46 +03:00
parent 748d2db175
commit d555c2d756

View File

@ -1,10 +1,12 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
plugins { plugins {
kotlin("multiplatform") version "1.9.0" kotlin("multiplatform") version "1.9.0"
`maven-publish` `maven-publish`
} }
group = "ru.landgrafhomyak.utility" group = "ru.landgrafhomyak.utility"
version = "1.2" version = "1.0"
repositories { repositories {
mavenCentral() mavenCentral()
@ -15,6 +17,7 @@ repositories {
kotlin { kotlin {
jvm { jvm {
jvmToolchain(8) jvmToolchain(8)
withJava()
} }
js { js {
browser() browser()
@ -50,5 +53,38 @@ kotlin {
implementation(kotlin("test")) implementation(kotlin("test"))
} }
} }
/*
val jvmMain by getting {
dependsOn(commonMain)
}
val jvmTest by getting {
dependsOn(commonTest)
}
val _commonImplMain by creating {
dependsOn(commonMain)
}
val _commonImplTest by creating {
dependsOn(commonTest)
}
this
.filter { ss -> ss.name.endsWith("Main") }
.filter { ss -> ss.name !in arrayOf("commonMain", "jvmMain", "_commonImplMain") }
.forEach { ss -> ss.dependsOn(_commonImplMain) }
this
.filter { ss -> ss.name.endsWith("Test") }
.filter { ss -> ss.name !in arrayOf("commonTest", "jvmTest", "_commonImplTest") }
.forEach { ss -> ss.dependsOn(_commonImplTest) }
*/
} }
}
tasks.withType<KotlinCompilationTask<*>>().all {
compilerOptions.freeCompilerArgs.addAll(
"-Xno-call-assertions",
"-Xno-param-assertions",
"-Xno-receiver-assertions"
)
} }