KT-54452 Use js-ir sources for building stdlib-js sources.jar and API docs
This commit is contained in:
committed by
Space Team
parent
cd07eba25c
commit
9892a49c4b
@@ -174,3 +174,31 @@ val packFullRuntimeKLib by tasks.registering(Jar::class) {
|
|||||||
archiveFileName.set("full-runtime.klib")
|
archiveFileName.set("full-runtime.klib")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val sourcesJar by tasks.registering(Jar::class) {
|
||||||
|
dependsOn(jsMainSources)
|
||||||
|
val jsMainSourcesDir = jsMainSources.get().destinationDir
|
||||||
|
archiveClassifier.set("sources")
|
||||||
|
includeEmptyDirs = false
|
||||||
|
duplicatesStrategy = DuplicatesStrategy.FAIL
|
||||||
|
from("${rootDir}/core/builtins/native/kotlin") {
|
||||||
|
into("kotlin")
|
||||||
|
include("Comparable.kt")
|
||||||
|
include("Enum.kt")
|
||||||
|
}
|
||||||
|
from("$jsMainSourcesDir/core/builtins/native") {
|
||||||
|
exclude("kotlin/Comparable.kt")
|
||||||
|
}
|
||||||
|
from("$jsMainSourcesDir/core/builtins/src")
|
||||||
|
from("$jsMainSourcesDir/libraries/stdlib/js/src")
|
||||||
|
from("builtins") {
|
||||||
|
into("kotlin")
|
||||||
|
exclude("Enum.kt")
|
||||||
|
}
|
||||||
|
from("runtime") {
|
||||||
|
into("runtime")
|
||||||
|
}
|
||||||
|
from("src") {
|
||||||
|
include("**/*.kt")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,22 +285,15 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
|||||||
jar.dependsOn(libraryJarWithIr)
|
jar.dependsOn(libraryJarWithIr)
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: compileJs) {
|
task sourcesJar(type: Jar, dependsOn: compileJs) {
|
||||||
|
dependsOn(":kotlin-stdlib-js-ir:sourcesJar")
|
||||||
archiveClassifier.set('sources')
|
archiveClassifier.set('sources')
|
||||||
includeEmptyDirs false
|
includeEmptyDirs false
|
||||||
duplicatesStrategy = DuplicatesStrategy.FAIL
|
duplicatesStrategy = DuplicatesStrategy.FAIL
|
||||||
from("${builtinsDir}/native/kotlin") {
|
from({
|
||||||
into 'kotlin'
|
def irSources = tasks.getByPath(":kotlin-stdlib-js-ir:sourcesJar")
|
||||||
include 'Comparable.kt'
|
zipTree(irSources.outputs.files.first().path)
|
||||||
include 'Enum.kt'
|
}) {
|
||||||
}
|
exclude 'META-INF/*'
|
||||||
from(sourceSets.main.allSource) {
|
|
||||||
into 'kotlin'
|
|
||||||
exclude '**/*.java'
|
|
||||||
exclude 'org.w3c/**'
|
|
||||||
exclude 'js/**'
|
|
||||||
}
|
|
||||||
from(sourceSets.main.allSource) {
|
|
||||||
include 'org.w3c/**'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,8 +135,15 @@ fun createStdLibVersionedDocTask(version: String, isLatest: Boolean) =
|
|||||||
displayName.set("JS")
|
displayName.set("JS")
|
||||||
dependsOn("common")
|
dependsOn("common")
|
||||||
|
|
||||||
sourceRoots.from("$kotlin_stdlib_dir/js/src")
|
// list src subdirectories except 'generated' as it should be taken from js-ir/src
|
||||||
sourceRoots.from("$kotlin_stdlib_dir/js-v1/src")
|
sourceRoots.from("$kotlin_stdlib_dir/js/src/kotlin")
|
||||||
|
sourceRoots.from("$kotlin_stdlib_dir/js/src/kotlinx")
|
||||||
|
sourceRoots.from("$kotlin_stdlib_dir/js/src/org.w3c")
|
||||||
|
|
||||||
|
sourceRoots.from("$kotlin_stdlib_dir/js-ir/builtins")
|
||||||
|
sourceRoots.from("$kotlin_stdlib_dir/js-ir/runtime/kotlinHacks.kt")
|
||||||
|
sourceRoots.from("$kotlin_stdlib_dir/js-ir/runtime/long.kt")
|
||||||
|
sourceRoots.from("$kotlin_stdlib_dir/js-ir/src")
|
||||||
|
|
||||||
perPackageOption("org.w3c") {
|
perPackageOption("org.w3c") {
|
||||||
reportUndocumented.set(false)
|
reportUndocumented.set(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user