Adopt Kotlin JPS plugin modules Gradle model to kotlin/master

Recenlty, Kotlin repository started using Gradle 7.1.
Deprecated `compile`/`testCompile` Gradle API were dropped in that release
This commit is contained in:
Nikita Bobko
2021-12-29 18:47:28 +01:00
parent 3b1e4f63a0
commit fc9000d460
3 changed files with 69 additions and 42 deletions
@@ -16,6 +16,9 @@ fun Project.jpsModel() = "com.jetbrains.intellij.platform:jps-model:$intellijVer
fun Project.jpsModelSerialization() = "com.jetbrains.intellij.platform:jps-model-serialization:$intellijVersion"
fun Project.jpsModelImpl() = "com.jetbrains.intellij.platform:jps-model-impl:$intellijVersion"
fun Project.jpsBuildTest() = "com.jetbrains.intellij.idea:jps-build-test:$intellijVersion"
fun Project.jpsBuild() = "com.jetbrains.intellij.platform:jps-build:$intellijVersion"
fun Project.testFramework() = "com.jetbrains.intellij.platform:test-framework:$intellijVersion"
fun Project.devKitJps() = "com.jetbrains.intellij.devkit:devkit-jps:$intellijVersion"
fun Project.intellijPlatformUtil() = "com.jetbrains.intellij.platform:util:$intellijVersion"
fun Project.intellijJavaRt() = "com.jetbrains.intellij.java:java-rt:$intellijVersion"
fun Project.intellijAnalysis() = "com.jetbrains.intellij.platform:analysis:$intellijVersion"
+13 -9
View File
@@ -5,17 +5,21 @@ plugins {
}
dependencies {
compile(kotlinStdlib())
api(kotlinStdlib())
compileOnly(project(":kotlin-reflect-api"))
compile(project(":compiler:util"))
compile(project(":compiler:cli-common"))
compile(project(":compiler:frontend.java"))
compile(project(":js:js.frontend"))
compile(project(":native:frontend.native"))
compileOnly(intellijDep())
compileOnly(jpsStandalone()) { includeJars("jps-model") }
testImplementation(project(":kotlin-reflect"))
api(project(":compiler:util"))
api(project(":compiler:cli-common"))
api(project(":compiler:frontend.java"))
api(project(":js:js.frontend"))
api(project(":native:frontend.native"))
compileOnly(intellijCore())
compileOnly(jpsModel())
compileOnly(jpsModelImpl())
compileOnly(jpsModelSerialization())
testCompile(commonDep("junit:junit"))
testApi(jpsModelSerialization())
testApi(commonDependency("junit:junit"))
}
sourceSets {
+53 -33
View File
@@ -15,48 +15,68 @@ val generateTests by generator("org.jetbrains.kotlin.jps.GenerateJpsPluginTestsK
}
dependencies {
compile(project(":kotlin-build-common"))
compile(project(":core:descriptors"))
compile(project(":core:descriptors.jvm"))
compile(project(":kotlin-compiler-runner"))
compile(project(":daemon-common"))
compile(project(":daemon-common-new"))
compile(projectRuntimeJar(":kotlin-daemon-client"))
compile(projectRuntimeJar(":kotlin-daemon"))
api(project(":kotlin-build-common"))
api(project(":core:descriptors"))
api(project(":core:descriptors.jvm"))
api(project(":kotlin-compiler-runner-unshaded"))
api(project(":kotlin-compiler-runner"))
api(project(":daemon-common"))
api(project(":daemon-common-new"))
api(project(":kotlin-daemon-client"))
api(project(":kotlin-daemon"))
testImplementation(projectTests(":generators:test-generator"))
compile(project(":compiler:frontend.java"))
compile(project(":js:js.frontend"))
compile(projectRuntimeJar(":kotlin-preloader"))
compile(project(":jps:jps-common"))
compileOnly(intellijDep()) {
includeJars("jdom", "trove4j", "jps-model", "platform-api", "util", "asm-all", rootProject = rootProject)
}
compileOnly(jpsStandalone()) { includeJars("jps-builders", "jps-builders-6") }
api(project(":compiler:frontend.java"))
api(project(":js:js.frontend"))
api(project(":kotlin-preloader"))
api(project(":jps:jps-common"))
compileOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil"))
compileOnly(intellijCore())
compileOnly(jpsModel())
compileOnly(jpsModelImpl())
compileOnly(jpsBuild())
compileOnly(jpsModelSerialization())
testApi(jpsModel())
// testFramework includes too many unnecessary dependencies. Here we manually list all we need to successfully run JPS tests
testApi(testFramework()) { isTransitive = false }
testApi("com.jetbrains.intellij.platform:test-framework-core:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:analysis-impl:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:boot:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:analysis:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:project-model:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:object-serializer:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:code-style:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:ide-impl:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:ide:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:util-ui:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:concurrency:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:editor:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:core-ui:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:lang:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:lang-impl:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:util-ex:$intellijVersion") { isTransitive = false }
testCompileOnly(project(":kotlin-reflect-api"))
testCompile(project(":compiler:incremental-compilation-impl"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":compiler:incremental-compilation-impl"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":kotlin-build-common"))
testApi(project(":compiler:incremental-compilation-impl"))
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:incremental-compilation-impl"))
testApi(commonDependency("junit:junit"))
testApi(project(":kotlin-test:kotlin-test-jvm"))
testApi(projectTests(":kotlin-build-common"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
testCompileOnly(jpsStandalone()) { includeJars("jps-builders", "jps-builders-6") }
Ide.IJ {
testCompile(intellijDep("devkit"))
}
testCompileOnly(jpsBuild())
testApi(devKitJps())
testCompile(intellijDep())
testApi(intellijCore())
testCompile(jpsBuildTest())
testApi(jpsBuildTest())
compilerModules.forEach {
testRuntime(project(it))
testRuntimeOnly(project(it))
}
testRuntimeOnly(intellijPluginDep("java"))
testRuntimeOnly(toolsJar())
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":kotlin-script-runtime"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":kotlin-script-runtime"))
}
sourceSets {