Build: Fix deprecated Gradle configurations usages

for migration to Gradle 7+ #KTI-559
This commit is contained in:
Vyacheslav Gerasimov
2021-07-07 00:27:29 +03:00
parent dbedff3c62
commit ab146bd6d4
158 changed files with 867 additions and 884 deletions
+4 -4
View File
@@ -13,10 +13,10 @@ dependencies {
runtimeOnly(kotlinStdlib())
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:cli"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit:junit"))
testApi(project(":compiler:backend"))
testApi(project(":compiler:cli"))
testApi(projectTests(":compiler:tests-common"))
testApi(commonDep("junit:junit"))
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
@@ -10,7 +10,7 @@ val robolectricClasspath by configurations.creating
val androidExtensionsRuntimeForTests by configurations.creating
dependencies {
testCompile(intellijCoreDep()) { includeJars("intellij-core") }
testApi(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(project(":compiler:util"))
compileOnly(project(":compiler:plugin-api"))
@@ -24,18 +24,18 @@ dependencies {
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testCompile(project(":compiler:util"))
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:ir.backend.common"))
testCompile(project(":compiler:backend.jvm"))
testCompile(project(":compiler:cli"))
testCompile(project(":kotlin-android-extensions-runtime"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testApi(project(":compiler:util"))
testApi(project(":compiler:backend"))
testApi(project(":compiler:ir.backend.common"))
testApi(project(":compiler:backend.jvm"))
testApi(project(":compiler:cli"))
testApi(project(":kotlin-android-extensions-runtime"))
testApi(projectTests(":compiler:tests-common"))
testApi(project(":kotlin-test:kotlin-test-jvm"))
testApi(commonDep("junit:junit"))
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijDep())
testRuntimeOnly(intellijPluginDep("junit"))
testRuntimeOnly(intellijDep())
robolectricClasspath(commonDep("org.robolectric", "robolectric"))
robolectricClasspath("org.robolectric:android-all:4.4_r1-robolectric-1")
@@ -23,22 +23,22 @@ dependencies {
compileOnly(intellijPluginDep("Groovy"))
compileOnly(intellijDep())
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:frontend.java"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:kapt3-idea"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testApi(project(":compiler:cli"))
testApi(project(":compiler:frontend.java"))
testApi(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testApi(project(":plugins:kapt3-idea"))
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":idea"))
testApi(projectTests(":idea:idea-android"))
testApi(project(":kotlin-test:kotlin-test-jvm"))
testApi(commonDep("junit:junit"))
testApi(project(":idea:idea-native")) { isTransitive = false }
testApi(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":native:frontend.native"))
testRuntime(project(":kotlin-reflect"))
testCompile(intellijPluginDep("android"))
testCompile(intellijPluginDep("Groovy"))
testCompile(intellijDep())
testApi(intellijPluginDep("android"))
testApi(intellijPluginDep("Groovy"))
testApi(intellijDep())
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
@@ -8,7 +8,7 @@ plugins {
project.updateJvmTarget("1.6")
dependencies {
compile(kotlinStdlib())
api(kotlinStdlib())
compileOnly(commonDep("com.google.android", "android"))
}
@@ -4,29 +4,29 @@ plugins {
}
dependencies {
compile(project(":compiler:fir:cones"))
compile(project(":compiler:fir:tree"))
compile(project(":compiler:fir:resolve"))
compile(project(":compiler:fir:checkers"))
compile(project(":compiler:frontend"))
api(project(":compiler:fir:cones"))
api(project(":compiler:fir:tree"))
api(project(":compiler:fir:resolve"))
api(project(":compiler:fir:checkers"))
api(project(":compiler:frontend"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
testCompile(intellijDep())
testApi(intellijDep())
testCompile(commonDep("junit:junit"))
testApi(commonDep("junit:junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(project(":compiler:fir:checkers"))
testCompile(project(":compiler:fir:checkers:checkers.jvm"))
testCompile(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
testCompile(project(":compiler:frontend"))
testApi(projectTests(":compiler:tests-common"))
testApi(project(":compiler:fir:checkers"))
testApi(project(":compiler:fir:checkers:checkers.jvm"))
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
testApi(project(":compiler:frontend"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
+3 -3
View File
@@ -9,13 +9,13 @@ plugins {
val kotlinxSerializationVersion = "0.4.2"
dependencies {
compile(project(":compiler:frontend.java"))
compile(project(":compiler:plugin-api"))
api(project(":compiler:frontend.java"))
api(project(":compiler:plugin-api"))
compileOnly("org.jetbrains.kotlinx", "kotlinx-serialization-runtime", kotlinxSerializationVersion) { isTransitive = false }
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testCompile(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:tests-common"))
embedded("org.jetbrains.kotlinx", "kotlinx-serialization-runtime", kotlinxSerializationVersion) { isTransitive = false }
}
+2 -1
View File
@@ -16,7 +16,7 @@ val shadows: Configuration by configurations.creating {
isTransitive = false
}
configurations.getByName("compileOnly").extendsFrom(shadows)
configurations.getByName("testCompile").extendsFrom(shadows)
configurations.getByName("testApi").extendsFrom(shadows)
dependencies {
// Should come before compiler dependencies, see comment in "compiler/build.gradle.kts"
@@ -38,6 +38,7 @@ dependencies {
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(project(":kotlin-compiler"))
testImplementation(commonDep("junit:junit"))
+2 -2
View File
@@ -4,10 +4,10 @@ plugins {
}
dependencies {
compile(kotlinStdlib())
api(kotlinStdlib())
compileOnly(toolsJarApi())
testCompile(commonDep("junit:junit"))
testApi(commonDep("junit:junit"))
testCompileOnly(toolsJarApi())
testRuntimeOnly(toolsJar())
+4 -4
View File
@@ -4,13 +4,13 @@ plugins {
}
dependencies {
compile(project(":compiler:cli"))
api(project(":compiler:cli"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) }
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":compiler"))
testCompile(commonDep("junit:junit"))
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler"))
testApi(commonDep("junit:junit"))
}
sourceSets {
+13 -13
View File
@@ -8,18 +8,18 @@ plugins {
dependencies {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
testImplementation(intellijDep())
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt") }
testCompileOnly(intellijDep()) { includeJars("platform-api", "platform-impl") }
testRuntime(intellijPluginDep("java"))
testImplementation(intellijPluginDep("java"))
compile(project(":compiler:util"))
compile(project(":compiler:cli"))
compile(project(":compiler:backend"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:plugin-api"))
api(project(":compiler:util"))
api(project(":compiler:cli"))
api(project(":compiler:backend"))
api(project(":compiler:frontend"))
api(project(":compiler:frontend.java"))
api(project(":compiler:plugin-api"))
compileOnly(toolsJarApi())
compileOnly(project(":kotlin-annotation-processing-cli"))
@@ -28,11 +28,11 @@ dependencies {
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testCompile(projectTests(":compiler:tests-common"))
testCompile(project(":kotlin-annotation-processing-base"))
testCompile(projectTests(":kotlin-annotation-processing-base"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-annotation-processing-runtime"))
testApi(projectTests(":compiler:tests-common"))
testApi(project(":kotlin-annotation-processing-base"))
testApi(projectTests(":kotlin-annotation-processing-base"))
testApi(commonDep("junit:junit"))
testApi(project(":kotlin-annotation-processing-runtime"))
testCompileOnly(toolsJarApi())
testRuntimeOnly(toolsJar())
+1 -1
View File
@@ -6,7 +6,7 @@ plugins {
}
dependencies {
compile(kotlinStdlib())
api(kotlinStdlib())
}
project.updateJvmTarget("1.6")
@@ -19,13 +19,13 @@ dependencies {
runtimeOnly(kotlinStdlib())
testCompile(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(projectTests(":compiler:tests-compiler-utils"))
testApi(projectTests(":compiler:tests-common-new"))
testImplementation(projectTests(":generators:test-generator"))
testCompile(commonDep("junit:junit"))
testApi(commonDep("junit:junit"))
testApiJUnit5(vintageEngine = true)
testImplementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.2.2")
+5 -5
View File
@@ -15,12 +15,12 @@ dependencies {
compileOnly(project(":compiler:ir.backend.common"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
runtime(kotlinStdlib())
implementation(kotlinStdlib())
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:cli"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit:junit"))
testApi(project(":compiler:backend"))
testApi(project(":compiler:cli"))
testApi(projectTests(":compiler:tests-common"))
testApi(commonDep("junit:junit"))
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
@@ -9,7 +9,7 @@ val robolectricClasspath by configurations.creating
val parcelizeRuntimeForTests by configurations.creating
dependencies {
testCompile(intellijCoreDep()) { includeJars("intellij-core") }
testApi(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(project(":compiler:util"))
compileOnly(project(":compiler:plugin-api"))
@@ -22,18 +22,18 @@ dependencies {
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testCompile(project(":compiler:util"))
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:ir.backend.common"))
testCompile(project(":compiler:backend.jvm"))
testCompile(project(":compiler:cli"))
testCompile(project(":plugins:parcelize:parcelize-runtime"))
testCompile(project(":kotlin-android-extensions-runtime"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testApi(project(":compiler:util"))
testApi(project(":compiler:backend"))
testApi(project(":compiler:ir.backend.common"))
testApi(project(":compiler:backend.jvm"))
testApi(project(":compiler:cli"))
testApi(project(":plugins:parcelize:parcelize-runtime"))
testApi(project(":kotlin-android-extensions-runtime"))
testApi(projectTests(":compiler:tests-common"))
testApi(project(":kotlin-test:kotlin-test-jvm"))
testApi(commonDep("junit:junit"))
testRuntime(intellijPluginDep("junit"))
testRuntimeOnly(intellijPluginDep("junit"))
robolectricClasspath(commonDep("org.robolectric", "robolectric"))
robolectricClasspath("org.robolectric:android-all:4.4_r1-robolectric-1")
@@ -20,8 +20,8 @@ dependencies {
compile(intellijPluginDep("gradle"))
compileOnly(intellijPluginDep("java")) { includeJars("java-api", "java-impl") }
testCompile(projectTests(":idea"))
testCompile(projectTests(":plugins:parcelize:parcelize-compiler"))
testApi(projectTests(":idea"))
testApi(projectTests(":plugins:parcelize:parcelize-compiler"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
@@ -8,8 +8,8 @@ plugins {
project.updateJvmTarget("1.6")
dependencies {
compile(kotlinStdlib())
compile(project(":kotlin-android-extensions-runtime"))
api(kotlinStdlib())
api(project(":kotlin-android-extensions-runtime"))
compileOnly(commonDep("com.google.android", "android"))
}
@@ -18,7 +18,7 @@ val depenencyProjects = arrayOf(
dependencies {
depenencyProjects.forEach {
testCompile(projectTests(it))
testApi(projectTests(it))
jpsTest(project(it, configuration = "jpsTest"))
}
@@ -12,13 +12,13 @@ dependencies {
compileOnly(project(":compiler:plugin-api"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:cli"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit:junit"))
testApi(project(":compiler:backend"))
testApi(project(":compiler:cli"))
testApi(projectTests(":compiler:tests-common"))
testApi(commonDep("junit:junit"))
testCompileOnly(project(":kotlin-compiler"))
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testCompile(project(":kotlin-scripting-jvm-host-unshaded"))
testApi(project(":kotlin-scripting-jvm-host-unshaded"))
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency") }
}
@@ -13,9 +13,9 @@ dependencies {
compileOnly(project(":compiler:plugin-api"))
compileOnly(project(":compiler:cli"))
compileOnly(project(":compiler:ir.serialization.js"))
compile(project(":kotlin-scripting-common"))
compile(project(":kotlin-scripting-jvm"))
compile(kotlinStdlib())
api(project(":kotlin-scripting-common"))
api(project(":kotlin-scripting-jvm"))
api(kotlinStdlib())
compileOnly(project(":kotlin-reflect-api"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
@@ -25,14 +25,14 @@ dependencies {
runtimeOnly(project(":kotlin-reflect"))
testCompile(project(":compiler:frontend"))
testCompile(project(":compiler:plugin-api"))
testCompile(project(":compiler:util"))
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:cli-common"))
testCompile(project(":compiler:frontend.java"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit:junit"))
testApi(project(":compiler:frontend"))
testApi(project(":compiler:plugin-api"))
testApi(project(":compiler:util"))
testApi(project(":compiler:cli"))
testApi(project(":compiler:cli-common"))
testApi(project(":compiler:frontend.java"))
testApi(projectTests(":compiler:tests-common"))
testApi(commonDep("junit:junit"))
}
sourceSets {
@@ -16,23 +16,23 @@ dependencies {
compileOnly(project(":compiler:ir.tree.impl"))
compileOnly(project(":compiler:backend.jvm.entrypoint"))
compileOnly(project(":kotlin-reflect-api"))
compile(project(":kotlin-scripting-common"))
compile(project(":kotlin-scripting-js"))
compile(project(":kotlin-util-klib"))
compile(project(":kotlin-scripting-jvm"))
compile(project(":kotlin-scripting-compiler-impl"))
compile(kotlinStdlib())
api(project(":kotlin-scripting-common"))
api(project(":kotlin-scripting-js"))
api(project(":kotlin-util-klib"))
api(project(":kotlin-scripting-jvm"))
api(project(":kotlin-scripting-compiler-impl"))
api(kotlinStdlib())
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testCompile(project(":compiler:frontend"))
testCompile(project(":compiler:plugin-api"))
testCompile(project(":compiler:util"))
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:cli-common"))
testCompile(project(":compiler:frontend.java"))
testCompile(project(":compiler:backend.js"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit:junit"))
testApi(project(":compiler:frontend"))
testApi(project(":compiler:plugin-api"))
testApi(project(":compiler:util"))
testApi(project(":compiler:cli"))
testApi(project(":compiler:cli-common"))
testApi(project(":compiler:frontend.java"))
testApi(project(":compiler:backend.js"))
testApi(projectTests(":compiler:tests-common"))
testApi(commonDep("junit:junit"))
testImplementation(intellijCoreDep()) { includeJars("intellij-core") }
testImplementation(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
@@ -6,8 +6,10 @@ plugins {
project.updateJvmTarget("1.8")
val allTestsRuntime by configurations.creating
val testCompile by configurations
testCompile.extendsFrom(allTestsRuntime)
val testApi by configurations
testApi.extendsFrom(allTestsRuntime)
val embeddableTestRuntime by configurations.creating {
extendsFrom(allTestsRuntime)
attributes {
@@ -18,11 +20,11 @@ val embeddableTestRuntime by configurations.creating {
dependencies {
allTestsRuntime(commonDep("junit"))
testCompile(kotlinStdlib("jdk8"))
testCompile(project(":kotlin-scripting-ide-services-unshaded"))
testCompile(project(":kotlin-scripting-compiler"))
testCompile(project(":kotlin-scripting-dependencies-maven"))
testCompile(project(":compiler:cli"))
testApi(kotlinStdlib("jdk8"))
testApi(project(":kotlin-scripting-ide-services-unshaded"))
testApi(project(":kotlin-scripting-compiler"))
testApi(project(":kotlin-scripting-dependencies-maven"))
testApi(project(":compiler:cli"))
testImplementation(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
testImplementation(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core-jvm"))
@@ -30,9 +32,9 @@ dependencies {
testRuntimeOnly(commonDep("org.jetbrains.intellij.deps", "trove4j"))
testRuntimeOnly(project(":kotlin-scripting-ide-common")) { isTransitive = false }
embeddableTestRuntime(project(":kotlin-scripting-ide-services", configuration="runtimeElements"))
embeddableTestRuntime(project(":kotlin-scripting-compiler-impl-embeddable", configuration="runtimeElements"))
embeddableTestRuntime(project(":kotlin-scripting-dependencies", configuration="runtimeElements"))
embeddableTestRuntime(project(":kotlin-scripting-ide-services"))
embeddableTestRuntime(project(":kotlin-scripting-compiler-impl-embeddable"))
embeddableTestRuntime(project(":kotlin-scripting-dependencies"))
embeddableTestRuntime(project(":kotlin-scripting-dependencies-maven-all"))
embeddableTestRuntime(kotlinStdlib("jdk8"))
embeddableTestRuntime(testSourceSet.output)
@@ -11,11 +11,11 @@ project.updateJvmTarget("1.8")
publish()
dependencies {
compile(project(":kotlin-script-runtime"))
compile(kotlinStdlib())
api(project(":kotlin-script-runtime"))
api(kotlinStdlib())
compileOnly(project(":kotlin-scripting-ide-common"))
compile(project(":kotlin-scripting-common"))
compile(project(":kotlin-scripting-jvm"))
api(project(":kotlin-scripting-common"))
api(project(":kotlin-scripting-jvm"))
compileOnly(project(":kotlin-scripting-compiler"))
compileOnly(project(":compiler:cli"))
compileOnly(project(":kotlin-reflect-api"))