gradle-plugin: Use konanVersion as a default compiler version
This commit is contained in:
@@ -60,12 +60,8 @@ jar {
|
||||
from (rootProject.findProject(':shared').sourceSets.main.output)
|
||||
}
|
||||
|
||||
task deleteDist(type: Delete) {
|
||||
delete 'dist'
|
||||
}
|
||||
|
||||
clean {
|
||||
dependsOn 'deleteDist'
|
||||
processResources {
|
||||
expand('konanVersion': konanVersion)
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
||||
+5
-1
@@ -26,6 +26,7 @@ import org.gradle.api.internal.project.ProjectInternal
|
||||
import org.gradle.api.tasks.TaskCollection
|
||||
import org.gradle.internal.reflect.Instantiator
|
||||
import org.gradle.tooling.provider.model.ToolingModelBuilderRegistry
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
@@ -191,7 +192,10 @@ class KonanPlugin @Inject constructor(private val registry: ToolingModelBuilderR
|
||||
internal const val KONAN_VERSION_PROPERTY_NAME = "konan.version"
|
||||
internal const val KONAN_BUILD_TARGETS = "konan.build.targets"
|
||||
|
||||
internal const val DEFAULT_KONAN_VERSION = "0.3"
|
||||
internal val DEFAULT_KONAN_VERSION = Properties().apply {
|
||||
load(KonanPlugin::class.java.getResourceAsStream("/META-INF/gradle-plugins/konan.properties") ?:
|
||||
throw RuntimeException("Cannot find a properties file"))
|
||||
}.getProperty("default-konan-version") ?: throw RuntimeException("Cannot read the default compiler version")
|
||||
|
||||
internal const val DOWNLOAD_COMPILER_PROPERTY_NAME = "DownloadCompiler"
|
||||
}
|
||||
|
||||
+2
-1
@@ -1 +1,2 @@
|
||||
implementation-class=org.jetbrains.kotlin.gradle.plugin.KonanPlugin
|
||||
implementation-class=org.jetbrains.kotlin.gradle.plugin.KonanPlugin
|
||||
default-konan-version=$konanVersion
|
||||
Reference in New Issue
Block a user