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
@@ -3,18 +3,12 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.jvm.tasks.Jar
description = "Shaded test jars from compiler for Gradle integration tests"
plugins {
`java-library`
}
val packedJars by configurations.creating
val projectsToInclude = listOf(
":compiler:test-infrastructure-utils",
":compiler:tests-common",
@@ -25,15 +19,10 @@ val projectsToInclude = listOf(
dependencies {
for (projectName in projectsToInclude) {
api(projectTests(projectName)) { isTransitive = false }
packedJars(projectTests(projectName)) { isTransitive = false }
embedded(projectTests(projectName)) { isTransitive = false }
}
packedJars(intellijDep()) { includeJars("idea_rt") }
embedded(intellijDep()) { includeJars("idea_rt") }
}
runtimeJar(rewriteDepsToShadedCompiler(
tasks.register<ShadowJar>("shadowJar") {
from(packedJars)
}
))
runtimeJar(rewriteDefaultJarDepsToShadedCompiler())