Use camelCase for cacheKind control property

Because it is more intuitive for end-users.
This commit is contained in:
Sergey Bogolepov
2021-01-18 13:46:34 +07:00
parent 29f95c7df2
commit 284d42fd2b
4 changed files with 8 additions and 6 deletions
@@ -143,8 +143,9 @@ class NativePlatformLibsIT : BaseGradleIT() {
deleteInstalledCompilers()
fun buildPlatformLibrariesWithoutAndWithCaches(target: KonanTarget) {
with(platformLibrariesProject(target.presetName)) {
val targetName = target.name
val presetName = target.presetName
val targetName = target.name
with(platformLibrariesProject(presetName)) {
// Build libraries without caches.
buildWithLightDist("tasks") {
assertSuccessful()
@@ -152,7 +153,7 @@ class NativePlatformLibsIT : BaseGradleIT() {
}
// Change cache kind and check that platform libraries generator was executed.
buildWithLightDist("tasks", "-Pkotlin.native.cacheKind.$targetName=static") {
buildWithLightDist("tasks", "-Pkotlin.native.cacheKind.$presetName=static") {
assertSuccessful()
assertContains("Precompile platform libraries for $targetName (precompilation: static)")
}
@@ -1 +1 @@
kotlin.native.cacheKind.ios_x64=none
kotlin.native.cacheKind.iosX64=none
@@ -1 +1 @@
kotlin.native.cacheKind.ios_x64=none
kotlin.native.cacheKind.iosX64=none
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.utils.SingleWarningPerBuild
import org.jetbrains.kotlin.konan.target.KonanTarget
import org.jetbrains.kotlin.konan.target.presetName
import org.jetbrains.kotlin.statistics.metrics.StringMetrics
import java.io.File
import java.util.*
@@ -205,7 +206,7 @@ internal class PropertiesProvider private constructor(private val project: Proje
* Dependencies caching strategy for [target].
*/
fun nativeCacheKindForTarget(target: KonanTarget): NativeCacheKind? =
property("kotlin.native.cacheKind.${target.name}")?.let { NativeCacheKind.byCompilerArgument(it) }
property("kotlin.native.cacheKind.${target.presetName}")?.let { NativeCacheKind.byCompilerArgument(it) }
/**
* Ignore overflow in [org.jetbrains.kotlin.gradle.internal.testing.TCServiceMessageOutputStreamHandler]