提交 284d42fd 编写于 作者: S Sergey Bogolepov

Use camelCase for cacheKind control property

Because it is more intuitive for end-users.
上级 29f95c7d
......@@ -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)")
}
......
kotlin.native.cacheKind.ios_x64=none
\ No newline at end of file
kotlin.native.cacheKind.iosX64=none
\ No newline at end of file
kotlin.native.cacheKind.ios_x64=none
\ No newline at end of file
kotlin.native.cacheKind.iosX64=none
\ No newline at end of file
......@@ -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]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册