FIR/UAST: make a fat jar with the base module

This commit is contained in:
Jinseong Jeon
2021-05-06 22:21:49 -07:00
committed by Ilya Kirillov
parent bab5d16001
commit cb0b80253c
2 changed files with 33 additions and 4 deletions
+18 -3
View File
@@ -1,13 +1,21 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
kotlin("jvm")
id("jps-compatible")
}
val shadows by configurations.creating {
isTransitive = false
}
configurations.getByName("compileOnly").extendsFrom(shadows)
configurations.getByName("testCompile").extendsFrom(shadows)
dependencies {
implementation(kotlinStdlib())
implementation(project(":compiler:psi"))
implementation(project(":compiler:light-classes"))
implementation(project(":plugins:uast-kotlin-base"))
shadows(project(":plugins:uast-kotlin-base"))
// BEWARE: UAST should not depend on IJ platform so that it can work in Android Lint CLI mode (where IDE is not available)
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
@@ -33,6 +41,15 @@ sourceSets {
"test" { projectDefault() }
}
noDefaultJar()
runtimeJar(tasks.register<ShadowJar>("shadowJar")) {
from(mainSourceSet.output)
configurations = listOf(shadows)
}
testsJar ()
projectTest(parallel = true) {
workingDir = rootDir
val useFirIdeaPlugin = kotlinBuildProperties.useFirIdeaPlugin
@@ -42,5 +59,3 @@ projectTest(parallel = true) {
}
}
}
testsJar ()
+15 -1
View File
@@ -1,9 +1,16 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
kotlin("jvm")
id("jps-compatible")
}
val shadows by configurations.creating {
isTransitive = false
}
configurations.getByName("compileOnly").extendsFrom(shadows)
configurations.getByName("testCompile").extendsFrom(shadows)
dependencies {
compile(kotlinStdlib())
compile(project(":core:util.runtime"))
@@ -11,7 +18,7 @@ dependencies {
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:light-classes"))
compile(project(":plugins:uast-kotlin-base"))
shadows(project(":plugins:uast-kotlin-base"))
// BEWARE: UAST should not depend on IJ platform so that it can work in Android Lint CLI mode (where IDE is not available)
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
@@ -64,6 +71,13 @@ sourceSets {
"test" { projectDefault() }
}
noDefaultJar()
runtimeJar(tasks.register<ShadowJar>("shadowJar")) {
from(mainSourceSet.output)
configurations = listOf(shadows)
}
testsJar {}
projectTest(parallel = true) {