Always use the long version for Gradle plugin

This commit is contained in:
Ilya Matveev
2019-02-22 17:31:55 +03:00
committed by Ilya Matveev
parent 7728a51030
commit 82250a9d68
+4 -16
View File
@@ -19,6 +19,8 @@
* built plugin to bintray repository.
*/
import org.jetbrains.kotlin.konan.KonanVersion
buildscript {
ext.rootBuildDirectory = file('../../')
@@ -39,6 +41,7 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
classpath "com.gradle.publish:plugin-publish-plugin:0.9.10"
classpath "org.jetbrains.kotlin:kotlin-native-shared:$konanVersion"
}
}
@@ -51,26 +54,11 @@ apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "com.gradle.plugin-publish"
String determineVersion() {
// With Gradle 4.10 we are no longer able to depend on
// a 'shared' build included into the root one and use the KonanVersion API provided
// by it. So we have to manually construct the version.
// TODO: Remove this code when 'shared' is built separately (from a separate repo).
def meta = findProperty('konanMetaVersion') ?: 'dev'
def overriddenVersion = findProperty('pluginVersionOverride') as String
if (overriddenVersion != null && !overriddenVersion.empty) {
return overriddenVersion
}
if (meta == 'release') {
return kotlinVersion
} else {
def buildNumber = findProperty("build.number")?.tokenize('-')?.get(2)
def result = "$kotlinVersion-native-$konanVersion-$meta"
if (buildNumber != null) {
result += "-$buildNumber"
}
return result
return "$kotlinVersion-native-${KonanVersion.Companion.CURRENT.toString()}"
}
}