diff --git a/prepare/compiler/build.gradle.kts b/prepare/compiler/build.gradle.kts index abce3c3575c..70bbae988dc 100644 --- a/prepare/compiler/build.gradle.kts +++ b/prepare/compiler/build.gradle.kts @@ -1,8 +1,5 @@ -import java.io.File -import proguard.gradle.ProGuardTask import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer.COMPILE -import org.gradle.api.file.DuplicatesStrategy +import proguard.gradle.ProGuardTask description = "Kotlin Compiler" @@ -21,7 +18,6 @@ val fatJarContents by configurations.creating val fatJarContentsStripMetadata by configurations.creating val fatJarContentsStripServices by configurations.creating -val fatSourcesJarContents by configurations.creating val fatJar by configurations.creating val compilerJar by configurations.creating val runtimeJar by configurations.creating @@ -40,12 +36,6 @@ val outputJar = fileFrom(buildDir, "libs", "$compilerBaseName.jar") val compilerModules: Array by rootProject.extra -compilerModules.forEach { evaluationDependsOn(it) } - -val compiledModulesSources = compilerModules.map { - project(it).mainSourceSet.allSource -} - dependencies { compile(kotlinStdlib()) compile(project(":kotlin-script-runtime")) @@ -65,10 +55,6 @@ dependencies { fatJarContents(project(it)) { isTransitive = false } } - compiledModulesSources.forEach { - fatSourcesJarContents(it) - } - trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } } fatJarContents(kotlinBuiltins()) @@ -154,7 +140,11 @@ runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) { } sourcesJar { - from(fatSourcesJarContents) + from { + compilerModules.map { + project(it).mainSourceSet.allSource + } + } } javadocJar() diff --git a/prepare/compiler/build.gradle.kts.182 b/prepare/compiler/build.gradle.kts.182 index 19cf87a3e1f..0f3b6f62c32 100644 --- a/prepare/compiler/build.gradle.kts.182 +++ b/prepare/compiler/build.gradle.kts.182 @@ -1,8 +1,5 @@ -import java.io.File -import proguard.gradle.ProGuardTask import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer.COMPILE -import org.gradle.api.file.DuplicatesStrategy +import proguard.gradle.ProGuardTask description = "Kotlin Compiler" @@ -21,7 +18,6 @@ val fatJarContents by configurations.creating val fatJarContentsStripMetadata by configurations.creating val fatJarContentsStripServices by configurations.creating -val fatSourcesJarContents by configurations.creating val fatJar by configurations.creating val compilerJar by configurations.creating val runtimeJar by configurations.creating @@ -40,12 +36,6 @@ val outputJar = fileFrom(buildDir, "libs", "$compilerBaseName.jar") val compilerModules: Array by rootProject.extra -compilerModules.forEach { evaluationDependsOn(it) } - -val compiledModulesSources = compilerModules.map { - project(it).mainSourceSet.allSource -} - dependencies { compile(kotlinStdlib()) compile(project(":kotlin-script-runtime")) @@ -65,10 +55,6 @@ dependencies { fatJarContents(project(it)) { isTransitive = false } } - compiledModulesSources.forEach { - fatSourcesJarContents(it) - } - trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } } fatJarContents(kotlinBuiltins()) @@ -86,17 +72,9 @@ dependencies { !(it.startsWith("jdom") || it.startsWith("log4j") || it.startsWith("trove4j")) } } - when { - Platform[181].orLower() -> { - fatJarContents(intellijDep()) { includeJars("jna-platform", "lz4-java-1.3") } - fatJarContentsStripMetadata(intellijDep()) { includeJars("oro-2.0.8", "jdom", "log4j") } - } - else -> { - fatJarContents(intellijDep()) { includeJars("jna-platform", "lz4-1.3.0") } - fatJarContentsStripMetadata(intellijDep()) { includeJars("oro-2.0.8", "jdom", "log4j") } - } - } + fatJarContents(intellijDep()) { includeJars("jna-platform", "lz4-1.3.0") } fatJarContentsStripServices(jpsStandalone()) { includeJars("jps-model") } + fatJarContentsStripMetadata(intellijDep()) { includeJars("oro-2.0.8", "jdom", "log4j" ) } } publish() @@ -162,7 +140,11 @@ runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) { } sourcesJar { - from(fatSourcesJarContents) + from { + compilerModules.map { + project(it).mainSourceSet.allSource + } + } } javadocJar() diff --git a/prepare/compiler/build.gradle.kts.as34 b/prepare/compiler/build.gradle.kts.as34 index bbb75489191..0f3b6f62c32 100644 --- a/prepare/compiler/build.gradle.kts.as34 +++ b/prepare/compiler/build.gradle.kts.as34 @@ -1,8 +1,5 @@ -import java.io.File -import proguard.gradle.ProGuardTask import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer.COMPILE -import org.gradle.api.file.DuplicatesStrategy +import proguard.gradle.ProGuardTask description = "Kotlin Compiler" @@ -21,7 +18,6 @@ val fatJarContents by configurations.creating val fatJarContentsStripMetadata by configurations.creating val fatJarContentsStripServices by configurations.creating -val fatSourcesJarContents by configurations.creating val fatJar by configurations.creating val compilerJar by configurations.creating val runtimeJar by configurations.creating @@ -40,12 +36,6 @@ val outputJar = fileFrom(buildDir, "libs", "$compilerBaseName.jar") val compilerModules: Array by rootProject.extra -compilerModules.forEach { evaluationDependsOn(it) } - -val compiledModulesSources = compilerModules.map { - project(it).mainSourceSet.allSource -} - dependencies { compile(kotlinStdlib()) compile(project(":kotlin-script-runtime")) @@ -65,10 +55,6 @@ dependencies { fatJarContents(project(it)) { isTransitive = false } } - compiledModulesSources.forEach { - fatSourcesJarContents(it) - } - trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } } fatJarContents(kotlinBuiltins()) @@ -154,7 +140,11 @@ runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) { } sourcesJar { - from(fatSourcesJarContents) + from { + compilerModules.map { + project(it).mainSourceSet.allSource + } + } } javadocJar()