mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
Revert simpleOsName in HostManager
Support old naming in simpleOsName. Introduce new platformName method for the new archive naming.
This commit is contained in:
@@ -480,7 +480,7 @@ task bundle {
|
||||
}
|
||||
|
||||
task bundleRegular(type: (isWindows()) ? Zip : Tar) {
|
||||
def simpleOsName = HostManager.simpleOsName()
|
||||
def simpleOsName = HostManager.platformName()
|
||||
archiveBaseName.set("kotlin-native-$simpleOsName-$konanVersionFull")
|
||||
from(UtilsKt.getKotlinNativeDist(project)) {
|
||||
include '**'
|
||||
@@ -501,7 +501,7 @@ task bundleRegular(type: (isWindows()) ? Zip : Tar) {
|
||||
|
||||
task bundlePrebuilt(type: (isWindows()) ? Zip : Tar) {
|
||||
dependsOn("crossDistPlatformLibs")
|
||||
def simpleOsName = HostManager.simpleOsName()
|
||||
def simpleOsName = HostManager.platformName()
|
||||
archiveBaseName.set("kotlin-native-prebuilt-$simpleOsName-$konanVersionFull")
|
||||
from(UtilsKt.getKotlinNativeDist(project)) {
|
||||
include '**'
|
||||
@@ -539,7 +539,7 @@ configure([bundleRegular, bundlePrebuilt]) {
|
||||
task 'tc-dist'(type: (isWindows()) ? Zip : Tar) {
|
||||
dependsOn('dist')
|
||||
dependsOn('distSources')
|
||||
def simpleOsName = HostManager.simpleOsName()
|
||||
def simpleOsName = HostManager.platformName()
|
||||
archiveBaseName.set("kotlin-native-dist-$simpleOsName-$konanVersionFull")
|
||||
from(UtilsKt.getKotlinNativeDist(project)) {
|
||||
include '**'
|
||||
@@ -613,7 +613,7 @@ task uploadBundle {
|
||||
server: project.findProperty("cdnUrl") ?: System.getenv("CDN_URL"),
|
||||
userid: project.findProperty("cdnUser") ?: System.getenv("CDN_USER"),
|
||||
password: project.findProperty("cdnPass") ?: System.getenv("CDN_PASS"),
|
||||
remoteDir: "/builds/$kind/$konanVersion/${HostManager.simpleOsName()}"
|
||||
remoteDir: "/builds/$kind/$konanVersion/${HostManager.platformName()}"
|
||||
]
|
||||
ant {
|
||||
taskdef(name: 'ftp',
|
||||
|
||||
@@ -43,7 +43,7 @@ internal val Project.host
|
||||
get() = HostManager.host.visibleName
|
||||
|
||||
internal val Project.simpleOsName
|
||||
get() = HostManager.simpleOsName()
|
||||
get() = HostManager.platformName()
|
||||
|
||||
/** A task with a KonanTarget specified. */
|
||||
abstract class KonanTargetableTask: DefaultTask() {
|
||||
|
||||
@@ -52,7 +52,7 @@ class NativePlatformLibsIT : BaseGradleIT() {
|
||||
|
||||
private fun deleteInstalledCompilers() {
|
||||
// Clean existing installation directories.
|
||||
val osName = HostManager.simpleOsName()
|
||||
val osName = HostManager.platformName()
|
||||
val oldCompilerDir = DependencyDirectories.localKonanDir.resolve("kotlin-native-$osName-$oldCompilerVersion")
|
||||
val currentCompilerDir = DependencyDirectories.localKonanDir.resolve("kotlin-native-$osName-$currentCompilerVersion")
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class NativeCompilerDownloader(
|
||||
get() = NativeDistributionTypeProvider(project).getDistributionType(compilerVersion)
|
||||
|
||||
private val simpleOsName: String
|
||||
get() = HostManager.simpleOsName()
|
||||
get() = HostManager.platformName()
|
||||
|
||||
private val dependencyName: String
|
||||
get() {
|
||||
|
||||
@@ -168,6 +168,12 @@ open class HostManager(
|
||||
|
||||
@JvmStatic
|
||||
fun simpleOsName(): String {
|
||||
val hostOs = hostOs()
|
||||
return if (hostOs == "osx") "macos" else hostOs
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun platformName(): String {
|
||||
val hostOs = hostOs()
|
||||
val arch = hostArch()
|
||||
return when (hostOs) {
|
||||
|
||||
Reference in New Issue
Block a user