Put common sources into kotlin-stdlib-sources going into dist

This commit is contained in:
Ilya Gorbunov
2018-04-08 21:37:23 +03:00
parent 136e6b64f2
commit 2826733e87
3 changed files with 47 additions and 2 deletions
+5
View File
@@ -55,8 +55,13 @@ task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.kotlin
}
configurations {
sources
}
artifacts {
archives sourcesJar
sources sourcesJar
archives javadocJar
}
+20 -1
View File
@@ -63,9 +63,11 @@ sourceSets {
configurations {
merger
commonSources
}
dependencies {
expectedBy project(":kotlin-stdlib-common")
commonSources project(path: ":kotlin-stdlib-common", configuration: "sources")
testCompile project(':kotlin-test:kotlin-test-js')
merger project(":tools:kotlin-stdlib-js-merger")
}
@@ -275,6 +277,22 @@ task sourcesJar(type: Jar, dependsOn: classes) {
}
}
task distSourcesJar(type: Jar) {
dependsOn(sourcesJar, configurations.commonSources)
baseName = 'dist-kotlin-stdlib-js'
version = null
classifier = 'sources'
duplicatesStrategy = DuplicatesStrategy.FAIL
from zipTree(sourcesJar.outputs.files.singleFile)
from(zipTree(configurations.commonSources.singleFile)) {
it.includeEmptyDirs = false
exclude 'META-INF/*'
into 'common'
}
}
artifacts {
runtime mergedJar
@@ -290,7 +308,8 @@ task distJs(type: Copy) {
dist {
dependsOn distJs
[mergedJar, sourcesJar].forEach {
[mergedJar, distSourcesJar].forEach {
rename("dist-", "")
from(it)
// legacy
from(it) {
+22 -1
View File
@@ -46,9 +46,15 @@ sourceSets {
}
}
configurations {
commonSources
}
dependencies {
expectedBy project(":kotlin-stdlib-common")
commonSources project(path: ":kotlin-stdlib-common", configuration: "sources")
compile group: 'org.jetbrains', name: 'annotations', version:'13.0'
testCompile project(':kotlin-test:kotlin-test-junit')
@@ -79,13 +85,28 @@ sourcesJar {
from "${rootDir}/core/builtins/native"
}
task distSourcesJar(type: Jar) {
dependsOn(sourcesJar, configurations.commonSources)
baseName = 'dist-kotlin-stdlib'
version = null
classifier = 'sources'
duplicatesStrategy = DuplicatesStrategy.FAIL
from zipTree(sourcesJar.outputs.files.singleFile)
from(zipTree(configurations.commonSources.singleFile)) {
it.includeEmptyDirs = false
exclude 'META-INF/*'
into 'common'
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
dist {
[distJar, sourcesJar].forEach {
[distJar, distSourcesJar].forEach {
from(it) {
rename('dist-', '')
}