Build: Rework runtimeJar helper and drop redundant configuration

#KTI-559
This commit is contained in:
Vyacheslav Gerasimov
2021-07-21 17:00:57 +03:00
parent ab146bd6d4
commit f91d6958a8
37 changed files with 104 additions and 185 deletions
@@ -1,15 +1,11 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.jvm.tasks.Jar
description = "Kotlin Scripting JSR-223 support"
plugins { java }
val packedJars by configurations.creating
plugins {
java
}
dependencies {
packedJars(project(":kotlin-scripting-jsr223-unshaded")) { isTransitive = false }
embedded(project(":kotlin-scripting-jsr223-unshaded")) { isTransitive = false }
runtimeOnly(project(":kotlin-script-runtime"))
runtimeOnly(kotlinStdlib())
runtimeOnly(project(":kotlin-scripting-common"))
@@ -26,12 +22,6 @@ sourceSets {
publish()
noDefaultJar()
runtimeJar(rewriteDepsToShadedCompiler(
tasks.register<ShadowJar>("shadowJar") {
from(packedJars)
}
))
runtimeJar(rewriteDefaultJarDepsToShadedCompiler())
sourcesJar()
javadocJar()
@@ -21,8 +21,8 @@ dependencies {
testRuntimeOnly(project(":kotlin-reflect"))
embeddableTestRuntime(commonDep("junit"))
embeddableTestRuntime(project(":kotlin-scripting-jsr223", configuration = "runtimeElements"))
embeddableTestRuntime(project(":kotlin-scripting-compiler-embeddable", configuration = "runtimeElements"))
embeddableTestRuntime(project(":kotlin-scripting-jsr223"))
embeddableTestRuntime(project(":kotlin-scripting-compiler-embeddable"))
embeddableTestRuntime(testSourceSet.output)
}
@@ -1,8 +1,8 @@
import org.gradle.jvm.tasks.Jar
description = "Kotlin Scripting JVM host (for using with embeddable compiler)"
plugins { java }
plugins {
java
}
dependencies {
embedded(project(":kotlin-scripting-jvm-host-unshaded")) { isTransitive = false }
@@ -21,8 +21,6 @@ sourceSets {
publish()
noDefaultJar()
runtimeJar(rewriteDefaultJarDepsToShadedCompiler())
sourcesJar()
javadocJar()