Move 'TargetDependent' into commonizer module make it an interface

This commit is contained in:
sebastian.sellmair
2021-03-24 16:15:30 +01:00
parent bce92d824a
commit cdbede09df
10 changed files with 98 additions and 53 deletions
+6 -3
View File
@@ -43,7 +43,7 @@ sourceSets {
* TODO: This version hack on migrating period K/N into repository Kotlin, in new build infrostructure zero maintance claus isn't dropped,
* so for old builds we need to keep this version to string representation till total switch on new infrostructure.
*/
val konanVersion = object: org.jetbrains.kotlin.konan.CompilerVersion by NativeCompilerDownloader.DEFAULT_KONAN_VERSION {
val konanVersion = object : org.jetbrains.kotlin.konan.CompilerVersion by NativeCompilerDownloader.DEFAULT_KONAN_VERSION {
override fun toString(showMeta: Boolean, showBuild: Boolean) = buildString {
if (major > 1
|| minor > 5
@@ -71,12 +71,15 @@ val konanVersion = object: org.jetbrains.kotlin.konan.CompilerVersion by NativeC
}
}
override fun toString() = toString(meta != org.jetbrains.kotlin.konan.MetaVersion.RELEASE,
meta != org.jetbrains.kotlin.konan.MetaVersion.RELEASE)
override fun toString() = toString(
meta != org.jetbrains.kotlin.konan.MetaVersion.RELEASE,
meta != org.jetbrains.kotlin.konan.MetaVersion.RELEASE
)
}
tasks.register("downloadNativeCompiler") {
doFirst {
if (NativeCompilerDownloader(project, konanVersion).compilerDirectory.exists()) return@doFirst
NativeCompilerDownloader(project, konanVersion).downloadIfNeeded()
}
}
@@ -1,9 +0,0 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.commonizer
public typealias TargetDependent<T> = Map<CommonizerTarget, T>