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:
@@ -6,25 +6,16 @@ dependencies {
|
||||
compile project(':kotlin-stdlib-common')
|
||||
}
|
||||
|
||||
|
||||
|
||||
// common block
|
||||
|
||||
|
||||
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, 'Test')
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.kotlin
|
||||
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
}
|
||||
@@ -27,12 +27,7 @@ compileTestKotlin2Js {
|
||||
archivesBaseName = 'kotlin-test-js'
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'addDefaultImplementationEntries': true,
|
||||
'Implementation-Title': "${project.description ?: project.name}"
|
||||
}
|
||||
dependsOn classes
|
||||
from sourceSets.main.output
|
||||
manifestAttributes(manifest, project, 'Test')
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
|
||||
description = 'Kotlin Test JUnit'
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
configureJvmProject(project)
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-test:kotlin-test-jvm')
|
||||
compile('junit:junit:4.12')
|
||||
compile project(':kotlin-test:kotlin-test-jvm')
|
||||
compile('junit:junit:4.12')
|
||||
}
|
||||
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Implementation-Title': "${project.description ?: project.name}"
|
||||
}
|
||||
manifestAttributes(manifest, project, 'Test')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", project.name]
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", project.name]
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
}
|
||||
|
||||
@@ -3,23 +3,19 @@ description = 'Kotlin Test'
|
||||
|
||||
apply plugin: 'kotlin-platform-jvm'
|
||||
|
||||
configureJvmProject(project)
|
||||
|
||||
dependencies {
|
||||
implement project(':kotlin-test:kotlin-test-common')
|
||||
compile project(':kotlin-stdlib')
|
||||
testCompile('junit:junit:4.12')
|
||||
}
|
||||
|
||||
commonJvmProjectConfiguration(project)
|
||||
|
||||
archivesBaseName = 'kotlin-test'
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'addDefaultImplementationEntries': true,
|
||||
'Implementation-Title': "${project.description ?: project.name}"
|
||||
}
|
||||
dependsOn classes
|
||||
from sourceSets.main.output
|
||||
manifestAttributes(manifest, project, 'Test')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
Reference in New Issue
Block a user