Build: Centralize compiler dist build logic in :kotlin-compiler project
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user