diff --git a/build.gradle.kts b/build.gradle.kts index 78388e87e99..481d614f158 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,25 +15,9 @@ buildscript { 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 { - for (repo in repos) { - maven(url = repo) - } + bootstrapKotlinRepo?.let(::maven) + maven("https://plugins.gradle.org/m2") } // a workaround for kotlin compiler classpath in kotlin project: sometimes gradle substitutes @@ -42,10 +26,10 @@ buildscript { val bootstrapCompilerClasspath by configurations.creating dependencies { - bootstrapCompilerClasspath(kotlinDep("compiler-embeddable", bootstrapKotlinVersion)) + bootstrapCompilerClasspath(kotlin("compiler-embeddable", bootstrapKotlinVersion)) 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") } } @@ -90,19 +74,9 @@ allprojects { extra["kotlin_root"] = rootDir -val bootstrapCompileCfg = configurations.create("bootstrapCompile") - -repositories { - for (repo in (rootProject.extra["repos"] as List)) { - maven(url = repo) - } -} - val cidrKotlinPlugin by configurations.creating dependencies { - bootstrapCompileCfg(kotlinDep("compiler-embeddable", bootstrapKotlinVersion)) - cidrKotlinPlugin(project(":prepare:cidr-plugin", "runtimeJar")) } @@ -180,17 +154,6 @@ extra["IntellijCoreDependencies"] = "streamex", "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( ":compiler:util", @@ -295,19 +258,23 @@ allprojects { // therefore it is disabled by default // buildDir = File(commonBuildDir, project.name) - val repos = rootProject.extra["repos"] as List + val mirrorRepo: String? = findProperty("maven.repository.mirror")?.toString() + repositories { intellijSdkRepo(project) androidDxJarRepo(project) - - for (repo in repos) { - maven(repo) - } + mirrorRepo?.let(::maven) + bootstrapKotlinRepo?.let(::maven) + jcenter() } 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> { kotlinOptions { diff --git a/compiler/daemon/daemon-client/build.gradle.kts b/compiler/daemon/daemon-client/build.gradle.kts index 0608a8fcef7..4b36a281c57 100644 --- a/compiler/daemon/daemon-client/build.gradle.kts +++ b/compiler/daemon/daemon-client/build.gradle.kts @@ -7,9 +7,24 @@ plugins { id("jps-compatible") } +repositories { + maven("https://repo.gradle.org/gradle/ext-releases-local") +} + jvmTarget = "1.6" -val nativePlatformVariants: List 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 { compileOnly(project(":compiler:util")) @@ -40,6 +55,7 @@ runtimeJar(task("shadowJar")) { } sourcesJar() + javadocJar() dist() diff --git a/compiler/daemon/daemon-client/build.gradle.kts.173 b/compiler/daemon/daemon-client/build.gradle.kts.173 index 5fb9882c4a0..dab3064202a 100644 --- a/compiler/daemon/daemon-client/build.gradle.kts.173 +++ b/compiler/daemon/daemon-client/build.gradle.kts.173 @@ -7,9 +7,24 @@ plugins { id("jps-compatible") } +repositories { + maven("https://repo.gradle.org/gradle/ext-releases-local") +} + jvmTarget = "1.6" -val nativePlatformVariants: List 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 { compileOnly(project(":compiler:util")) @@ -39,6 +54,7 @@ runtimeJar(task("shadowJar")) { } sourcesJar() + javadocJar() dist() diff --git a/compiler/psi/build.gradle.kts b/compiler/psi/build.gradle.kts index 5315aa5f8e5..568a29bc83c 100644 --- a/compiler/psi/build.gradle.kts +++ b/compiler/psi/build.gradle.kts @@ -9,6 +9,9 @@ plugins { id("jps-compatible") } +repositories { + maven("https://jetbrains.bintray.com/intellij-third-party-dependencies") +} jvmTarget = "1.6" diff --git a/idea/build.gradle.kts b/idea/build.gradle.kts index 276510149eb..621e1f3ae3e 100644 --- a/idea/build.gradle.kts +++ b/idea/build.gradle.kts @@ -5,6 +5,10 @@ plugins { id("jps-compatible") } +repositories { + maven("https://dl.bintray.com/jetbrains/markdown") +} + dependencies { testRuntime(intellijDep()) @@ -38,11 +42,11 @@ dependencies { compile(project(":kotlin-script-util")) { isTransitive = false } compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } - compile(commonDep("org.jetbrains", "markdown")) compileOnly(project(":kotlin-daemon-client")) compileOnly(intellijDep()) + compileOnly(commonDep("org.jetbrains", "markdown")) compileOnly(commonDep("com.google.code.findbugs", "jsr305")) compileOnly(intellijPluginDep("IntelliLang")) compileOnly(intellijPluginDep("copyright")) diff --git a/idea/build.gradle.kts.173 b/idea/build.gradle.kts.173 index d8a539a1350..20147b40360 100644 --- a/idea/build.gradle.kts.173 +++ b/idea/build.gradle.kts.173 @@ -5,6 +5,10 @@ plugins { id("jps-compatible") } +repositories { + maven("https://dl.bintray.com/jetbrains/markdown") +} + dependencies { testRuntime(intellijDep()) @@ -38,11 +42,11 @@ dependencies { compile(project(":kotlin-script-util")) { isTransitive = false } compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } - compile(commonDep("org.jetbrains", "markdown")) compileOnly(project(":kotlin-daemon-client")) compileOnly(intellijDep()) + compileOnly(commonDep("org.jetbrains", "markdown")) compileOnly(commonDep("com.google.code.findbugs", "jsr305")) compileOnly(intellijPluginDep("IntelliLang")) compileOnly(intellijPluginDep("copyright")) diff --git a/idea/build.gradle.kts.as31 b/idea/build.gradle.kts.as31 index 5ea7f9dafcd..4e681b2fed8 100644 --- a/idea/build.gradle.kts.as31 +++ b/idea/build.gradle.kts.as31 @@ -5,6 +5,10 @@ plugins { id("jps-compatible") } +repositories { + maven("https://dl.bintray.com/jetbrains/markdown") +} + dependencies { testRuntime(intellijDep()) @@ -38,11 +42,11 @@ dependencies { compile(project(":kotlin-script-util")) { isTransitive = false } compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } - compile(commonDep("org.jetbrains", "markdown")) compileOnly(project(":kotlin-daemon-client")) compileOnly(intellijDep()) + compileOnly(commonDep("org.jetbrains", "markdown")) compileOnly(commonDep("com.google.code.findbugs", "jsr305")) compileOnly(intellijPluginDep("IntelliLang")) compileOnly(intellijPluginDep("copyright")) diff --git a/idea/build.gradle.kts.as32 b/idea/build.gradle.kts.as32 index 813db428915..5313bbe0738 100644 --- a/idea/build.gradle.kts.as32 +++ b/idea/build.gradle.kts.as32 @@ -5,6 +5,10 @@ plugins { id("jps-compatible") } +repositories { + maven("https://dl.bintray.com/jetbrains/markdown") +} + dependencies { testRuntime(intellijDep()) @@ -38,11 +42,11 @@ dependencies { compile(project(":kotlin-script-util")) { isTransitive = false } compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } - compile(commonDep("org.jetbrains", "markdown")) compileOnly(project(":kotlin-daemon-client")) compileOnly(intellijDep()) + compileOnly(commonDep("org.jetbrains", "markdown")) compileOnly(commonDep("com.google.code.findbugs", "jsr305")) compileOnly(intellijPluginDep("IntelliLang")) compileOnly(intellijPluginDep("copyright")) diff --git a/idea/build.gradle.kts.as33 b/idea/build.gradle.kts.as33 index 3cd00a7781d..d6deae3af29 100644 --- a/idea/build.gradle.kts.as33 +++ b/idea/build.gradle.kts.as33 @@ -5,6 +5,10 @@ plugins { id("jps-compatible") } +repositories { + maven("https://dl.bintray.com/jetbrains/markdown") +} + dependencies { testRuntime(intellijDep()) @@ -38,11 +42,11 @@ dependencies { compile(project(":kotlin-script-util")) { isTransitive = false } compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } - compile(commonDep("org.jetbrains", "markdown")) compileOnly(project(":kotlin-daemon-client")) compileOnly(intellijDep()) + compileOnly(commonDep("org.jetbrains", "markdown")) compileOnly(commonDep("com.google.code.findbugs", "jsr305")) compileOnly(intellijPluginDep("IntelliLang")) compileOnly(intellijPluginDep("copyright")) diff --git a/plugins/imports-dumper/build.gradle.kts b/plugins/imports-dumper/build.gradle.kts index b3b85915469..33878fa1979 100644 --- a/plugins/imports-dumper/build.gradle.kts +++ b/plugins/imports-dumper/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("jps-compatible") } +repositories { + maven("http://dl.bintray.com/kotlin/kotlinx") +} + val kotlinxSerializationVersion = "0.4.2" dependencies { diff --git a/prepare/idea-plugin/build.gradle.kts b/prepare/idea-plugin/build.gradle.kts index 39a0f6d945a..c061426594c 100644 --- a/prepare/idea-plugin/build.gradle.kts +++ b/prepare/idea-plugin/build.gradle.kts @@ -7,6 +7,10 @@ plugins { `java-base` } +repositories { + maven("https://dl.bintray.com/jetbrains/markdown") +} + // Do not rename, used in JPS importer val projectsToShadow by extra(listOf( ":plugins:annotation-based-compiler-plugins-ide-support",