Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
This commit is contained in:
@@ -6,9 +6,9 @@ configurations {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("org.jetbrains.kotlinx:binary-compatibility-validator:0.7.1")
|
||||
api("org.jetbrains.kotlinx:binary-compatibility-validator:0.7.1")
|
||||
|
||||
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||
testApi project(':kotlin-test:kotlin-test-junit')
|
||||
|
||||
testArtifacts project(':kotlin-stdlib')
|
||||
testArtifacts project(':kotlin-stdlib-jdk7')
|
||||
|
||||
@@ -5,9 +5,9 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(gradleApi())
|
||||
compile(project(":kotlin-gradle-plugin-api"))
|
||||
compile(project(":native:kotlin-native-utils"))
|
||||
api(gradleApi())
|
||||
api(project(":kotlin-gradle-plugin-api"))
|
||||
api(project(":native:kotlin-native-utils"))
|
||||
}
|
||||
|
||||
val generateMppTargetContainerWithPresets by generator(
|
||||
|
||||
@@ -9,7 +9,9 @@ import org.gradle.jvm.tasks.Jar
|
||||
|
||||
description = "Shaded test jars from compiler for Gradle integration tests"
|
||||
|
||||
plugins { `java` }
|
||||
plugins {
|
||||
`java-library`
|
||||
}
|
||||
|
||||
val packedJars by configurations.creating
|
||||
|
||||
@@ -22,7 +24,7 @@ val projectsToInclude = listOf(
|
||||
|
||||
dependencies {
|
||||
for (projectName in projectsToInclude) {
|
||||
compile(projectTests(projectName)) { isTransitive = false }
|
||||
api(projectTests(projectName)) { isTransitive = false }
|
||||
packedJars(projectTests(projectName)) { isTransitive = false }
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ dependencies {
|
||||
}
|
||||
|
||||
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
||||
configurations.compile.get().exclude("com.android.tools.external.com-intellij", "intellij-core")
|
||||
configurations.api.get().exclude("com.android.tools.external.com-intellij", "intellij-core")
|
||||
}
|
||||
|
||||
noDefaultJar()
|
||||
|
||||
@@ -6,13 +6,13 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile(project(":kotlin-main-kts"))
|
||||
testApi(project(":kotlin-main-kts"))
|
||||
testCompileOnly(project(":compiler:cli"))
|
||||
testCompileOnly(project(":kotlin-scripting-jvm-host-unshaded"))
|
||||
testCompile(kotlinStdlib("jdk8"))
|
||||
testCompile(commonDep("junit"))
|
||||
testCompile(projectTests(":kotlin-scripting-compiler")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-compiler-embeddable"))
|
||||
testApi(kotlinStdlib("jdk8"))
|
||||
testApi(commonDep("junit"))
|
||||
testApi(projectTests(":kotlin-scripting-compiler")) { isTransitive = false }
|
||||
testImplementation(project(":kotlin-compiler-embeddable"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -17,7 +17,8 @@ val localPackagesToRelocate =
|
||||
|
||||
val proguardLibraryJars by configurations.creating {
|
||||
attributes {
|
||||
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_API))
|
||||
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
|
||||
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +121,7 @@ val resultJar by task<Jar> {
|
||||
}
|
||||
}
|
||||
|
||||
addArtifact("runtime", resultJar)
|
||||
addArtifact("apiElements", resultJar)
|
||||
addArtifact("runtimeElements", resultJar)
|
||||
addArtifact("archives", resultJar)
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ dependencies {
|
||||
compileOnly project(':compiler')
|
||||
compileOnly project(':kotlin-noarg-compiler-plugin')
|
||||
|
||||
testCompile gradleApi()
|
||||
testCompile "junit:junit:4.12"
|
||||
testApi gradleApi()
|
||||
testApi "junit:junit:4.12"
|
||||
|
||||
embedded(project(":kotlin-noarg-compiler-plugin")) { transitive = false }
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ dependencies {
|
||||
compileOnly project(':compiler')
|
||||
compileOnly project(':kotlin-sam-with-receiver-compiler-plugin')
|
||||
|
||||
testCompile gradleApi()
|
||||
testCompile "junit:junit:4.12"
|
||||
testApi gradleApi()
|
||||
testApi "junit:junit:4.12"
|
||||
|
||||
embedded(project(":kotlin-sam-with-receiver-compiler-plugin")) { transitive = false }
|
||||
}
|
||||
|
||||
@@ -7,29 +7,29 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(kotlinStdlib())
|
||||
compile(project(":kotlin-script-runtime"))
|
||||
compile(project(":kotlin-scripting-jvm"))
|
||||
compile(commonDep("org.jetbrains.intellij.deps", "trove4j"))
|
||||
api(kotlinStdlib())
|
||||
api(project(":kotlin-script-runtime"))
|
||||
api(project(":kotlin-scripting-jvm"))
|
||||
api(commonDep("org.jetbrains.intellij.deps", "trove4j"))
|
||||
compileOnly(project(":compiler:cli"))
|
||||
compileOnly(project(":daemon-common"))
|
||||
compileOnly(project(":kotlin-scripting-compiler"))
|
||||
compile(projectRuntimeJar(":kotlin-daemon-client"))
|
||||
api(projectRuntimeJar(":kotlin-daemon-client"))
|
||||
compileOnly("org.jetbrains.kotlin:jcabi-aether:1.0-dev-3")
|
||||
compileOnly("org.sonatype.aether:aether-api:1.13.1")
|
||||
compileOnly("org.apache.maven:maven-core:3.0.3")
|
||||
testCompileOnly(project(":compiler:cli"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
||||
testRuntime(project(":kotlin-reflect"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":kotlin-scripting-compiler"))
|
||||
testApi(project(":kotlin-test:kotlin-test-junit"))
|
||||
testImplementation(project(":kotlin-reflect"))
|
||||
testApi(commonDep("junit:junit"))
|
||||
testApi(project(":kotlin-scripting-compiler"))
|
||||
testRuntimeOnly(project(":kotlin-compiler"))
|
||||
testRuntime("org.jetbrains.kotlin:jcabi-aether:1.0-dev-3")
|
||||
testRuntime("org.sonatype.aether:aether-api:1.13.1")
|
||||
testRuntime("org.apache.maven:maven-core:3.0.3")
|
||||
testImplementation("org.jetbrains.kotlin:jcabi-aether:1.0-dev-3")
|
||||
testImplementation("org.sonatype.aether:aether-api:1.13.1")
|
||||
testImplementation("org.apache.maven:maven-core:3.0.3")
|
||||
compileOnly(intellijDep()) { includeJars("util") }
|
||||
testCompile(intellijDep()) { includeJars("platform-api", "util") }
|
||||
testCompile(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
testApi(intellijDep()) { includeJars("platform-api", "util") }
|
||||
testApi(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ pill {
|
||||
|
||||
dependencies {
|
||||
compileOnly project(':kotlin-gradle-plugin')
|
||||
compile project(':kotlin-gradle-plugin-api')
|
||||
api project(':kotlin-gradle-plugin-api')
|
||||
|
||||
compileOnly kotlinStdlib()
|
||||
compileOnly project(path: ':kotlin-compiler-embeddable', configuration: 'runtimeJar')
|
||||
|
||||
@@ -8,8 +8,8 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$bootstrapKotlinVersion"
|
||||
compile "org.jetbrains.kotlin:kotlin-reflect:$bootstrapKotlinVersion"
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib:$bootstrapKotlinVersion"
|
||||
api "org.jetbrains.kotlin:kotlin-reflect:$bootstrapKotlinVersion"
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
|
||||
@@ -10,10 +10,6 @@ dependencies {
|
||||
compileOnly kotlinStdlib()
|
||||
}
|
||||
|
||||
configurations {
|
||||
mainJar
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
@@ -26,10 +22,6 @@ jar {
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
mainJar jar
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
configureJavadocJar()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user