Build default jvm core libraries artifacts as modular
#KT-21266
This commit is contained in:
@@ -23,9 +23,10 @@ dependencies {
|
||||
archivesBaseName = 'kotlin-test'
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Test' /*true*/)
|
||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||
// from sourceSets.java9.output
|
||||
manifestAttributes(manifest, project, 'Test', true)
|
||||
if (includeJava9) {
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
}
|
||||
|
||||
task modularJar(type: Jar) {
|
||||
@@ -34,9 +35,6 @@ task modularJar(type: Jar) {
|
||||
classifier = 'modular'
|
||||
|
||||
from zipTree(jar.outputs.files.singleFile)
|
||||
if (includeJava9) {
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
@@ -204,7 +204,10 @@ val result by task<Jar> {
|
||||
from {
|
||||
zipTree(intermediate.get().singleOutputFile())
|
||||
}
|
||||
callGroovy("manifestAttributes", manifest, project, "Main")
|
||||
from(zipTree(provider { reflectShadowJar.get().archiveFile.get().asFile })) {
|
||||
include("META-INF/versions/**")
|
||||
}
|
||||
callGroovy("manifestAttributes", manifest, project, "Main", true)
|
||||
}
|
||||
|
||||
val modularJar by task<Jar> {
|
||||
|
||||
@@ -45,9 +45,8 @@ dependencies {
|
||||
}
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Main' /*true*/)
|
||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||
// from sourceSets.java9.output
|
||||
manifestAttributes(manifest, project, 'Main', true)
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
|
||||
task modularJar(type: Jar) {
|
||||
@@ -56,7 +55,6 @@ task modularJar(type: Jar) {
|
||||
classifier = 'modular'
|
||||
|
||||
from zipTree(jar.outputs.files.singleFile)
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,9 +39,8 @@ sourceSets {
|
||||
}
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Main' /*true*/)
|
||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||
// from sourceSets.java9.output
|
||||
manifestAttributes(manifest, project, 'Main', true)
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
|
||||
task modularJar(type: Jar) {
|
||||
@@ -50,7 +49,6 @@ task modularJar(type: Jar) {
|
||||
classifier = 'modular'
|
||||
|
||||
from zipTree(jar.outputs.files.singleFile)
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,12 +58,11 @@ dependencies {
|
||||
|
||||
jar {
|
||||
dependsOn(configurations.builtins)
|
||||
manifestAttributes(manifest, project, 'Main' /*true*/)
|
||||
manifestAttributes(manifest, project, 'Main', true)
|
||||
from {
|
||||
zipTree(configurations.builtins.singleFile)
|
||||
}
|
||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||
// from sourceSets.java9.output
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
@@ -90,11 +89,7 @@ task modularJar(type: Jar) {
|
||||
manifestAttributes(manifest, project, 'Main', true)
|
||||
classifier = 'modular'
|
||||
|
||||
from zipTree(jar.outputs.files.singleFile).matching {
|
||||
// Beware of Gradle problem: changing exclude spec doesn't affect Jar task up-to-dateness
|
||||
exclude('kotlin/native/**')
|
||||
}
|
||||
from sourceSets.java9.output
|
||||
from zipTree(jar.outputs.files.singleFile)
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
Reference in New Issue
Block a user