Fix IDE import after switching to the long plugin version
This commit is contained in:
committed by
Vasily Levchenko
parent
328a6ff8fc
commit
b84559b27a
@@ -19,8 +19,6 @@
|
||||
* built plugin to bintray repository.
|
||||
*/
|
||||
|
||||
import org.jetbrains.kotlin.konan.KonanVersion
|
||||
|
||||
buildscript {
|
||||
ext.rootBuildDirectory = file('../../')
|
||||
|
||||
@@ -41,7 +39,6 @@ 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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,12 +51,24 @@ apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: "com.gradle.plugin-publish"
|
||||
|
||||
String determineVersion() {
|
||||
// With Gradle 5.1 adding a dependency on the 'shared' build
|
||||
// in this buildscript causes an IDE import error.
|
||||
// So we are not able to use the KonanVersion API and
|
||||
// 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
|
||||
} else {
|
||||
return "$kotlinVersion-native-${KonanVersion.Companion.CURRENT.toString()}"
|
||||
}
|
||||
|
||||
def buildNumber = findProperty("build.number")?.tokenize('-')?.get(2)
|
||||
def result = "$kotlinVersion-native-$konanVersion-$meta"
|
||||
if (buildNumber != null) {
|
||||
result += "-$buildNumber"
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
group = 'org.jetbrains.kotlin'
|
||||
|
||||
Reference in New Issue
Block a user