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) {
|
task bundleRegular(type: (isWindows()) ? Zip : Tar) {
|
||||||
def simpleOsName = HostManager.simpleOsName()
|
def simpleOsName = HostManager.platformName()
|
||||||
archiveBaseName.set("kotlin-native-$simpleOsName-$konanVersionFull")
|
archiveBaseName.set("kotlin-native-$simpleOsName-$konanVersionFull")
|
||||||
from(UtilsKt.getKotlinNativeDist(project)) {
|
from(UtilsKt.getKotlinNativeDist(project)) {
|
||||||
include '**'
|
include '**'
|
||||||
@@ -501,7 +501,7 @@ task bundleRegular(type: (isWindows()) ? Zip : Tar) {
|
|||||||
|
|
||||||
task bundlePrebuilt(type: (isWindows()) ? Zip : Tar) {
|
task bundlePrebuilt(type: (isWindows()) ? Zip : Tar) {
|
||||||
dependsOn("crossDistPlatformLibs")
|
dependsOn("crossDistPlatformLibs")
|
||||||
def simpleOsName = HostManager.simpleOsName()
|
def simpleOsName = HostManager.platformName()
|
||||||
archiveBaseName.set("kotlin-native-prebuilt-$simpleOsName-$konanVersionFull")
|
archiveBaseName.set("kotlin-native-prebuilt-$simpleOsName-$konanVersionFull")
|
||||||
from(UtilsKt.getKotlinNativeDist(project)) {
|
from(UtilsKt.getKotlinNativeDist(project)) {
|
||||||
include '**'
|
include '**'
|
||||||
@@ -539,7 +539,7 @@ configure([bundleRegular, bundlePrebuilt]) {
|
|||||||
task 'tc-dist'(type: (isWindows()) ? Zip : Tar) {
|
task 'tc-dist'(type: (isWindows()) ? Zip : Tar) {
|
||||||
dependsOn('dist')
|
dependsOn('dist')
|
||||||
dependsOn('distSources')
|
dependsOn('distSources')
|
||||||
def simpleOsName = HostManager.simpleOsName()
|
def simpleOsName = HostManager.platformName()
|
||||||
archiveBaseName.set("kotlin-native-dist-$simpleOsName-$konanVersionFull")
|
archiveBaseName.set("kotlin-native-dist-$simpleOsName-$konanVersionFull")
|
||||||
from(UtilsKt.getKotlinNativeDist(project)) {
|
from(UtilsKt.getKotlinNativeDist(project)) {
|
||||||
include '**'
|
include '**'
|
||||||
@@ -613,7 +613,7 @@ task uploadBundle {
|
|||||||
server: project.findProperty("cdnUrl") ?: System.getenv("CDN_URL"),
|
server: project.findProperty("cdnUrl") ?: System.getenv("CDN_URL"),
|
||||||
userid: project.findProperty("cdnUser") ?: System.getenv("CDN_USER"),
|
userid: project.findProperty("cdnUser") ?: System.getenv("CDN_USER"),
|
||||||
password: project.findProperty("cdnPass") ?: System.getenv("CDN_PASS"),
|
password: project.findProperty("cdnPass") ?: System.getenv("CDN_PASS"),
|
||||||
remoteDir: "/builds/$kind/$konanVersion/${HostManager.simpleOsName()}"
|
remoteDir: "/builds/$kind/$konanVersion/${HostManager.platformName()}"
|
||||||
]
|
]
|
||||||
ant {
|
ant {
|
||||||
taskdef(name: 'ftp',
|
taskdef(name: 'ftp',
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ internal val Project.host
|
|||||||
get() = HostManager.host.visibleName
|
get() = HostManager.host.visibleName
|
||||||
|
|
||||||
internal val Project.simpleOsName
|
internal val Project.simpleOsName
|
||||||
get() = HostManager.simpleOsName()
|
get() = HostManager.platformName()
|
||||||
|
|
||||||
/** A task with a KonanTarget specified. */
|
/** A task with a KonanTarget specified. */
|
||||||
abstract class KonanTargetableTask: DefaultTask() {
|
abstract class KonanTargetableTask: DefaultTask() {
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ class NativePlatformLibsIT : BaseGradleIT() {
|
|||||||
|
|
||||||
private fun deleteInstalledCompilers() {
|
private fun deleteInstalledCompilers() {
|
||||||
// Clean existing installation directories.
|
// Clean existing installation directories.
|
||||||
val osName = HostManager.simpleOsName()
|
val osName = HostManager.platformName()
|
||||||
val oldCompilerDir = DependencyDirectories.localKonanDir.resolve("kotlin-native-$osName-$oldCompilerVersion")
|
val oldCompilerDir = DependencyDirectories.localKonanDir.resolve("kotlin-native-$osName-$oldCompilerVersion")
|
||||||
val currentCompilerDir = DependencyDirectories.localKonanDir.resolve("kotlin-native-$osName-$currentCompilerVersion")
|
val currentCompilerDir = DependencyDirectories.localKonanDir.resolve("kotlin-native-$osName-$currentCompilerVersion")
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ class NativeCompilerDownloader(
|
|||||||
get() = NativeDistributionTypeProvider(project).getDistributionType(compilerVersion)
|
get() = NativeDistributionTypeProvider(project).getDistributionType(compilerVersion)
|
||||||
|
|
||||||
private val simpleOsName: String
|
private val simpleOsName: String
|
||||||
get() = HostManager.simpleOsName()
|
get() = HostManager.platformName()
|
||||||
|
|
||||||
private val dependencyName: String
|
private val dependencyName: String
|
||||||
get() {
|
get() {
|
||||||
|
|||||||
@@ -168,6 +168,12 @@ open class HostManager(
|
|||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun simpleOsName(): String {
|
fun simpleOsName(): String {
|
||||||
|
val hostOs = hostOs()
|
||||||
|
return if (hostOs == "osx") "macos" else hostOs
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun platformName(): String {
|
||||||
val hostOs = hostOs()
|
val hostOs = hostOs()
|
||||||
val arch = hostArch()
|
val arch = hostArch()
|
||||||
return when (hostOs) {
|
return when (hostOs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user