Do not configure dist task for every published module

This change avoids compiling kotlin-compiler-embeddable,
kotlin-gradle-plugin, and other gradle plugins,
when running `./gradlew dist`
This commit is contained in:
Alexey Tsvetkov
2018-01-30 02:29:50 +03:00
parent d5ee77eb07
commit 29d2679e8d
16 changed files with 33 additions and 14 deletions
+18 -14
View File
@@ -103,6 +103,24 @@ ext.signPom = { Project project, MavenDeployer deployer ->
}
}
ext.configureDist = { Project project ->
project.configure(project) {
configurations {
distJar
}
task dist(type: Copy, dependsOn: assemble) {
rename "-${java.util.regex.Pattern.quote(version)}", ''
into distLibDir
afterEvaluate {
project.artifacts {
distJar file: file("$distLibDir${File.separator}${archivesBaseName}.jar"), builtBy: "dist"
}
}
}
}
}
ext.configurePublishing = { Project project ->
project.configure(project) {
apply plugin: 'maven'
@@ -120,20 +138,6 @@ ext.configurePublishing = { Project project ->
}
}
configurations {
distJar
}
task dist(type: Copy, dependsOn: assemble) {
rename "-${java.util.regex.Pattern.quote(version)}", ''
into distLibDir
afterEvaluate {
project.artifacts {
distJar file: file("$distLibDir${File.separator}${archivesBaseName}.jar"), builtBy: "dist"
}
}
}
uploadArchives {
def prepareTask = rootProject.preparePublication
dependsOn prepareTask