diff --git a/libraries/tools/kotlin-dokka-stdlib/build-docs.xml b/libraries/tools/kotlin-dokka-stdlib/build-docs.xml
index 32fb73d3030..aa03bb34712 100644
--- a/libraries/tools/kotlin-dokka-stdlib/build-docs.xml
+++ b/libraries/tools/kotlin-dokka-stdlib/build-docs.xml
@@ -10,11 +10,14 @@
-
-
+
-
-
+
+
+
+
+
+
@@ -39,7 +42,7 @@
-
+
@@ -72,12 +75,12 @@
-
+
-
+
-
+
@@ -101,10 +104,12 @@
includeRootPackage="false"
sincekotlin="1.0">
-
-
+
+
-
+
+
+
@@ -125,14 +130,12 @@
languageVersion="${language.version}"
includeRootPackage="false">
-
+
+
+
+
-
-
-
-
-
@@ -155,7 +158,7 @@
languageVersion="${language.version}"
includeRootPackage="false">
-
+
@@ -179,7 +182,7 @@
languageVersion="${language.version}"
includeRootPackage="false">
-
+
@@ -204,7 +207,27 @@
includeRootPackage="false"
sincekotlin="1.1">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -276,8 +299,8 @@
languageVersion="${language.version}"
includeRootPackage="false"
sincekotlin="1.0">
-
-
+
+
@@ -294,7 +317,7 @@
classpathref="kotlin-test-jvm.classpath"
languageVersion="${language.version}"
includeRootPackage="false">
-
+
@@ -310,7 +333,7 @@
classpathref="kotlin-test-junit.classpath"
languageVersion="${language.version}"
includeRootPackage="false">
-
+
@@ -327,7 +350,7 @@
classpathref="kotlin-test-junit5.classpath"
languageVersion="${language.version}"
includeRootPackage="false">
-
+
@@ -345,7 +368,7 @@
classpathref="kotlin-test-testng.classpath"
languageVersion="${language.version}"
includeRootPackage="false">
-
+
@@ -363,7 +386,7 @@
languageVersion="${language.version}"
includeRootPackage="false"
sincekotlin="1.1">
-
+
diff --git a/libraries/tools/kotlin-dokka-stdlib/build.gradle b/libraries/tools/kotlin-dokka-stdlib/build.gradle
index a1ceca38070..37e62f72ae9 100644
--- a/libraries/tools/kotlin-dokka-stdlib/build.gradle
+++ b/libraries/tools/kotlin-dokka-stdlib/build.gradle
@@ -1,6 +1,5 @@
plugins {
id "de.undercouch.download" version "4.1.1"
- id 'com.github.jk1.tcdeps' version '1.2'
id "base"
}
@@ -34,22 +33,11 @@ def pKotlinNative() { return project('kotlin_native').extensions }
task extractAll(dependsOn: [setupDokka])
extractAll.dependsOn project('kotlin_big').tasks.getByName('extractLibs')
-extractAll.dependsOn project('kotlin_big').tasks.getByName('extractSources')
-extractAll.dependsOn project('kotlin_big').tasks.getByName('extractKotlinSources')
-extractAll.dependsOn project('kotlin_native').tasks.getByName('extractKotlinNative')
+extractAll.dependsOn project('kotlin_native').tasks.getByName('extractLibs')
extractAll.dependsOn project('ant').tasks.getByName('extractAnt')
-task cleanupSources(type: Delete) {
- dependsOn extractAll
- doFirst {
- def base = file("${pKotlinNative().kotlin_native_root}/runtime/src/main/kotlin")
- delete(files("$base/kotlin/Functions.kt", "$base/kotlin/coroutines/SuspendFunctions.kt",
- "$base/kotlin/reflect/KFunctions.kt"))
- }
-}
-
task setupCallDokka() { }
-task callDokka(type: Exec, dependsOn: [extractAll, setupCallDokka, cleanupSources]) {
+task callDokka(type: Exec, dependsOn: [extractAll, setupCallDokka]) {
workingDir = projectDir
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
environment("ANT_OPTS", "-Xmx3G")
@@ -67,9 +55,8 @@ setupCallDokka.doLast {
"-f", file("build-docs.xml").path,
"v2",
"-Dkotlin_root=${pKotlinBig().kotlin_root}",
- "-Dkotlin_sources=${pKotlinBig().kotlin_sources}",
"-Dkotlin_libs=${pKotlinBig().kotlin_libs}",
"-Dkotlin_native_root=${pKotlinNative().kotlin_native_root}",
- "-Dkotlin_native_linux=${pKotlinNative().kotlin_native_bin_linux}",
+ "-Dkotlin_native_libs=${pKotlinNative().kotlin_native_libs}",
]
}
diff --git a/libraries/tools/kotlin-dokka-stdlib/kotlin_big/build.gradle b/libraries/tools/kotlin-dokka-stdlib/kotlin_big/build.gradle
index 0feb7a0935d..38a24d5187a 100644
--- a/libraries/tools/kotlin-dokka-stdlib/kotlin_big/build.gradle
+++ b/libraries/tools/kotlin-dokka-stdlib/kotlin_big/build.gradle
@@ -1,13 +1,11 @@
-apply plugin: 'de.undercouch.download'
apply plugin: 'base'
-//final String kotlin_big_build_configuration = 'Kotlin_1360_Compiler'
-final String kotlin_big_version = findProperty("kotlinLocalVersionOverride") ?: '1.5.0'
-final String kotlin_big_build = "1.5.0-release-749"
+// kotlin/libraries/tools/kotlin-dokka-stdlib -> kotlin
+final File kotlinRootDir = rootProject.file( "../../../")
+final String kotlinVersion = "1.5.255-SNAPSHOT"
repositories {
- if (findProperty("kotlinLocalVersionOverride") != null) mavenLocal()
-// maven { url = "https://teamcity.jetbrains.com/guestAuth/repository/download/$kotlin_big_build_configuration/$kotlin_big_build/maven" }
+ mavenLocal()
mavenCentral()
}
@@ -26,88 +24,33 @@ final List modules = [
]
-task extractSources() { }
task extractLibs() { }
-final File kotlin_lib_sources = new File(buildDir, 'sources')
-final File kotlin_lib_binaries = new File(buildDir, 'libs')
+final File kotlinLibsDir = new File(buildDir, 'libs')
modules.forEach { module ->
- final String src = "kotlin_src_$module"
final String lib = "kotlin_lib_$module"
- final Configuration conf_src = configurations.create(src)
final Configuration lib_src = configurations.create(lib)
if (module == "kotlin-test-js") {
- conf_src.attributes {attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, "kotlin-runtime")) }
lib_src.attributes {attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, "kotlin-runtime")) }
}
dependencies {
- "$src"(group: 'org.jetbrains.kotlin', name: module, version: kotlin_big_version, classifier: 'sources') { transitive = false }
- "$lib"(group: 'org.jetbrains.kotlin', name: module, version: kotlin_big_version)
- }
-
- final Task sourcesTask = tasks.create("extract_source_$module", Sync) {
- dependsOn conf_src
-
- from { conf_src.collect { zipTree(it) } }
- into "$kotlin_lib_sources/$module"
+ "$lib"(group: 'org.jetbrains.kotlin', name: module, version: kotlinVersion)
}
final Task libsTask = tasks.create("extract_lib_$module", Sync) {
dependsOn lib_src
from { lib_src }
- into "$kotlin_lib_binaries/$module"
+ into "$kotlinLibsDir/$module"
}
- extractSources.dependsOn sourcesTask
extractLibs.dependsOn libsTask
}
-
-final File kotlinSourcesZip = new File(buildDir, "kotlin-${kotlin_big_build}.zip")
-final File kotlinTargetDir = new File(buildDir, "sources/kotlin")
-final String kotlinUrl = "https://github.com/JetBrains/kotlin/archive/build-${kotlin_big_build}.zip"
-
-task downloadKotlinSources(type: Download) {
- src kotlinUrl
- dest kotlinSourcesZip
- overwrite false
-}
-
-task extractKotlinSources(type: Sync, dependsOn: downloadKotlinSources) {
- String pathPrefix = ""
-
- if (project.findProperty("kotlinLocalRoot") != null) {
- from project.property("kotlinLocalRoot")
- exclude "**/build"
- exclude "**/node_modules"
- } else {
- from zipTree(kotlinSourcesZip)
- pathPrefix = "*/"
-
- eachFile { FileCopyDetails file ->
- //assume all files in the folder
- file.path = file.path.split("/", 2)[1]
- }
- }
-
- include "${pathPrefix}libraries/stdlib/**"
- include "${pathPrefix}libraries/kotlin.test/**"
- include "${pathPrefix}core/builtins/**"
- include "${pathPrefix}core/reflection.jvm/**"
-
- exclude "${pathPrefix}core/builtins/src/kotlin/reflect/"
-
- includeEmptyDirs = false
-
- into kotlinTargetDir
-}
-
-project.extensions.kotlin_root = kotlinTargetDir
-project.extensions.kotlin_sources = kotlin_lib_sources
-project.extensions.kotlin_libs = kotlin_lib_binaries
+project.extensions.kotlin_root = kotlinRootDir
+project.extensions.kotlin_libs = kotlinLibsDir
diff --git a/libraries/tools/kotlin-dokka-stdlib/kotlin_native/build.gradle b/libraries/tools/kotlin-dokka-stdlib/kotlin_native/build.gradle
index 396f0139eca..31f27f8e1b8 100644
--- a/libraries/tools/kotlin-dokka-stdlib/kotlin_native/build.gradle
+++ b/libraries/tools/kotlin-dokka-stdlib/kotlin_native/build.gradle
@@ -1,124 +1,17 @@
-apply plugin: 'de.undercouch.download'
apply plugin: 'base'
-//TODO: there is no direct sync between tag and K/N version :(
-ext.kotlin_native_build_configuration = 'Kotlin_KotlinNative_Master_KotlinNativeDist'
-ext.kotlin_native_version = "1.5" // "${kotlin_native_sources_version}"
-ext.kotlin_native_build = "1.5-release-61" // "${kotin_native_version}-release-4565"
-ext.useBuildServer = false
-final String buildServer = 'https://buildserver.labs.intellij.net'
-
-if (useBuildServer) {
- apply plugin: 'com.github.jk1.tcdeps'
-
- repositories {
- teamcityServer { url = buildServer }
- }
-} else {
- ext.kotlin_native_sources_revision = "v1.5-release-61" // "v${ext.kotlin_native_version}"
- repositories {
- ivy {
- url "https://download.jetbrains.com/kotlin/native/builds/releases/"
- patternLayout {
- // e.g. https://download.jetbrains.com/kotlin/native/builds/releases/1.2.1-eap-9664/macos/kotlin-native-macos-1.2.1-eap-9664.tar.gz
- artifact "[revision]/[classifier]/[module]-[classifier]-[revision].[ext]"
-
- metadataSources {
- artifact()
- }
- }
- }
-
- }
-}
-
-configurations {
- kotlin_native_linux
-}
-
-def kotlinNativeDep(String target, String ext) {
- return useBuildServer
- ? tc(buildTypeId: kotlin_native_build_configuration, version: kotlin_native_build, artifactPath: "kotlin-native-$target-${kotlin_native_version}.$ext")
- : [group: "org.jetbrains.kotlin", name: "kotlin-native", version: kotlin_native_version, classifier: target, ext: ext]
-}
-
-dependencies {
- kotlin_native_linux kotlinNativeDep("linux", "tar.gz")
-}
-
-final File kotlin_native_dir = new File(buildDir, "kotlin_native")
-
-task extractKotlinNativeBinariesLinux(type: Sync) {
- from { tarTree(resources.gzip(configurations.kotlin_native_linux.singleFile)) }
- into new File(kotlin_native_dir, 'linux')
-}
+// kotlin/libraries/tools/kotlin-dokka-stdlib -> kotlin/kotlin-native
+final String kotlinNativeRootDir = rootProject.file( "../../../kotlin-native")
+final File kotlinNativeLibsDir = new File(buildDir, "libs")
-final File teamCityBuildInfo = new File(buildDir, "kotlin-native-build-${kotlin_native_build}.xml")
-final String teamCityBuildsURL = "$buildServer/guestAuth/app/rest/builds/buildType:${kotlin_native_build_configuration},branch:default:any,number:${kotlin_native_build}"
+task extractLibs(type: Sync) {
+ from file(new File(kotlinNativeRootDir, "dist/klib"))
+ into file(new File(kotlinNativeLibsDir, "klib"))
-final File kotlinSourcesZip = new File(buildDir, "kotlin-${kotlin_native_build}.zip")
-final File kotlinTargetDir = new File(buildDir, "kotlin-native-sources")
-
-
-task getTeamCityBuildInfo(type: Download) {
- final String url = teamCityBuildsURL
- doFirst {
- println url
- }
- src url
- dest teamCityBuildInfo
- overwrite false
-}
-
-task inferTeamCityRevisionInfo() {
- dependsOn getTeamCityBuildInfo
- doFirst {
- def xml = new XmlParser(false, false).parse(teamCityBuildInfo)
- def revisions = xml.revisions as List
- println revisions
-
- if (revisions.size() != 1) {
- throw new Error("Select the right VCS root from the list. Too many elements in : $xml")
- }
-
- def revisionsNode = revisions[0]
- if (revisionsNode.attribute("count") != "1") {
- throw new Error("Select the right VCS root from the list: $revisionsNode")
- }
-
- final String kotlin_native_sources_tag = revisionsNode.children()[0].attribute("version")
- println "Detected sources version: $kotlin_native_sources_tag"
-
- tasks.downloadKotlinNativeSources.src("https://github.com/JetBrains/kotlin-native/archive/${kotlin_native_sources_tag}.zip")
- }
-}
-
-task downloadKotlinNativeSources(type: Download) {
- if (useBuildServer) {
- dependsOn inferTeamCityRevisionInfo
- } else {
- assert kotlin_native_sources_revision != null
- src("https://github.com/JetBrains/kotlin-native/archive/${kotlin_native_sources_revision}.zip")
- }
- dest kotlinSourcesZip
- overwrite false
-}
-
-task extractKotlinNativeSources(type: Sync, dependsOn: downloadKotlinNativeSources) {
- enabled = findProperty("kotlinLocalRoot") == null
- from zipTree(kotlinSourcesZip)
- into kotlinTargetDir
includeEmptyDirs = false
-
- eachFile { FileCopyDetails file ->
- //assume all files in the folder
- file.path = file.path.split("/", 2)[1]
- }
}
-task extractKotlinNative(dependsOn: [extractKotlinNativeSources, extractKotlinNativeBinariesLinux]) {}
-
-project.extensions.kotlin_native_root = findProperty("kotlinLocalRoot") == null ? kotlinTargetDir : findProperty("kotlinLocalRoot") + "/kotlin-native"
-project.extensions.kotlin_native_bin_linux = new File(kotlin_native_dir, "linux/kotlin-native-linux-${kotlin_native_version}")
+project.extensions.kotlin_native_root = kotlinNativeRootDir
+project.extensions.kotlin_native_libs = kotlinNativeLibsDir