Build common standard library headers and kotlin-test (common and jvm) as multiplatform projects.
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
description = 'Kotlin Test Common'
|
||||
|
||||
apply plugin: 'kotlin-platform-common'
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-stdlib-common')
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
test {
|
||||
kotlin {
|
||||
srcDir 'src/test'
|
||||
exclude '**'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// common block
|
||||
|
||||
compileKotlinCommon.compilerJarFile = bootstrapCompilerFile
|
||||
|
||||
|
||||
|
||||
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/") }
|
||||
}
|
||||
|
||||
|
||||
// TODO: use dokka instead?
|
||||
javadoc {
|
||||
failOnError = false
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.kotlin
|
||||
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn:javadoc) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package kotlin.jvm
|
||||
|
||||
@Suppress("HEADER_WITHOUT_IMPLEMENTATION")
|
||||
@Target(AnnotationTarget.FILE)
|
||||
internal header annotation class JvmMultifileClass
|
||||
|
||||
@Suppress("HEADER_WITHOUT_IMPLEMENTATION")
|
||||
@Target(AnnotationTarget.FILE)
|
||||
internal header annotation class JvmName(val name: String)
|
||||
@@ -2,25 +2,10 @@
|
||||
description = 'Kotlin Test JUnit'
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-runtime')
|
||||
compile project(':kotlin-test-parent:kotlin-test')
|
||||
compile project(':kotlin-test:kotlin-test-jvm')
|
||||
compile('junit:junit:4.12')
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
srcDir 'src/main/kotlin'
|
||||
srcDir 'src/main/kotlin.jvm'
|
||||
}
|
||||
}
|
||||
test {
|
||||
kotlin {
|
||||
srcDir 'src/test/kotlin'
|
||||
srcDir 'src/test/kotlin.jvm'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
|
||||
description = 'Kotlin Test'
|
||||
|
||||
apply plugin: 'kotlin-platform-jvm'
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-runtime')
|
||||
implement project(':kotlin-test:kotlin-test-common')
|
||||
compile project(':kotlin-stdlib')
|
||||
testCompile('junit:junit:4.12')
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
srcDir 'src/main/kotlin'
|
||||
srcDir 'src/main/kotlin.jvm'
|
||||
}
|
||||
}
|
||||
test {
|
||||
kotlin {
|
||||
srcDir 'src/test/kotlin'
|
||||
srcDir 'src/test/kotlin.jvm'
|
||||
}
|
||||
}
|
||||
}
|
||||
commonJvmProjectConfiguration(project)
|
||||
|
||||
archivesBaseName = 'kotlin-test'
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
@@ -28,9 +20,6 @@ jar {
|
||||
}
|
||||
dependsOn classes
|
||||
from sourceSets.main.output
|
||||
exclude('kotlin/internal/OnlyInputTypes*')
|
||||
exclude('kotlin/internal/InlineOnly*')
|
||||
exclude('kotlin/internal')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@@ -39,7 +28,8 @@ artifacts {
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", "${project.name}".toString()]
|
||||
// TODO: Why "-Xmulti-platfrom" ?
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-module-name", project.archivesBaseName]
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
Reference in New Issue
Block a user