Build: Centralize compiler dist build logic in :kotlin-compiler project

This commit is contained in:
Vyacheslav Gerasimov
2019-06-19 19:02:40 +03:00
parent 62126d0e43
commit db3b01d2d4
52 changed files with 270 additions and 305 deletions
+8 -23
View File
@@ -6,9 +6,12 @@ apply plugin: 'pill-configurable'
archivesBaseName = 'kotlin-stdlib'
configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
configurations {
distSources
}
pill {
importAsLibrary = true
}
@@ -105,10 +108,10 @@ sourcesJar {
task distSourcesJar(type: Jar) {
dependsOn(sourcesJar, configurations.commonSources)
baseName = 'dist-kotlin-stdlib'
version = null
destinationDirectory = file("$buildDir/lib/dist")
classifier = 'sources'
duplicatesStrategy = DuplicatesStrategy.FAIL
from zipTree(sourcesJar.outputs.files.singleFile)
from(zipTree(configurations.commonSources.singleFile)) {
@@ -118,12 +121,6 @@ task distSourcesJar(type: Jar) {
}
}
task distMavenSources(type: Copy) {
from(sourcesJar)
into "$distDir/maven"
rename "-${java.util.regex.Pattern.quote(version)}", ''
}
task modularJar(type: Jar) {
dependsOn(jar)
manifestAttributes(manifest, project, 'Main', true)
@@ -138,25 +135,13 @@ task modularJar(type: Jar) {
artifacts {
archives sourcesJar
sources sourcesJar
distSources distSourcesJar
archives modularJar
}
javadocJar()
dist {
dependsOn distMavenSources
[jar, distSourcesJar].forEach {
from(it) {
rename('dist-', '')
}
}
from (configurations.compile) {
include 'annotations*.jar'
}
}
task dexMethodCount(type: DexMethodCount) {
from jar
ownPackages = ['kotlin']