Refactor build repositories to reduce number of unnecessary request
Setup for all projects only local, jcenter and bootstrap repositories
This commit is contained in:
+14
-47
@@ -15,25 +15,9 @@ buildscript {
|
|||||||
|
|
||||||
kotlinBootstrapFrom(BootstrapOption.TeamCity("1.2.70-dev-491", onlySuccessBootstrap = false))
|
kotlinBootstrapFrom(BootstrapOption.TeamCity("1.2.70-dev-491", onlySuccessBootstrap = false))
|
||||||
|
|
||||||
val mirrorRepo: String? = findProperty("maven.repository.mirror")?.toString()
|
|
||||||
|
|
||||||
val repos = listOfNotNull(
|
|
||||||
mirrorRepo,
|
|
||||||
bootstrapKotlinRepo,
|
|
||||||
"https://jcenter.bintray.com/",
|
|
||||||
"https://plugins.gradle.org/m2",
|
|
||||||
"http://dl.bintray.com/kotlin/kotlinx",
|
|
||||||
"https://repo.gradle.org/gradle/ext-releases-local", // for native-platform
|
|
||||||
"https://jetbrains.bintray.com/intellij-third-party-dependencies", // for jflex
|
|
||||||
"https://dl.bintray.com/jetbrains/markdown" // for org.jetbrains:markdown
|
|
||||||
)
|
|
||||||
|
|
||||||
extra["repos"] = repos
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
for (repo in repos) {
|
bootstrapKotlinRepo?.let(::maven)
|
||||||
maven(url = repo)
|
maven("https://plugins.gradle.org/m2")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// a workaround for kotlin compiler classpath in kotlin project: sometimes gradle substitutes
|
// a workaround for kotlin compiler classpath in kotlin project: sometimes gradle substitutes
|
||||||
@@ -42,10 +26,10 @@ buildscript {
|
|||||||
val bootstrapCompilerClasspath by configurations.creating
|
val bootstrapCompilerClasspath by configurations.creating
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
bootstrapCompilerClasspath(kotlinDep("compiler-embeddable", bootstrapKotlinVersion))
|
bootstrapCompilerClasspath(kotlin("compiler-embeddable", bootstrapKotlinVersion))
|
||||||
|
|
||||||
classpath("com.gradle.publish:plugin-publish-plugin:0.9.7")
|
classpath("com.gradle.publish:plugin-publish-plugin:0.9.7")
|
||||||
classpath(kotlinDep("gradle-plugin", bootstrapKotlinVersion))
|
classpath(kotlin("gradle-plugin", bootstrapKotlinVersion))
|
||||||
classpath("net.sf.proguard:proguard-gradle:5.3.3")
|
classpath("net.sf.proguard:proguard-gradle:5.3.3")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,19 +74,9 @@ allprojects {
|
|||||||
|
|
||||||
extra["kotlin_root"] = rootDir
|
extra["kotlin_root"] = rootDir
|
||||||
|
|
||||||
val bootstrapCompileCfg = configurations.create("bootstrapCompile")
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
for (repo in (rootProject.extra["repos"] as List<String>)) {
|
|
||||||
maven(url = repo)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val cidrKotlinPlugin by configurations.creating
|
val cidrKotlinPlugin by configurations.creating
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
bootstrapCompileCfg(kotlinDep("compiler-embeddable", bootstrapKotlinVersion))
|
|
||||||
|
|
||||||
cidrKotlinPlugin(project(":prepare:cidr-plugin", "runtimeJar"))
|
cidrKotlinPlugin(project(":prepare:cidr-plugin", "runtimeJar"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,17 +154,6 @@ extra["IntellijCoreDependencies"] =
|
|||||||
"streamex",
|
"streamex",
|
||||||
"trove4j")
|
"trove4j")
|
||||||
|
|
||||||
extra["nativePlatformVariants"] =
|
|
||||||
listOf("windows-amd64",
|
|
||||||
"windows-i386",
|
|
||||||
"osx-amd64",
|
|
||||||
"osx-i386",
|
|
||||||
"linux-amd64",
|
|
||||||
"linux-i386",
|
|
||||||
"freebsd-amd64-libcpp",
|
|
||||||
"freebsd-amd64-libstdcpp",
|
|
||||||
"freebsd-i386-libcpp",
|
|
||||||
"freebsd-i386-libstdcpp")
|
|
||||||
|
|
||||||
extra["compilerModules"] = arrayOf(
|
extra["compilerModules"] = arrayOf(
|
||||||
":compiler:util",
|
":compiler:util",
|
||||||
@@ -295,19 +258,23 @@ allprojects {
|
|||||||
// therefore it is disabled by default
|
// therefore it is disabled by default
|
||||||
// buildDir = File(commonBuildDir, project.name)
|
// buildDir = File(commonBuildDir, project.name)
|
||||||
|
|
||||||
val repos = rootProject.extra["repos"] as List<String>
|
val mirrorRepo: String? = findProperty("maven.repository.mirror")?.toString()
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
intellijSdkRepo(project)
|
intellijSdkRepo(project)
|
||||||
androidDxJarRepo(project)
|
androidDxJarRepo(project)
|
||||||
|
mirrorRepo?.let(::maven)
|
||||||
for (repo in repos) {
|
bootstrapKotlinRepo?.let(::maven)
|
||||||
maven(repo)
|
jcenter()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configureJvmProject(javaHome!!, jvmTarget!!)
|
configureJvmProject(javaHome!!, jvmTarget!!)
|
||||||
|
|
||||||
val commonCompilerArgs = listOfNotNull("-Xallow-kotlin-package", "-Xread-deserialized-contracts", "-Xprogressive".takeIf { hasProperty("test.progressive.mode") })
|
val commonCompilerArgs = listOfNotNull(
|
||||||
|
"-Xallow-kotlin-package",
|
||||||
|
"-Xread-deserialized-contracts",
|
||||||
|
"-Xprogressive".takeIf { hasProperty("test.progressive.mode") }
|
||||||
|
)
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
|
|||||||
@@ -7,9 +7,24 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.gradle.org/gradle/ext-releases-local")
|
||||||
|
}
|
||||||
|
|
||||||
jvmTarget = "1.6"
|
jvmTarget = "1.6"
|
||||||
|
|
||||||
val nativePlatformVariants: List<String> by rootProject.extra
|
val nativePlatformVariants = listOf(
|
||||||
|
"windows-amd64",
|
||||||
|
"windows-i386",
|
||||||
|
"osx-amd64",
|
||||||
|
"osx-i386",
|
||||||
|
"linux-amd64",
|
||||||
|
"linux-i386",
|
||||||
|
"freebsd-amd64-libcpp",
|
||||||
|
"freebsd-amd64-libstdcpp",
|
||||||
|
"freebsd-i386-libcpp",
|
||||||
|
"freebsd-i386-libstdcpp"
|
||||||
|
)
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(project(":compiler:util"))
|
compileOnly(project(":compiler:util"))
|
||||||
@@ -40,6 +55,7 @@ runtimeJar(task<ShadowJar>("shadowJar")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourcesJar()
|
sourcesJar()
|
||||||
|
|
||||||
javadocJar()
|
javadocJar()
|
||||||
|
|
||||||
dist()
|
dist()
|
||||||
|
|||||||
@@ -7,9 +7,24 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://repo.gradle.org/gradle/ext-releases-local")
|
||||||
|
}
|
||||||
|
|
||||||
jvmTarget = "1.6"
|
jvmTarget = "1.6"
|
||||||
|
|
||||||
val nativePlatformVariants: List<String> by rootProject.extra
|
val nativePlatformVariants = listOf(
|
||||||
|
"windows-amd64",
|
||||||
|
"windows-i386",
|
||||||
|
"osx-amd64",
|
||||||
|
"osx-i386",
|
||||||
|
"linux-amd64",
|
||||||
|
"linux-i386",
|
||||||
|
"freebsd-amd64-libcpp",
|
||||||
|
"freebsd-amd64-libstdcpp",
|
||||||
|
"freebsd-i386-libcpp",
|
||||||
|
"freebsd-i386-libstdcpp"
|
||||||
|
)
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(project(":compiler:util"))
|
compileOnly(project(":compiler:util"))
|
||||||
@@ -39,6 +54,7 @@ runtimeJar(task<ShadowJar>("shadowJar")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourcesJar()
|
sourcesJar()
|
||||||
|
|
||||||
javadocJar()
|
javadocJar()
|
||||||
|
|
||||||
dist()
|
dist()
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://jetbrains.bintray.com/intellij-third-party-dependencies")
|
||||||
|
}
|
||||||
|
|
||||||
jvmTarget = "1.6"
|
jvmTarget = "1.6"
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://dl.bintray.com/jetbrains/markdown")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
|
|
||||||
@@ -38,11 +42,11 @@ dependencies {
|
|||||||
compile(project(":kotlin-script-util")) { isTransitive = false }
|
compile(project(":kotlin-script-util")) { isTransitive = false }
|
||||||
|
|
||||||
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||||
compile(commonDep("org.jetbrains", "markdown"))
|
|
||||||
|
|
||||||
compileOnly(project(":kotlin-daemon-client"))
|
compileOnly(project(":kotlin-daemon-client"))
|
||||||
|
|
||||||
compileOnly(intellijDep())
|
compileOnly(intellijDep())
|
||||||
|
compileOnly(commonDep("org.jetbrains", "markdown"))
|
||||||
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
||||||
compileOnly(intellijPluginDep("IntelliLang"))
|
compileOnly(intellijPluginDep("IntelliLang"))
|
||||||
compileOnly(intellijPluginDep("copyright"))
|
compileOnly(intellijPluginDep("copyright"))
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://dl.bintray.com/jetbrains/markdown")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
|
|
||||||
@@ -38,11 +42,11 @@ dependencies {
|
|||||||
compile(project(":kotlin-script-util")) { isTransitive = false }
|
compile(project(":kotlin-script-util")) { isTransitive = false }
|
||||||
|
|
||||||
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||||
compile(commonDep("org.jetbrains", "markdown"))
|
|
||||||
|
|
||||||
compileOnly(project(":kotlin-daemon-client"))
|
compileOnly(project(":kotlin-daemon-client"))
|
||||||
|
|
||||||
compileOnly(intellijDep())
|
compileOnly(intellijDep())
|
||||||
|
compileOnly(commonDep("org.jetbrains", "markdown"))
|
||||||
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
||||||
compileOnly(intellijPluginDep("IntelliLang"))
|
compileOnly(intellijPluginDep("IntelliLang"))
|
||||||
compileOnly(intellijPluginDep("copyright"))
|
compileOnly(intellijPluginDep("copyright"))
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://dl.bintray.com/jetbrains/markdown")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
|
|
||||||
@@ -38,11 +42,11 @@ dependencies {
|
|||||||
compile(project(":kotlin-script-util")) { isTransitive = false }
|
compile(project(":kotlin-script-util")) { isTransitive = false }
|
||||||
|
|
||||||
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||||
compile(commonDep("org.jetbrains", "markdown"))
|
|
||||||
|
|
||||||
compileOnly(project(":kotlin-daemon-client"))
|
compileOnly(project(":kotlin-daemon-client"))
|
||||||
|
|
||||||
compileOnly(intellijDep())
|
compileOnly(intellijDep())
|
||||||
|
compileOnly(commonDep("org.jetbrains", "markdown"))
|
||||||
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
||||||
compileOnly(intellijPluginDep("IntelliLang"))
|
compileOnly(intellijPluginDep("IntelliLang"))
|
||||||
compileOnly(intellijPluginDep("copyright"))
|
compileOnly(intellijPluginDep("copyright"))
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://dl.bintray.com/jetbrains/markdown")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
|
|
||||||
@@ -38,11 +42,11 @@ dependencies {
|
|||||||
compile(project(":kotlin-script-util")) { isTransitive = false }
|
compile(project(":kotlin-script-util")) { isTransitive = false }
|
||||||
|
|
||||||
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||||
compile(commonDep("org.jetbrains", "markdown"))
|
|
||||||
|
|
||||||
compileOnly(project(":kotlin-daemon-client"))
|
compileOnly(project(":kotlin-daemon-client"))
|
||||||
|
|
||||||
compileOnly(intellijDep())
|
compileOnly(intellijDep())
|
||||||
|
compileOnly(commonDep("org.jetbrains", "markdown"))
|
||||||
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
||||||
compileOnly(intellijPluginDep("IntelliLang"))
|
compileOnly(intellijPluginDep("IntelliLang"))
|
||||||
compileOnly(intellijPluginDep("copyright"))
|
compileOnly(intellijPluginDep("copyright"))
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://dl.bintray.com/jetbrains/markdown")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
|
|
||||||
@@ -38,11 +42,11 @@ dependencies {
|
|||||||
compile(project(":kotlin-script-util")) { isTransitive = false }
|
compile(project(":kotlin-script-util")) { isTransitive = false }
|
||||||
|
|
||||||
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||||
compile(commonDep("org.jetbrains", "markdown"))
|
|
||||||
|
|
||||||
compileOnly(project(":kotlin-daemon-client"))
|
compileOnly(project(":kotlin-daemon-client"))
|
||||||
|
|
||||||
compileOnly(intellijDep())
|
compileOnly(intellijDep())
|
||||||
|
compileOnly(commonDep("org.jetbrains", "markdown"))
|
||||||
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
|
||||||
compileOnly(intellijPluginDep("IntelliLang"))
|
compileOnly(intellijPluginDep("IntelliLang"))
|
||||||
compileOnly(intellijPluginDep("copyright"))
|
compileOnly(intellijPluginDep("copyright"))
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ plugins {
|
|||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("http://dl.bintray.com/kotlin/kotlinx")
|
||||||
|
}
|
||||||
|
|
||||||
val kotlinxSerializationVersion = "0.4.2"
|
val kotlinxSerializationVersion = "0.4.2"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ plugins {
|
|||||||
`java-base`
|
`java-base`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven("https://dl.bintray.com/jetbrains/markdown")
|
||||||
|
}
|
||||||
|
|
||||||
// Do not rename, used in JPS importer
|
// Do not rename, used in JPS importer
|
||||||
val projectsToShadow by extra(listOf(
|
val projectsToShadow by extra(listOf(
|
||||||
":plugins:annotation-based-compiler-plugins-ide-support",
|
":plugins:annotation-based-compiler-plugins-ide-support",
|
||||||
|
|||||||
Reference in New Issue
Block a user