Always use the long version for Gradle plugin
This commit is contained in:
committed by
Ilya Matveev
parent
7728a51030
commit
82250a9d68
@@ -19,6 +19,8 @@
|
|||||||
* built plugin to bintray repository.
|
* built plugin to bintray repository.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.konan.KonanVersion
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.rootBuildDirectory = file('../../')
|
ext.rootBuildDirectory = file('../../')
|
||||||
|
|
||||||
@@ -39,6 +41,7 @@ buildscript {
|
|||||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
|
||||||
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
|
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
|
||||||
classpath "com.gradle.publish:plugin-publish-plugin:0.9.10"
|
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"
|
apply plugin: "com.gradle.plugin-publish"
|
||||||
|
|
||||||
String determineVersion() {
|
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
|
def overriddenVersion = findProperty('pluginVersionOverride') as String
|
||||||
|
|
||||||
if (overriddenVersion != null && !overriddenVersion.empty) {
|
if (overriddenVersion != null && !overriddenVersion.empty) {
|
||||||
return overriddenVersion
|
return overriddenVersion
|
||||||
}
|
|
||||||
|
|
||||||
if (meta == 'release') {
|
|
||||||
return kotlinVersion
|
|
||||||
} else {
|
} else {
|
||||||
def buildNumber = findProperty("build.number")?.tokenize('-')?.get(2)
|
return "$kotlinVersion-native-${KonanVersion.Companion.CURRENT.toString()}"
|
||||||
def result = "$kotlinVersion-native-$konanVersion-$meta"
|
|
||||||
if (buildNumber != null) {
|
|
||||||
result += "-$buildNumber"
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user