Use local libs from kotlin/build/repo and kotlin/kotlin-native/dist

This commit is contained in:
Abduqodiri Qurbonzoda
2021-06-13 01:06:59 +03:00
committed by Space
parent 5611fdcf25
commit 40e23d8366
3 changed files with 15 additions and 26 deletions
@@ -30,14 +30,13 @@ def pAnt() { return project('ant').extensions }
def pKotlinBig() { return project('kotlin_big').extensions }
def pKotlinNative() { return project('kotlin_native').extensions }
task extractAll(dependsOn: [setupDokka])
task setupCallDokka() {
dependsOn setupDokka
dependsOn project('ant').tasks.getByName('extractAnt')
dependsOn project('kotlin_big').tasks.getByName('extractLibs')
}
extractAll.dependsOn project('kotlin_big').tasks.getByName('extractLibs')
extractAll.dependsOn project('kotlin_native').tasks.getByName('extractLibs')
extractAll.dependsOn project('ant').tasks.getByName('extractAnt')
task setupCallDokka() { }
task callDokka(type: Exec, dependsOn: [extractAll, setupCallDokka]) {
task callDokka(type: Exec, dependsOn: setupCallDokka) {
workingDir = projectDir
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
environment("ANT_OPTS", "-Xmx3G")
@@ -1,13 +1,16 @@
apply plugin: 'base'
final boolean isTeamcityBuild = System.getenv("TEAMCITY_VERSION") != null
// kotlin/libraries/tools/kotlin-dokka-stdlib -> kotlin
final File kotlinRootDir = rootProject.file( "../../../")
final File kotlinLibsDir = new File(buildDir, 'libs')
final boolean isTeamcityBuild = System.getenv("TEAMCITY_VERSION") != null
final String kotlinVersion = isTeamcityBuild ? project.property("deployVersion") : "1.5.255-SNAPSHOT"
final String repo = isTeamcityBuild ? new File(buildDir, 'repo') : new File(kotlinRootDir, 'build/repo')
repositories {
mavenLocal()
maven { url = repo }
mavenCentral()
}
@@ -26,13 +29,9 @@ final List<String> modules = [
]
task extractLibs() {
enabled = !isTeamcityBuild
}
task extractLibs() { }
final File kotlinLibsDir = new File(buildDir, 'libs')
modules.forEach { module ->
final String lib = "kotlin_lib_$module"
@@ -1,19 +1,10 @@
apply plugin: 'base'
// kotlin/libraries/tools/kotlin-dokka-stdlib -> kotlin/kotlin-native
final String kotlinNativeRootDir = rootProject.file( "../../../kotlin-native")
final File kotlinNativeLibsDir = new File(buildDir, "libs")
final boolean isTeamcityBuild = System.getenv("TEAMCITY_VERSION") != null
task extractLibs(type: Sync) {
enabled = !isTeamcityBuild
from file(new File(kotlinNativeRootDir, "dist/klib"))
into file(new File(kotlinNativeLibsDir, "klib"))
includeEmptyDirs = false
}
// kotlin/libraries/tools/kotlin-dokka-stdlib -> kotlin/kotlin-native
final String kotlinNativeRootDir = rootProject.file( "../../../kotlin-native")
final File kotlinNativeLibsDir = isTeamcityBuild ? new File(buildDir, "libs") : new File(kotlinNativeRootDir, "dist")
project.extensions.kotlin_native_root = kotlinNativeRootDir
project.extensions.kotlin_native_libs = kotlinNativeLibsDir