[Gradle, native] Rename native distribution kind: regular -> light

This commit is contained in:
Ilya Matveev
2020-04-07 14:53:27 +07:00
parent 9c156c1a93
commit 7ee4f4853d
4 changed files with 5 additions and 5 deletions
@@ -241,7 +241,7 @@ enum class ExplicitApiMode(private val cliOption: String) {
}
enum class NativeDistributionType(val suffix: String?) {
REGULAR(null) {
LIGHT(null) {
override fun isAvailableFor(host: KonanTarget, version: CompilerVersion) = true
},
RESTRICTED("restricted") {
@@ -142,7 +142,7 @@ internal class PropertiesProvider private constructor(private val project: Proje
project,
"Project property 'kotlin.native.restrictedDistribution' is deprecated. Please use 'kotlin.native.distribution.type=restricted' instead"
)
result = if (deprecatedRestricted) NativeDistributionType.RESTRICTED else NativeDistributionType.REGULAR
result = if (deprecatedRestricted) NativeDistributionType.RESTRICTED else NativeDistributionType.LIGHT
}
return result
@@ -13,7 +13,7 @@ import org.gradle.api.Project
import org.gradle.api.invocation.Gradle
import org.jetbrains.kotlin.compilerRunner.konanHome
import org.jetbrains.kotlin.compilerRunner.konanVersion
import org.jetbrains.kotlin.gradle.dsl.NativeDistributionType.REGULAR
import org.jetbrains.kotlin.gradle.dsl.NativeDistributionType.LIGHT
import org.jetbrains.kotlin.gradle.plugin.*
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider
import org.jetbrains.kotlin.gradle.targets.native.DisabledNativeTargetsReporter
@@ -66,7 +66,7 @@ abstract class AbstractKotlinNativeTargetPreset<T : KotlinNativeTarget>(
val distributionType = PropertiesProvider(project).nativeDistributionType
if (konanVersion.isAtLeast(1, 4, 0) &&
(distributionType == null || distributionType == REGULAR)
(distributionType == null || distributionType == LIGHT)
) {
PlatformLibrariesGenerator(project, konanTarget).generatePlatformLibsIfNeeded()
}
@@ -43,7 +43,7 @@ class NativeCompilerDownloader(
private val distributionType: NativeDistributionType
get() = PropertiesProvider(project).nativeDistributionType?.takeIf {
it.isAvailableFor(HostManager.host, compilerVersion)
} ?: NativeDistributionType.REGULAR
} ?: NativeDistributionType.LIGHT
private val simpleOsName: String
get() = HostManager.simpleOsName()