Specify bootstrap version with gradle props instead of system props
Make bootstrap dependency version explicit
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
val repos = listOfNotNull(
|
val repos = listOfNotNull(
|
||||||
System.getProperty("bootstrap.kotlin.repo"),
|
property("bootstrap.kotlin.repo") as String,
|
||||||
"https://repo.gradle.org/gradle/repo",
|
"https://repo.gradle.org/gradle/repo",
|
||||||
"https://plugins.gradle.org/m2",
|
"https://plugins.gradle.org/m2",
|
||||||
"http://repository.jetbrains.com/utils/")
|
"http://repository.jetbrains.com/utils/")
|
||||||
@@ -26,7 +26,7 @@ buildscript {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("com.gradle.publish:plugin-publish-plugin:0.9.7")
|
classpath("com.gradle.publish:plugin-publish-plugin:0.9.7")
|
||||||
classpath(kotlinDep("gradle-plugin"))
|
classpath(kotlinDep("gradle-plugin", bootstrapKotlinVersion))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
bootstrapCompileCfg(kotlinDep("compiler-embeddable"))
|
bootstrapCompileCfg(kotlinDep("compiler-embeddable", bootstrapKotlinVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
val commonBuildDir = File(rootDir, "build")
|
val commonBuildDir = File(rootDir, "build")
|
||||||
|
|||||||
@@ -7,15 +7,10 @@ import org.gradle.api.artifacts.dsl.DependencyHandler
|
|||||||
import org.gradle.api.file.ConfigurableFileCollection
|
import org.gradle.api.file.ConfigurableFileCollection
|
||||||
import org.gradle.api.plugins.JavaPluginConvention
|
import org.gradle.api.plugins.JavaPluginConvention
|
||||||
import org.gradle.kotlin.dsl.*
|
import org.gradle.kotlin.dsl.*
|
||||||
import org.gradle.plugin.use.PluginDependenciesSpec
|
|
||||||
import org.gradle.plugin.use.PluginDependencySpec
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
val bootstrapKotlinVersion: String = System.getProperty("bootstrap.kotlin.version") ?: embeddedKotlinVersion
|
val Project.bootstrapKotlinVersion: String get() = this.property("bootstrap.kotlin.version") as String
|
||||||
|
|
||||||
fun PluginDependenciesSpec.kotlin(module: String, version: String? = null): PluginDependencySpec =
|
|
||||||
id("org.jetbrains.kotlin.$module") version (version ?: bootstrapKotlinVersion)
|
|
||||||
|
|
||||||
fun Project.commonDep(coord: String): String {
|
fun Project.commonDep(coord: String): String {
|
||||||
val parts = coord.split(':')
|
val parts = coord.split(':')
|
||||||
@@ -63,7 +58,7 @@ fun Project.ideaPluginDeps(vararg artifactBaseNames: String, plugin: String, sub
|
|||||||
fun Project.ideaUltimatePluginDeps(vararg artifactBaseNames: String, plugin: String, subdir: String = "lib"): ConfigurableFileCollection =
|
fun Project.ideaUltimatePluginDeps(vararg artifactBaseNames: String, plugin: String, subdir: String = "lib"): ConfigurableFileCollection =
|
||||||
ideaUltimateSdkDeps(*artifactBaseNames, subdir = "plugins/$plugin/$subdir")
|
ideaUltimateSdkDeps(*artifactBaseNames, subdir = "plugins/$plugin/$subdir")
|
||||||
|
|
||||||
fun Project.kotlinDep(artifactBaseName: String, version: String? = null): String = "org.jetbrains.kotlin:kotlin-$artifactBaseName:${version ?: bootstrapKotlinVersion}"
|
fun Project.kotlinDep(artifactBaseName: String, version: String): String = "org.jetbrains.kotlin:kotlin-$artifactBaseName:$version"
|
||||||
|
|
||||||
fun DependencyHandler.projectDist(name: String): Dependency = project(name, configuration = "distJar").apply { isTransitive = false }
|
fun DependencyHandler.projectDist(name: String): Dependency = project(name, configuration = "distJar").apply { isTransitive = false }
|
||||||
fun DependencyHandler.projectTests(name: String): Dependency = project(name, configuration = "tests-jar").apply { isTransitive = false }
|
fun DependencyHandler.projectTests(name: String): Dependency = project(name, configuration = "tests-jar").apply { isTransitive = false }
|
||||||
|
|||||||
+2
-2
@@ -3,6 +3,6 @@ org.gradle.parallel=false
|
|||||||
org.gradle.configureondemand=false
|
org.gradle.configureondemand=false
|
||||||
org.gradle.jvmargs=-Xmx1000m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
|
org.gradle.jvmargs=-Xmx1000m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
|
||||||
|
|
||||||
systemProp.bootstrap.kotlin.repo=https://dl.bintray.com/kotlin/kotlin-dev
|
bootstrap.kotlin.repo=https://dl.bintray.com/kotlin/kotlin-dev
|
||||||
systemProp.bootstrap.kotlin.version=1.1.50-dev-1451
|
bootstrap.kotlin.version=1.1.50-dev-1451
|
||||||
#signingRequired=true
|
#signingRequired=true
|
||||||
|
|||||||
Reference in New Issue
Block a user