Build java9 modular artifacts under 'modular' classifier
Provide additional modular artifacts as a workaround for KT-21266 Update module-info declarations: - add new packages - add exports and opens for internal PlatformImplementations - remove exports of kotlin.coroutines.experimental.* #KT-27919 Fixed
This commit is contained in:
@@ -44,8 +44,7 @@ jar {
|
||||
|
||||
task java9Jar(type: Jar) {
|
||||
classifier = "java9"
|
||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||
// from sourceSets.java9.output
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
@@ -109,7 +109,7 @@ class KotlinModuleShadowTransformer(private val logger: Logger) : Transformer {
|
||||
val reflectShadowJar by task<ShadowJar> {
|
||||
classifier = "shadow"
|
||||
version = null
|
||||
callGroovy("manifestAttributes", manifest, project, "Main", true)
|
||||
callGroovy("manifestAttributes", manifest, project, "Main" /*true*/)
|
||||
|
||||
from(project(":core:descriptors.jvm").mainSourceSet.resources) {
|
||||
include("META-INF/services/**")
|
||||
@@ -191,6 +191,16 @@ val sourcesJar = sourcesJar(sourceSet = null) {
|
||||
val result by task<Jar> {
|
||||
dependsOn(proguard)
|
||||
from(zipTree(file(proguardOutput)))
|
||||
// from(zipTree(reflectShadowJar.archivePath)) {
|
||||
// include("META-INF/versions/**")
|
||||
// }
|
||||
callGroovy("manifestAttributes", manifest, project, "Main" /*true*/)
|
||||
}
|
||||
|
||||
val modularJar by task<Jar> {
|
||||
dependsOn(proguard)
|
||||
classifier = "modular"
|
||||
from(zipTree(file(proguardOutput)))
|
||||
from(zipTree(reflectShadowJar.archivePath)) {
|
||||
include("META-INF/versions/**")
|
||||
}
|
||||
@@ -208,12 +218,13 @@ artifacts {
|
||||
val artifactJar = mapOf(
|
||||
"file" to result.outputs.files.single(),
|
||||
"builtBy" to result,
|
||||
"name" to property("archivesBaseName")
|
||||
"name" to base.archivesBaseName
|
||||
)
|
||||
|
||||
add(mainJar.name, artifactJar)
|
||||
add("runtime", artifactJar)
|
||||
add("archives", artifactJar)
|
||||
add("archives", modularJar)
|
||||
}
|
||||
|
||||
javadocJar()
|
||||
|
||||
Reference in New Issue
Block a user