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