diff --git a/libraries/tools/kotlin-dokka-stdlib/build.gradle b/libraries/tools/kotlin-dokka-stdlib/build.gradle index 37e62f72ae9..52660b5793a 100644 --- a/libraries/tools/kotlin-dokka-stdlib/build.gradle +++ b/libraries/tools/kotlin-dokka-stdlib/build.gradle @@ -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") diff --git a/libraries/tools/kotlin-dokka-stdlib/kotlin_big/build.gradle b/libraries/tools/kotlin-dokka-stdlib/kotlin_big/build.gradle index 43f0ccfbb10..636abb9f26f 100644 --- a/libraries/tools/kotlin-dokka-stdlib/kotlin_big/build.gradle +++ b/libraries/tools/kotlin-dokka-stdlib/kotlin_big/build.gradle @@ -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 modules = [ ] -task extractLibs() { - enabled = !isTeamcityBuild -} +task extractLibs() { } -final File kotlinLibsDir = new File(buildDir, 'libs') - modules.forEach { module -> final String lib = "kotlin_lib_$module" diff --git a/libraries/tools/kotlin-dokka-stdlib/kotlin_native/build.gradle b/libraries/tools/kotlin-dokka-stdlib/kotlin_native/build.gradle index 4a4a2ede3ec..57bfb95a50c 100644 --- a/libraries/tools/kotlin-dokka-stdlib/kotlin_native/build.gradle +++ b/libraries/tools/kotlin-dokka-stdlib/kotlin_native/build.gradle @@ -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