Build maven-like stdlib sources artifacts during dist

This is needed to emulate gradle and maven like projects in plugin tests.
This commit is contained in:
Nikolay Krasko
2018-10-12 11:56:43 +03:00
parent ac2bc22f54
commit e3d930a6a1
3 changed files with 20 additions and 0 deletions
+1
View File
@@ -120,6 +120,7 @@ artifacts {
// TODO: call the "dist" task instead, once we need to publish kotlin-stdlib-common.jar with the compiler distribution
task distCommon(type: Copy) {
from(jar)
from(sourcesJar)
into "$distDir/common"
rename "-${java.util.regex.Pattern.quote(version)}", ''
}
+9
View File
@@ -116,17 +116,26 @@ task distSourcesJar(type: Jar) {
}
}
task distMavenSources(type: Copy) {
from(sourcesJar)
into "$distDir/maven"
rename "-${java.util.regex.Pattern.quote(version)}", ''
}
artifacts {
archives sourcesJar
archives javadocJar
}
dist {
dependsOn distMavenSources
[jar, distSourcesJar].forEach {
from(it) {
rename('dist-', '')
}
}
from (configurations.compile) {
include 'annotations*.jar'
}