Refactor build to make manifest specification less error-prone.
Use legacy implementation title in manifest of JS stdlib for now. Change the way common jvm project configurations is applied. Add missing artifacts to common libraries.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
description = 'Kotlin Standard Library'
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
configureJvmProject(project)
|
||||
|
||||
sourceSets {
|
||||
builtins {
|
||||
java {
|
||||
@@ -39,7 +43,7 @@ task originalStdlibJar(type: Jar) {
|
||||
}
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Core')
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
from("${rootDir}/../dist/builtins")
|
||||
from sourceSets.builtins.output
|
||||
}
|
||||
|
||||
@@ -29,20 +29,16 @@ compileKotlinCommon {
|
||||
*/
|
||||
|
||||
jar {
|
||||
baseName = project.name
|
||||
manifest {
|
||||
attributes 'Implementation-Vendor': 'JetBrains',
|
||||
'Implementation-Title': "${project.description ?: project.name}", // TODO: project.description is resolved after evaluating this, therefore this attribute is repeated in the projects; seek for a solution
|
||||
'Implementation-Version': version,
|
||||
'Build-Jdk': System.getProperty('java.version'),
|
||||
'Built-By': 'JetBrains'
|
||||
}
|
||||
from("${rootDir}/../dist/kotlinc/build.txt") { into("META-INF/") }
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
}
|
||||
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.kotlin
|
||||
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
description = 'Kotlin Standard Library JRE 7 extension'
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
configureJvmProject(project)
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-stdlib')
|
||||
@@ -23,7 +26,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Core')
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
description = 'Kotlin Standard Library JRE 8 extension'
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
configureJvmProject(project)
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-stdlib')
|
||||
compile project(':kotlin-stdlib-jre7')
|
||||
@@ -24,7 +28,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Core')
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
@@ -188,6 +188,15 @@ jar {
|
||||
|
||||
task mergedJar(type: Jar, dependsOn: classes) {
|
||||
classifier = null
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
|
||||
// TODO: Use standard implementation title after js stdlib detector becomes more flexible
|
||||
Properties properties = new Properties()
|
||||
new File("${rootDir}/../resources/kotlinManifest.properties").withInputStream {
|
||||
properties.load(it)
|
||||
}
|
||||
manifest.attributes 'Implementation-Title' : properties."manifest.impl.title.kotlin.javascript.stdlib"
|
||||
|
||||
includeEmptyDirs false
|
||||
duplicatesStrategy DuplicatesStrategy.EXCLUDE
|
||||
from jsOutputFile
|
||||
|
||||
Reference in New Issue
Block a user