Adopt configuration-avoidance where possible
Before this change `./gradlew help` (with native enabled) Created immediately: 1322 Created during configuration: 1541 after this change: Created immediately: 596 Created during configuration: 1509 To know more about configuration avoidance: https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
This commit is contained in:
committed by
Space Team
parent
ad8909113d
commit
46d113605b
@@ -65,15 +65,13 @@ benchmark {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.matching { it is Zip && it.name == "mainBenchmarkJar" }.configureEach {
|
tasks.withType<Zip>().matching { it.name == "mainBenchmarkJar" }.configureEach {
|
||||||
this as Zip
|
|
||||||
isZip64 = true
|
isZip64 = true
|
||||||
archiveFileName.set("benchmarks.jar")
|
archiveFileName.set("benchmarks.jar")
|
||||||
}
|
}
|
||||||
|
|
||||||
val benchmarkTasks = listOf("mainBenchmark", "mainFirBenchmark", "mainNiBenchmark")
|
val benchmarkTasks = listOf("mainBenchmark", "mainFirBenchmark", "mainNiBenchmark")
|
||||||
tasks.matching { it is JavaExec && it.name in benchmarkTasks }.configureEach {
|
tasks.withType<JavaExec>().matching { it.name in benchmarkTasks }.configureEach {
|
||||||
this as JavaExec
|
|
||||||
dependsOn(":createIdeaHomeForTests")
|
dependsOn(":createIdeaHomeForTests")
|
||||||
systemProperty("idea.home.path", ideaHomePathForTests().canonicalPath)
|
systemProperty("idea.home.path", ideaHomePathForTests().canonicalPath)
|
||||||
systemProperty("idea.use.native.fs.for.win", false)
|
systemProperty("idea.use.native.fs.for.win", false)
|
||||||
|
|||||||
+4
-5
@@ -863,7 +863,7 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val zipCompiler by task<Zip> {
|
val zipCompiler by tasks.registering(Zip::class) {
|
||||||
dependsOn(dist)
|
dependsOn(dist)
|
||||||
destinationDirectory.set(file(distDir))
|
destinationDirectory.set(file(distDir))
|
||||||
archiveFileName.set("kotlin-compiler-$kotlinVersion.zip")
|
archiveFileName.set("kotlin-compiler-$kotlinVersion.zip")
|
||||||
@@ -879,10 +879,9 @@ val zipCompiler by task<Zip> {
|
|||||||
fun Project.secureZipTask(zipTask: TaskProvider<Zip>): RegisteringDomainObjectDelegateProviderWithAction<out TaskContainer, Task> {
|
fun Project.secureZipTask(zipTask: TaskProvider<Zip>): RegisteringDomainObjectDelegateProviderWithAction<out TaskContainer, Task> {
|
||||||
val checkSumTask = tasks.register("${zipTask.name}Checksum", Checksum::class) {
|
val checkSumTask = tasks.register("${zipTask.name}Checksum", Checksum::class) {
|
||||||
dependsOn(zipTask)
|
dependsOn(zipTask)
|
||||||
val compilerFile = zipTask.get().outputs.files.singleFile
|
inputFiles.setFrom(zipTask.map { it.outputs.files.singleFile })
|
||||||
files = files(compilerFile)
|
outputDirectory.fileProvider(zipTask.map { it.outputs.files.singleFile.parentFile })
|
||||||
outputDir = compilerFile.parentFile
|
checksumAlgorithm.set(Checksum.Algorithm.SHA256)
|
||||||
algorithm = Checksum.Algorithm.SHA256
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val signTask = tasks.register("${zipTask.name}Sign", Sign::class) {
|
val signTask = tasks.register("${zipTask.name}Sign", Sign::class) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class JpsCompatiblePlugin : Plugin<Project> {
|
|||||||
project.configurations.create("jpsTest")
|
project.configurations.create("jpsTest")
|
||||||
|
|
||||||
if (project == project.rootProject) {
|
if (project == project.rootProject) {
|
||||||
project.tasks.create("pill") {
|
project.tasks.register("pill") {
|
||||||
dependsOn(":pill:pill-importer:pill")
|
dependsOn(":pill:pill-importer:pill")
|
||||||
|
|
||||||
if (System.getProperty("pill.android.tests", "false") == "true") {
|
if (System.getProperty("pill.android.tests", "false") == "true") {
|
||||||
@@ -28,7 +28,7 @@ class JpsCompatiblePlugin : Plugin<Project> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project.tasks.create("unpill") {
|
project.tasks.register("unpill") {
|
||||||
dependsOn(":pill:pill-importer:unpill")
|
dependsOn(":pill:pill-importer:unpill")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
import org.jetbrains.kotlin.tools.lib
|
import org.jetbrains.kotlin.tools.lib
|
||||||
import org.jetbrains.kotlin.tools.solib
|
import org.jetbrains.kotlin.tools.solib
|
||||||
import org.jetbrains.kotlin.*
|
import org.jetbrains.kotlin.*
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
import org.jetbrains.kotlin.konan.target.*
|
import org.jetbrains.kotlin.konan.target.*
|
||||||
import org.jetbrains.kotlin.konan.target.ClangArgs
|
import org.jetbrains.kotlin.konan.target.ClangArgs
|
||||||
import org.jetbrains.kotlin.konan.target.Family.*
|
import org.jetbrains.kotlin.konan.target.Family.*
|
||||||
@@ -144,7 +145,7 @@ dependencies {
|
|||||||
testImplementation(kotlin("test-junit"))
|
testImplementation(kotlin("test-junit"))
|
||||||
}
|
}
|
||||||
|
|
||||||
val nativelibs = project.tasks.create<Copy>("nativelibs") {
|
val nativelibs = project.tasks.register<Copy>("nativelibs") {
|
||||||
val clangstubsSolib = solib("clangstubs")
|
val clangstubsSolib = solib("clangstubs")
|
||||||
dependsOn(clangstubsSolib)
|
dependsOn(clangstubsSolib)
|
||||||
|
|
||||||
@@ -161,9 +162,8 @@ kotlinNativeInterop {
|
|||||||
genTask.inputs.dir(libclangextDir)
|
genTask.inputs.dir(libclangextDir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
|
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
freeCompilerArgs += listOf(
|
freeCompilerArgs += listOf(
|
||||||
"-Xskip-prerelease-check",
|
"-Xskip-prerelease-check",
|
||||||
@@ -195,14 +195,9 @@ tasks.withType<Test>().configureEach {
|
|||||||
systemProperty("kotlin.native.interop.indexer.temp", File(buildDir, "testTemp"))
|
systemProperty("kotlin.native.interop.indexer.temp", File(buildDir, "testTemp"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.matching { it.name == "linkClangstubsSharedLibrary" }.all {
|
|
||||||
dependsOn(libclangextTask)
|
|
||||||
inputs.dir(libclangextDir)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Please note that list of headers should be fixed manually.
|
// Please note that list of headers should be fixed manually.
|
||||||
// See KT-46231 for details.
|
// See KT-46231 for details.
|
||||||
tasks.create("updatePrebuilt") {
|
tasks.register("updatePrebuilt") {
|
||||||
dependsOn("genClangInteropStubs")
|
dependsOn("genClangInteropStubs")
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ dependencies {
|
|||||||
|
|
||||||
classes.dependsOn 'compilerClasses', 'cli_bcClasses'
|
classes.dependsOn 'compilerClasses', 'cli_bcClasses'
|
||||||
|
|
||||||
jar {
|
tasks.named("jar") {
|
||||||
from sourceSets.cli_bc.output,
|
from sourceSets.cli_bc.output,
|
||||||
sourceSets.compiler.output,
|
sourceSets.compiler.output,
|
||||||
sourceSets.filesInteropStubs.output,
|
sourceSets.filesInteropStubs.output,
|
||||||
@@ -196,8 +196,8 @@ jar {
|
|||||||
|
|
||||||
def externalJars = ['compiler', 'stdlib', 'reflect', 'script_runtime']
|
def externalJars = ['compiler', 'stdlib', 'reflect', 'script_runtime']
|
||||||
|
|
||||||
task trove4jCopy(type: Copy) {
|
tasks.register("trove4jCopy", Copy) {
|
||||||
from configurations.getByName("trove4j_jar") {
|
from configurations.named("trove4j_jar") {
|
||||||
include "trove4j*.jar"
|
include "trove4j*.jar"
|
||||||
rename "trove4j(.*).jar", "trove4j.jar"
|
rename "trove4j(.*).jar", "trove4j.jar"
|
||||||
|
|
||||||
@@ -207,9 +207,9 @@ task trove4jCopy(type: Copy) {
|
|||||||
|
|
||||||
externalJars.each { arg ->
|
externalJars.each { arg ->
|
||||||
def jar = arg.replace('_', '-') // :(
|
def jar = arg.replace('_', '-') // :(
|
||||||
task("${arg}Copy", type: Copy) {
|
tasks.register("${arg}Copy", Copy) {
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
from configurations.getByName("kotlin_${arg}_jar") {
|
from configurations.named("kotlin_${arg}_jar") {
|
||||||
include "kotlin-${jar}*.jar"
|
include "kotlin-${jar}*.jar"
|
||||||
rename "kotlin-${jar}(.*).jar", "kotlin-${jar}.jar"
|
rename "kotlin-${jar}(.*).jar", "kotlin-${jar}.jar"
|
||||||
|
|
||||||
@@ -218,12 +218,12 @@ externalJars.each { arg ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task external_jars(type: Copy) {
|
tasks.register("external_jars", Copy) {
|
||||||
dependsOn externalJars.collect { "${it}Copy" }
|
dependsOn externalJars.collect { "${it}Copy" }
|
||||||
dependsOn trove4jCopy
|
dependsOn trove4jCopy
|
||||||
}
|
}
|
||||||
|
|
||||||
task debugCompiler(type: JavaExec) {
|
tasks.register("debugCompiler", JavaExec) {
|
||||||
dependsOn ':dist'
|
dependsOn ':dist'
|
||||||
mainClass = 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
mainClass = 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
||||||
classpath = project.fileTree("${distDir.canonicalPath}/konan/lib/") {
|
classpath = project.fileTree("${distDir.canonicalPath}/konan/lib/") {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+51
-39
@@ -179,22 +179,30 @@ apply plugin: GitClangFormatPlugin
|
|||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: BasePlugin
|
apply plugin: BasePlugin
|
||||||
|
|
||||||
task dist_compiler(dependsOn: "distCompiler")
|
tasks.register("dist_compiler") {
|
||||||
task dist_runtime(dependsOn: "distRuntime")
|
dependsOn("distCompiler")
|
||||||
task cross_dist(dependsOn: "crossDist")
|
}
|
||||||
task list_dist(dependsOn: "listDist")
|
tasks.register("dist_runtime") {
|
||||||
|
dependsOn("distRuntime")
|
||||||
|
}
|
||||||
|
tasks.register("cross_dist") {
|
||||||
|
dependsOn("crossDist")
|
||||||
|
}
|
||||||
|
tasks.register("list_dist") {
|
||||||
|
dependsOn("listDist")
|
||||||
|
}
|
||||||
|
|
||||||
tasks.named("build") {
|
tasks.named("build") {
|
||||||
dependsOn 'dist', 'distPlatformLibs'
|
dependsOn 'dist', 'distPlatformLibs'
|
||||||
}
|
}
|
||||||
|
|
||||||
task distCommonSources(type: CopyCommonSources) {
|
tasks.register("distCommonSources", CopyCommonSources) {
|
||||||
outputDir "$distDir/sources"
|
outputDir "$distDir/sources"
|
||||||
sourcePaths configurations.commonSources
|
sourcePaths configurations.commonSources
|
||||||
zipSources true
|
zipSources true
|
||||||
}
|
}
|
||||||
|
|
||||||
task distNativeSources(type: Zip) {
|
tasks.register("distNativeSources", Zip) {
|
||||||
destinationDirectory = file("$distDir/sources")
|
destinationDirectory = file("$distDir/sources")
|
||||||
archiveFileName = "kotlin-stdlib-native-sources.zip"
|
archiveFileName = "kotlin-stdlib-native-sources.zip"
|
||||||
|
|
||||||
@@ -210,12 +218,12 @@ task distNativeSources(type: Zip) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task distSources {
|
tasks.register("distSources") {
|
||||||
dependsOn(distCommonSources)
|
dependsOn(distCommonSources)
|
||||||
dependsOn(distNativeSources)
|
dependsOn(distNativeSources)
|
||||||
}
|
}
|
||||||
|
|
||||||
task shadowJar(type: ShadowJar) {
|
tasks.register("shadowJar", ShadowJar) {
|
||||||
mergeServiceFiles()
|
mergeServiceFiles()
|
||||||
destinationDirectory.set(file("$distDir/konan/lib"))
|
destinationDirectory.set(file("$distDir/konan/lib"))
|
||||||
archiveBaseName.set("kotlin-native")
|
archiveBaseName.set("kotlin-native")
|
||||||
@@ -230,7 +238,7 @@ task shadowJar(type: ShadowJar) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task distCompiler(type: Copy) {
|
tasks.register("distCompiler", Copy) {
|
||||||
// Workaround: make distCompiler no-op if we are using custom dist:
|
// Workaround: make distCompiler no-op if we are using custom dist:
|
||||||
// the dist is already in place and has the compiler, so we don't have to
|
// the dist is already in place and has the compiler, so we don't have to
|
||||||
// build and copy the compiler to dist.
|
// build and copy the compiler to dist.
|
||||||
@@ -319,7 +327,7 @@ task distCompiler(type: Copy) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task distDef(type: Copy) {
|
tasks.register("distDef", Copy) {
|
||||||
destinationDir project.file("$distDir/konan/platformDef/")
|
destinationDir project.file("$distDir/konan/platformDef/")
|
||||||
|
|
||||||
platformManager.targetValues.each { target ->
|
platformManager.targetValues.each { target ->
|
||||||
@@ -333,15 +341,15 @@ task distDef(type: Copy) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task listDist(type: Exec) {
|
tasks.register("listDist", Exec) {
|
||||||
commandLine 'find', distDir
|
commandLine 'find', distDir
|
||||||
}
|
}
|
||||||
|
|
||||||
task distRuntime(type: Copy) {
|
tasks.register("distRuntime", Copy) {
|
||||||
dependsOn "${hostName}CrossDistRuntime"
|
dependsOn "${hostName}CrossDistRuntime"
|
||||||
}
|
}
|
||||||
|
|
||||||
task distStdlibCache {
|
tasks.register("distStdlibCache") {
|
||||||
if (hostName in cacheableTargetNames) {
|
if (hostName in cacheableTargetNames) {
|
||||||
dependsOn("${hostName}StdlibCache")
|
dependsOn("${hostName}StdlibCache")
|
||||||
}
|
}
|
||||||
@@ -350,24 +358,24 @@ task distStdlibCache {
|
|||||||
def stdlib = 'klib/common/stdlib'
|
def stdlib = 'klib/common/stdlib'
|
||||||
def stdlibDefaultComponent = "$stdlib/default"
|
def stdlibDefaultComponent = "$stdlib/default"
|
||||||
|
|
||||||
task crossDistRuntime {
|
tasks.register("crossDistRuntime") {
|
||||||
dependsOn.addAll(targetList.collect { "${it}CrossDistRuntime" })
|
dependsOn.addAll(targetList.collect { "${it}CrossDistRuntime" })
|
||||||
}
|
}
|
||||||
|
|
||||||
task crossDistPlatformLibs {
|
tasks.register("crossDistPlatformLibs") {
|
||||||
dependsOn.addAll(targetList.collect { "${it}PlatformLibs" })
|
dependsOn.addAll(targetList.collect { "${it}PlatformLibs" })
|
||||||
}
|
}
|
||||||
|
|
||||||
task crossDistStdlib {
|
tasks.register("crossDistStdlib") {
|
||||||
dependsOn.addAll(targetList.collect { "${it}CrossDistStdlib" })
|
dependsOn.addAll(targetList.collect { "${it}CrossDistStdlib" })
|
||||||
}
|
}
|
||||||
|
|
||||||
task crossDistStdlibCache {
|
tasks.register("crossDistStdlibCache") {
|
||||||
dependsOn.addAll(targetList.findAll { it in cacheableTargetNames }.collect { "${it}StdlibCache" })
|
dependsOn.addAll(targetList.findAll { it in cacheableTargetNames }.collect { "${it}StdlibCache" })
|
||||||
}
|
}
|
||||||
|
|
||||||
targetList.each { target ->
|
targetList.each { target ->
|
||||||
task("${target}CrossDistStdlib", type: Copy) {
|
tasks.register("${target}CrossDistStdlib", Copy) {
|
||||||
dependsOn ":kotlin-native:runtime:${target}Stdlib"
|
dependsOn ":kotlin-native:runtime:${target}Stdlib"
|
||||||
// TODO: add explicit dependency on host task with IR klib stdlib parts
|
// TODO: add explicit dependency on host task with IR klib stdlib parts
|
||||||
// As for now it is possibly to build up distribution from the tc-dist to crossdist
|
// As for now it is possibly to build up distribution from the tc-dist to crossdist
|
||||||
@@ -403,7 +411,7 @@ targetList.each { target ->
|
|||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
}
|
}
|
||||||
|
|
||||||
task("${target}CrossDistBitcodeCopy", type: Copy) {
|
tasks.register("${target}CrossDistBitcodeCopy", Copy) {
|
||||||
def bitcodeFiles = configurations.runtimeBitcode.incoming.artifactView {
|
def bitcodeFiles = configurations.runtimeBitcode.incoming.artifactView {
|
||||||
attributes {
|
attributes {
|
||||||
attribute(TargetWithSanitizer.TARGET_ATTRIBUTE, new TargetWithSanitizer(platformManager.targetByName(target), null))
|
attribute(TargetWithSanitizer.TARGET_ATTRIBUTE, new TargetWithSanitizer(platformManager.targetByName(target), null))
|
||||||
@@ -419,7 +427,7 @@ targetList.each { target ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task("${target}CrossDistRuntime", type: Copy) {
|
tasks.register("${target}CrossDistRuntime", Copy) {
|
||||||
dependsOn ":kotlin-native:${target}CrossDistStdlib"
|
dependsOn ":kotlin-native:${target}CrossDistStdlib"
|
||||||
dependsOn "${target}CrossDistBitcodeCopy"
|
dependsOn "${target}CrossDistBitcodeCopy"
|
||||||
|
|
||||||
@@ -434,7 +442,7 @@ targetList.each { target ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task("${target}PlatformLibs") {
|
tasks.register("${target}PlatformLibs") {
|
||||||
dependsOn ":kotlin-native:platformLibs:${target}Install"
|
dependsOn ":kotlin-native:platformLibs:${target}Install"
|
||||||
if (target in cacheableTargetNames) {
|
if (target in cacheableTargetNames) {
|
||||||
dependsOn(":kotlin-native:platformLibs:${target}Cache")
|
dependsOn(":kotlin-native:platformLibs:${target}Cache")
|
||||||
@@ -442,7 +450,7 @@ targetList.each { target ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (target in cacheableTargetNames) {
|
if (target in cacheableTargetNames) {
|
||||||
task ("${target}StdlibCache", type: Copy) {
|
tasks.register("${target}StdlibCache", Copy) {
|
||||||
dependsOn "${target}CrossDistStdlib"
|
dependsOn "${target}CrossDistStdlib"
|
||||||
dependsOn ":kotlin-native:runtime:${target}StdlibCache"
|
dependsOn ":kotlin-native:runtime:${target}StdlibCache"
|
||||||
|
|
||||||
@@ -454,7 +462,7 @@ targetList.each { target ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task("${target}CrossDist") {
|
tasks.register("${target}CrossDist") {
|
||||||
dependsOn "${target}CrossDistRuntime", "distCompiler"
|
dependsOn "${target}CrossDistRuntime", "distCompiler"
|
||||||
if (target in cacheableTargetNames) {
|
if (target in cacheableTargetNames) {
|
||||||
dependsOn "${target}StdlibCache"
|
dependsOn "${target}StdlibCache"
|
||||||
@@ -462,19 +470,19 @@ targetList.each { target ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task distPlatformLibs {
|
tasks.register("distPlatformLibs") {
|
||||||
dependsOn ':kotlin-native:platformLibs:hostInstall'
|
dependsOn ':kotlin-native:platformLibs:hostInstall'
|
||||||
dependsOn ':kotlin-native:platformLibs:hostCache'
|
dependsOn ':kotlin-native:platformLibs:hostCache'
|
||||||
}
|
}
|
||||||
|
|
||||||
task dist {
|
tasks.register("dist") {
|
||||||
dependsOn "distCompiler",
|
dependsOn "distCompiler",
|
||||||
"distRuntime",
|
"distRuntime",
|
||||||
"distDef",
|
"distDef",
|
||||||
"distStdlibCache"
|
"distStdlibCache"
|
||||||
}
|
}
|
||||||
|
|
||||||
task crossDist {
|
tasks.register("crossDist") {
|
||||||
dependsOn "distCompiler",
|
dependsOn "distCompiler",
|
||||||
"crossDistRuntime",
|
"crossDistRuntime",
|
||||||
"distDef",
|
"distDef",
|
||||||
@@ -482,11 +490,11 @@ task crossDist {
|
|||||||
"crossDistStdlibCache"
|
"crossDistStdlibCache"
|
||||||
}
|
}
|
||||||
|
|
||||||
task bundle {
|
tasks.register("bundle") {
|
||||||
dependsOn 'bundleRegular', 'bundlePrebuilt'
|
dependsOn 'bundleRegular', 'bundlePrebuilt'
|
||||||
}
|
}
|
||||||
|
|
||||||
task bundleRegular(type: (isWindows()) ? Zip : Tar) {
|
tasks.register("bundleRegular", (isWindows()) ? Zip : Tar) {
|
||||||
def simpleOsName = HostManager.platformName()
|
def simpleOsName = HostManager.platformName()
|
||||||
archiveBaseName.set("kotlin-native-$simpleOsName")
|
archiveBaseName.set("kotlin-native-$simpleOsName")
|
||||||
archiveVersion.set(kotlinVersion)
|
archiveVersion.set(kotlinVersion)
|
||||||
@@ -502,7 +510,7 @@ task bundleRegular(type: (isWindows()) ? Zip : Tar) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task bundlePrebuilt(type: (isWindows()) ? Zip : Tar) {
|
tasks.register("bundlePrebuilt", (isWindows()) ? Zip : Tar) {
|
||||||
dependsOn("crossDistPlatformLibs")
|
dependsOn("crossDistPlatformLibs")
|
||||||
def simpleOsName = HostManager.platformName()
|
def simpleOsName = HostManager.platformName()
|
||||||
archiveBaseName.set("kotlin-native-prebuilt-$simpleOsName")
|
archiveBaseName.set("kotlin-native-prebuilt-$simpleOsName")
|
||||||
@@ -532,8 +540,12 @@ void configurePackingLicensesToBundle(AbstractArchiveTask task, boolean contains
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configurePackingLicensesToBundle(bundleRegular, /* containsPlatformLibraries = */ false)
|
tasks.named("bundleRegular").configure {
|
||||||
configurePackingLicensesToBundle(bundlePrebuilt, /* containsPlatformLibraries = */ true)
|
configurePackingLicensesToBundle(it, /* containsPlatformLibraries = */ false)
|
||||||
|
}
|
||||||
|
tasks.named("bundlePrebuilt").configure {
|
||||||
|
configurePackingLicensesToBundle(it, /* containsPlatformLibraries = */ true)
|
||||||
|
}
|
||||||
|
|
||||||
configure([bundleRegular, bundlePrebuilt]) {
|
configure([bundleRegular, bundlePrebuilt]) {
|
||||||
dependsOn("crossDist")
|
dependsOn("crossDist")
|
||||||
@@ -555,7 +567,7 @@ configure([bundleRegular, bundlePrebuilt]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task 'tc-dist'(type: (isWindows()) ? Zip : Tar) {
|
tasks.register("tc-dist", (isWindows()) ? Zip : Tar) {
|
||||||
dependsOn('dist')
|
dependsOn('dist')
|
||||||
dependsOn('distSources')
|
dependsOn('distSources')
|
||||||
def simpleOsName = HostManager.platformName()
|
def simpleOsName = HostManager.platformName()
|
||||||
@@ -577,12 +589,12 @@ task 'tc-dist'(type: (isWindows()) ? Zip : Tar) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task samples {
|
tasks.register("samples") {
|
||||||
dependsOn 'samplesZip', 'samplesTar'
|
dependsOn 'samplesZip', 'samplesTar'
|
||||||
}
|
}
|
||||||
|
|
||||||
task samplesZip(type: Zip)
|
tasks.register("samplesZip", Zip)
|
||||||
task samplesTar(type: Tar) {
|
tasks.register("samplesTar", Tar) {
|
||||||
archiveExtension = 'tar.gz'
|
archiveExtension = 'tar.gz'
|
||||||
compression = Compression.GZIP
|
compression = Compression.GZIP
|
||||||
}
|
}
|
||||||
@@ -616,10 +628,10 @@ configure([samplesZip, samplesTar]) {
|
|||||||
exclude '**/*.kt.bc-build/'
|
exclude '**/*.kt.bc-build/'
|
||||||
}
|
}
|
||||||
|
|
||||||
project.tasks.register("copy_samples") {
|
tasks.register("copy_samples") {
|
||||||
dependsOn 'copySamples'
|
dependsOn 'copySamples'
|
||||||
}
|
}
|
||||||
project.tasks.register("copySamples", CopySamples) {
|
tasks.register("copySamples", CopySamples) {
|
||||||
destinationDir file('build/samples-under-test')
|
destinationDir file('build/samples-under-test')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,7 +650,7 @@ tasks.register("compdb", Copy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
targetList.each { targetName ->
|
targetList.each { targetName ->
|
||||||
task "${targetName}CheckPlatformAbiCompatibility"(type: CompareDistributionSignatures) {
|
tasks.register("${targetName}CheckPlatformAbiCompatibility", CompareDistributionSignatures) {
|
||||||
dependsOn "${targetName}PlatformLibs"
|
dependsOn "${targetName}PlatformLibs"
|
||||||
|
|
||||||
libraries = new CompareDistributionSignatures.Libraries.Platform(targetName)
|
libraries = new CompareDistributionSignatures.Libraries.Platform(targetName)
|
||||||
@@ -649,7 +661,7 @@ targetList.each { targetName ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task "checkStdlibAbiCompatibility"(type: CompareDistributionSignatures) {
|
tasks.register("checkStdlibAbiCompatibility", CompareDistributionSignatures) {
|
||||||
dependsOn "distRuntime"
|
dependsOn "distRuntime"
|
||||||
|
|
||||||
libraries = CompareDistributionSignatures.Libraries.Standard.INSTANCE
|
libraries = CompareDistributionSignatures.Libraries.Standard.INSTANCE
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ def platformManager = rootProject.project(":kotlin-native").ext.platformManager
|
|||||||
platformManager.enabled.each { target ->
|
platformManager.enabled.each { target ->
|
||||||
def loader = platformManager.loader(target)
|
def loader = platformManager.loader(target)
|
||||||
|
|
||||||
task "${target}Dependencies"(type: NativeDep) {
|
tasks.register("${target}Dependencies", NativeDep) {
|
||||||
konanPropertiesLoader = loader
|
konanPropertiesLoader = loader
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,13 +107,13 @@ platformManager.enabled.each { target ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task update {
|
tasks.register("update") {
|
||||||
dependsOn tasks.withType(NativeDep)
|
dependsOn tasks.withType(NativeDep)
|
||||||
mustRunAfter(tasks.withType(NativeDep))
|
mustRunAfter(tasks.withType(NativeDep))
|
||||||
}
|
}
|
||||||
rootProject.project(":kotlin-native").ext.nativeDependencies = tasks.withType(NativeDep)
|
rootProject.project(":kotlin-native").ext.nativeDependencies = tasks.withType(NativeDep)
|
||||||
|
|
||||||
task rmDotKonan(type: Delete) {
|
tasks.register("rmDotKonan", Delete) {
|
||||||
def dir = System.getenv("KONAN_DATA_DIR") ?: "${System.getProperty("user.home")}/.konan"
|
def dir = System.getenv("KONAN_DATA_DIR") ?: "${System.getProperty("user.home")}/.konan"
|
||||||
delete dir
|
delete dir
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ subprojects { proj ->
|
|||||||
|
|
||||||
def rootBuildDirectory = projectDir.parentFile
|
def rootBuildDirectory = projectDir.parentFile
|
||||||
|
|
||||||
task buildAnalyzer(type: GradleBuild) {
|
tasks.register("buildAnalyzer", GradleBuild) {
|
||||||
buildFile = "../tools/benchmarksAnalyzer/build.gradle"
|
buildFile = "../tools/benchmarksAnalyzer/build.gradle"
|
||||||
tasks = [":${getAnalyzerTargetName()}Binaries".toString()]
|
tasks = [":${getAnalyzerTargetName()}Binaries".toString()]
|
||||||
startParameter.setProjectProperties(this.project.gradle.startParameter.projectProperties)
|
startParameter.setProjectProperties(this.project.gradle.startParameter.projectProperties)
|
||||||
@@ -235,7 +235,7 @@ task registerExternalBenchmarks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task registerBuild(type: BuildRegister) {
|
tasks.register("registerBuild", BuildRegister) {
|
||||||
onlyBranch = project.findProperty('kotlin.register.branch')
|
onlyBranch = project.findProperty('kotlin.register.branch')
|
||||||
def uploadedFile = getUploadedFile(nativeJson)
|
def uploadedFile = getUploadedFile(nativeJson)
|
||||||
if (uploadedFile != null) {
|
if (uploadedFile != null) {
|
||||||
@@ -252,7 +252,7 @@ task registerBuild(type: BuildRegister) {
|
|||||||
buildNumberSuffix = project.findProperty('buildNumberSuffix')
|
buildNumberSuffix = project.findProperty('buildNumberSuffix')
|
||||||
}
|
}
|
||||||
|
|
||||||
task registerExternalBuild(type: BuildRegister) {
|
tasks.register("registerExternalBuild", BuildRegister) {
|
||||||
onlyBranch = project.findProperty('kotlin.register.branch')
|
onlyBranch = project.findProperty('kotlin.register.branch')
|
||||||
def uploadedFile = getUploadedFile(externalBenchmarksReport)
|
def uploadedFile = getUploadedFile(externalBenchmarksReport)
|
||||||
if (uploadedFile != null) {
|
if (uploadedFile != null) {
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ val hostRuntimeTests by tasks.registering {
|
|||||||
dependsOn("${hostName}RuntimeTests")
|
dependsOn("${hostName}RuntimeTests")
|
||||||
}
|
}
|
||||||
|
|
||||||
val assemble by tasks.getting {
|
tasks.named("assemble") {
|
||||||
dependsOn(targetList.map { "${it}Runtime" })
|
dependsOn(targetList.map { "${it}Runtime" })
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ val hostAssemble by tasks.registering {
|
|||||||
dependsOn("${hostName}Runtime")
|
dependsOn("${hostName}Runtime")
|
||||||
}
|
}
|
||||||
|
|
||||||
val clean by tasks.getting {
|
tasks.named("clean") {
|
||||||
doFirst {
|
doFirst {
|
||||||
delete(buildDir)
|
delete(buildDir)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ def getMingwPath() {
|
|||||||
return directory
|
return directory
|
||||||
}
|
}
|
||||||
|
|
||||||
task assembleWeb(type: Sync) {
|
tasks.register("assembleWeb", Sync) {
|
||||||
def runtimeDependencies = kotlin.targets.js.compilations.main.runtimeDependencyFiles
|
def runtimeDependencies = kotlin.targets.js.compilations.main.runtimeDependencyFiles
|
||||||
from(files {
|
from(files {
|
||||||
runtimeDependencies.collect { File file ->
|
runtimeDependencies.collect { File file ->
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ class PathSpecification extends BaseKonanSpecification {
|
|||||||
dynamic('dynamic')
|
dynamic('dynamic')
|
||||||
}
|
}
|
||||||
|
|
||||||
task checkArtifacts(type: DefaultTask) {
|
tasks.register("checkArtifacts", DefaultTask) {
|
||||||
dependsOn(':build')
|
dependsOn(':build')
|
||||||
doLast {
|
doLast {
|
||||||
for(artifact in konanArtifacts) {
|
for(artifact in konanArtifacts) {
|
||||||
|
|||||||
+4
-4
@@ -29,8 +29,8 @@ class TaskSpecification extends BaseKonanSpecification {
|
|||||||
when:
|
when:
|
||||||
def project = KonanProject.createWithInterop(projectDirectory, ArtifactType.LIBRARY)
|
def project = KonanProject.createWithInterop(projectDirectory, ArtifactType.LIBRARY)
|
||||||
project.buildFile.append("""
|
project.buildFile.append("""
|
||||||
task beforeInterop(type: DefaultTask) { doLast { println("Before Interop") } }
|
tasks.register("beforeInterop", DefaultTask) { doLast { println("Before Interop") } }
|
||||||
task beforeCompilation(type: DefaultTask) { doLast { println("Before compilation") } }
|
tasks.register("beforeCompilation", DefaultTask) { doLast { println("Before compilation") } }
|
||||||
""".stripIndent())
|
""".stripIndent())
|
||||||
project.addSetting(KonanProject.DEFAULT_INTEROP_NAME,"dependsOn", "beforeInterop")
|
project.addSetting(KonanProject.DEFAULT_INTEROP_NAME,"dependsOn", "beforeInterop")
|
||||||
project.addSetting("dependsOn", "beforeCompilation")
|
project.addSetting("dependsOn", "beforeCompilation")
|
||||||
@@ -147,7 +147,7 @@ class TaskSpecification extends BaseKonanSpecification {
|
|||||||
|
|
||||||
BuildResult failOnPropertyAccess(KonanProject project, String property) {
|
BuildResult failOnPropertyAccess(KonanProject project, String property) {
|
||||||
project.buildFile.append("""
|
project.buildFile.append("""
|
||||||
task testTask(type: DefaultTask) {
|
tasks.register("testTask", DefaultTask) {
|
||||||
doLast {
|
doLast {
|
||||||
println(${project.defaultInteropConfig()}.$property)
|
println(${project.defaultInteropConfig()}.$property)
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,7 @@ class TaskSpecification extends BaseKonanSpecification {
|
|||||||
|
|
||||||
BuildResult failOnTaskAccess(KonanProject project, String task) {
|
BuildResult failOnTaskAccess(KonanProject project, String task) {
|
||||||
project.buildFile.append("""
|
project.buildFile.append("""
|
||||||
task testTask(type: DefaultTask) {
|
tasks.register("testTask", DefaultTask) {
|
||||||
dependsOn $task
|
dependsOn $task
|
||||||
}
|
}
|
||||||
""".stripIndent())
|
""".stripIndent())
|
||||||
|
|||||||
@@ -44,14 +44,16 @@ jar {
|
|||||||
enabled false
|
enabled false
|
||||||
}
|
}
|
||||||
|
|
||||||
task libraryJarWithoutIr(type: Jar, dependsOn: compileKotlin2Js) {
|
tasks.register("libraryJarWithoutIr", Jar) {
|
||||||
|
dependsOn(compileKotlin2Js)
|
||||||
archiveClassifier.set(null)
|
archiveClassifier.set(null)
|
||||||
destinationDirectory = file("$buildDir/lib/dist")
|
destinationDirectory = file("$buildDir/lib/dist")
|
||||||
from("$buildDir/classes/main")
|
from("$buildDir/classes/main")
|
||||||
manifestAttributes(manifest, project, 'Test')
|
manifestAttributes(manifest, project, 'Test')
|
||||||
}
|
}
|
||||||
|
|
||||||
task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
tasks.register("libraryJarWithIr", Zip) {
|
||||||
|
dependsOn(libraryJarWithoutIr)
|
||||||
archiveExtension = "jar"
|
archiveExtension = "jar"
|
||||||
destinationDirectory = file("$buildDir/libs")
|
destinationDirectory = file("$buildDir/libs")
|
||||||
|
|
||||||
@@ -69,7 +71,8 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
|||||||
|
|
||||||
jar.dependsOn(libraryJarWithIr)
|
jar.dependsOn(libraryJarWithIr)
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
tasks.register("sourcesJar", Jar) {
|
||||||
|
dependsOn(classes)
|
||||||
archiveClassifier.set('sources')
|
archiveClassifier.set('sources')
|
||||||
from (sourceSets.main.allSource)
|
from (sourceSets.main.allSource)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ jar {
|
|||||||
manifestAttributes(manifest, project, "internal")
|
manifestAttributes(manifest, project, "internal")
|
||||||
}
|
}
|
||||||
|
|
||||||
task java9Jar(type: Jar) {
|
tasks.register("java9Jar", Jar) {
|
||||||
archiveClassifier.set("java9")
|
archiveClassifier.set("java9")
|
||||||
if (includeJava9) {
|
if (includeJava9) {
|
||||||
from sourceSets.java9.output
|
from sourceSets.java9.output
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ dependencies {
|
|||||||
testApi project(':kotlin-test:kotlin-test-js')
|
testApi project(':kotlin-test:kotlin-test-js')
|
||||||
}
|
}
|
||||||
|
|
||||||
task prepareComparableSource(type: Copy) {
|
tasks.register("prepareComparableSource", Copy) {
|
||||||
def fs = services.get(FileSystemOperations)
|
def fs = services.get(FileSystemOperations)
|
||||||
doFirst {
|
doFirst {
|
||||||
fs.delete {
|
fs.delete {
|
||||||
@@ -84,7 +84,7 @@ task prepareComparableSource(type: Copy) {
|
|||||||
into builtinsSrcDir2
|
into builtinsSrcDir2
|
||||||
}
|
}
|
||||||
|
|
||||||
task prepareBuiltinsSources(type: Copy) {
|
tasks.register("prepareBuiltinsSources", Copy) {
|
||||||
def fs = services.get(FileSystemOperations)
|
def fs = services.get(FileSystemOperations)
|
||||||
doFirst {
|
doFirst {
|
||||||
fs.delete {
|
fs.delete {
|
||||||
@@ -153,7 +153,7 @@ compileTestKotlin2Js {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task compileJs(type: NoDebugJavaExec) {
|
tasks.register("compileJs", NoDebugJavaExec) {
|
||||||
dependsOn compileBuiltinsKotlin2Js, compileKotlin2Js
|
dependsOn compileBuiltinsKotlin2Js, compileKotlin2Js
|
||||||
inputs.files(compileBuiltinsKotlin2Js.outputs.files).withPathSensitivity(PathSensitivity.RELATIVE)
|
inputs.files(compileBuiltinsKotlin2Js.outputs.files).withPathSensitivity(PathSensitivity.RELATIVE)
|
||||||
inputs.files(compileKotlin2Js.outputs.files).withPathSensitivity(PathSensitivity.RELATIVE)
|
inputs.files(compileKotlin2Js.outputs.files).withPathSensitivity(PathSensitivity.RELATIVE)
|
||||||
@@ -246,7 +246,8 @@ jar {
|
|||||||
enabled false
|
enabled false
|
||||||
}
|
}
|
||||||
|
|
||||||
task libraryJarWithoutIr(type: Jar, dependsOn: compileJs) {
|
tasks.register("libraryJarWithoutIr", Jar) {
|
||||||
|
dependsOn(compileJs)
|
||||||
archiveClassifier = null
|
archiveClassifier = null
|
||||||
manifestAttributes(manifest, project, 'Main')
|
manifestAttributes(manifest, project, 'Main')
|
||||||
destinationDirectory = file("$buildDir/lib/dist")
|
destinationDirectory = file("$buildDir/lib/dist")
|
||||||
@@ -267,7 +268,8 @@ task libraryJarWithoutIr(type: Jar, dependsOn: compileJs) {
|
|||||||
filesMatching("*.*") { it.mode = 0b110100100 } // KTI-401
|
filesMatching("*.*") { it.mode = 0b110100100 } // KTI-401
|
||||||
}
|
}
|
||||||
|
|
||||||
task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
tasks.register("libraryJarWithIr", Zip) {
|
||||||
|
dependsOn(libraryJarWithoutIr)
|
||||||
archiveExtension = "jar"
|
archiveExtension = "jar"
|
||||||
destinationDirectory = file("$buildDir/libs")
|
destinationDirectory = file("$buildDir/libs")
|
||||||
|
|
||||||
@@ -285,7 +287,8 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
|
|||||||
|
|
||||||
jar.dependsOn(libraryJarWithIr)
|
jar.dependsOn(libraryJarWithIr)
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: compileJs) {
|
tasks.register("sourcesJar", Jar) {
|
||||||
|
dependsOn(compileJs)
|
||||||
dependsOn(":kotlin-stdlib-js-ir:sourcesJar")
|
dependsOn(":kotlin-stdlib-js-ir:sourcesJar")
|
||||||
archiveClassifier.set('sources')
|
archiveClassifier.set('sources')
|
||||||
includeEmptyDirs false
|
includeEmptyDirs false
|
||||||
@@ -298,7 +301,7 @@ task sourcesJar(type: Jar, dependsOn: compileJs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task distSourcesJar(type: Jar) {
|
tasks.register("distSourcesJar", Jar) {
|
||||||
dependsOn(sourcesJar, configurations.commonSources)
|
dependsOn(sourcesJar, configurations.commonSources)
|
||||||
destinationDirectory = file("$buildDir/lib/dist")
|
destinationDirectory = file("$buildDir/lib/dist")
|
||||||
archiveClassifier.set('sources')
|
archiveClassifier.set('sources')
|
||||||
@@ -331,19 +334,22 @@ node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise Node ignores nodeModulesDir
|
// Otherwise Node ignores nodeModulesDir
|
||||||
task deleteLegacyNodeModules(type: Delete) {
|
tasks.register("deleteLegacyNodeModules", Delete) {
|
||||||
delete "$projectDir/node_modules"
|
delete "$projectDir/node_modules"
|
||||||
}
|
}
|
||||||
|
|
||||||
task installMocha(type: NpmTask, dependsOn: [deleteLegacyNodeModules]) {
|
tasks.register("installMocha", NpmTask) {
|
||||||
|
dependsOn(deleteLegacyNodeModules)
|
||||||
args = ['install', 'mocha@8.0.1']
|
args = ['install', 'mocha@8.0.1']
|
||||||
}
|
}
|
||||||
|
|
||||||
task installTeamcityReporter(type: NpmTask, dependsOn: [deleteLegacyNodeModules]) {
|
tasks.register("installTeamcityReporter", NpmTask) {
|
||||||
|
dependsOn(deleteLegacyNodeModules)
|
||||||
args = ['install', 'mocha-teamcity-reporter@3.0.0']
|
args = ['install', 'mocha-teamcity-reporter@3.0.0']
|
||||||
}
|
}
|
||||||
|
|
||||||
task runMocha(type: NodeTask, dependsOn: [testClasses, installMocha, ':kotlin-test:kotlin-test-js:testClasses']) {
|
tasks.register("runMocha", NodeTask) {
|
||||||
|
dependsOn(testClasses, installMocha, ':kotlin-test:kotlin-test-js:testClasses')
|
||||||
script = file("${buildDir}/node_modules/mocha/bin/mocha")
|
script = file("${buildDir}/node_modules/mocha/bin/mocha")
|
||||||
|
|
||||||
if (project.hasProperty("teamcity")) {
|
if (project.hasProperty("teamcity")) {
|
||||||
|
|||||||
@@ -224,7 +224,8 @@ compileLongRunningTestKotlin {
|
|||||||
|
|
||||||
configureFrontendIr(project)
|
configureFrontendIr(project)
|
||||||
|
|
||||||
task longRunningTest(type: Test, dependsOn: longRunningTestClasses) {
|
tasks.register("longRunningTest", Test) {
|
||||||
|
dependsOn(longRunningTestClasses)
|
||||||
group = "verification"
|
group = "verification"
|
||||||
testClassesDirs = sourceSets.longRunningTest.output.classesDirs
|
testClassesDirs = sourceSets.longRunningTest.output.classesDirs
|
||||||
classpath = sourceSets.longRunningTest.runtimeClasspath
|
classpath = sourceSets.longRunningTest.runtimeClasspath
|
||||||
|
|||||||
+1
-1
@@ -416,7 +416,7 @@ class KotlinGradleIT : KGPBaseTest() {
|
|||||||
buildGradle.appendText(
|
buildGradle.appendText(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
tasks.register("sourcesJar", Jar) {
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
archiveClassifier = 'source'
|
archiveClassifier = 'source'
|
||||||
duplicatesStrategy = 'fail' // fail in case of Java source duplication, see KT-17564
|
duplicatesStrategy = 'fail' // fail in case of Java source duplication, see KT-17564
|
||||||
|
|||||||
+1
-1
@@ -219,7 +219,7 @@ class MultiplatformGradleIT : BaseGradleIT() {
|
|||||||
gradleBuildScript("libJvm").appendText(
|
gradleBuildScript("libJvm").appendText(
|
||||||
"""
|
"""
|
||||||
${'\n'}
|
${'\n'}
|
||||||
task printCompileConfiguration(type: DefaultTask) {
|
tasks.register("printCompileConfiguration", DefaultTask) {
|
||||||
doFirst {
|
doFirst {
|
||||||
configurations.getByName("api").dependencies.each {
|
configurations.getByName("api").dependencies.each {
|
||||||
println("Dependency: '" + it.name + "'")
|
println("Dependency: '" + it.name + "'")
|
||||||
|
|||||||
+2
-1
@@ -21,7 +21,8 @@ configurations {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task obfuscate(type: proguard.gradle.ProGuardTask, dependsOn: jar) {
|
tasks.register("obfuscate", proguard.gradle.ProGuardTask) {
|
||||||
|
dependsOn(jar)
|
||||||
injars "${jar.archivePath}"
|
injars "${jar.archivePath}"
|
||||||
outjars "$buildDir/proguard/out.jar"
|
outjars "$buildDir/proguard/out.jar"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,6 +5,6 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
+1
-1
@@ -5,6 +5,6 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
+1
-1
@@ -5,6 +5,6 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
+1
-1
@@ -33,7 +33,7 @@ dependencies {
|
|||||||
implementation "org.mozilla:rhino:1.7.7.1"
|
implementation "org.mozilla:rhino:1.7.7.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
task runRhino(type: JavaExec) {
|
tasks.register("runRhino", JavaExec) {
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
workingDir = "${buildDir}/kotlin2js/main/"
|
workingDir = "${buildDir}/kotlin2js/main/"
|
||||||
mainClass = 'org.mozilla.javascript.tools.shell.Main'
|
mainClass = 'org.mozilla.javascript.tools.shell.Main'
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ dependencies {
|
|||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
task jarSources(type: Jar) {
|
tasks.register("jarSources", Jar) {
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
archiveClassifier = 'source'
|
archiveClassifier = 'source'
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ dependencies {
|
|||||||
testImplementation"org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
|
testImplementation"org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
task jarSources(type: Jar) {
|
tasks.register("jarSources", Jar) {
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
archiveClassifier = 'source'
|
archiveClassifier = 'source'
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -26,6 +26,6 @@ subprojects { project ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
+1
-1
@@ -23,6 +23,6 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile) {
|
|||||||
kotlinOptions.freeCompilerArgs += "-Xforce-deprecated-legacy-compiler-usage"
|
kotlinOptions.freeCompilerArgs += "-Xforce-deprecated-legacy-compiler-usage"
|
||||||
}
|
}
|
||||||
|
|
||||||
task runRhino(type: JavaExec) {
|
tasks.register("runRhino", JavaExec) {
|
||||||
dependsOn(tasks.named('processDceBrowserKotlinJs'))
|
dependsOn(tasks.named('processDceBrowserKotlinJs'))
|
||||||
classpath = kotlin.targets.browser.compilations.main.runtimeDependencyFiles
|
classpath = kotlin.targets.browser.compilations.main.runtimeDependencyFiles
|
||||||
workingDir = "${buildDir}"
|
workingDir = "${buildDir}"
|
||||||
|
|||||||
+1
-1
@@ -85,7 +85,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task resolveRuntimeDependencies(type: DefaultTask) {
|
tasks.register("resolveRuntimeDependencies", DefaultTask) {
|
||||||
doFirst {
|
doFirst {
|
||||||
// KT-26301
|
// KT-26301
|
||||||
def configName = kotlin.targets.jvm6.compilations.main.runtimeDependencyConfigurationName
|
def configName = kotlin.targets.jvm6.compilations.main.runtimeDependencyConfigurationName
|
||||||
|
|||||||
@@ -15,13 +15,14 @@ final File antHome = new File(buildDir, "ant-home")
|
|||||||
final File antZip = new File(buildDir, "apache-ant-$antVersion-bin.zip")
|
final File antZip = new File(buildDir, "apache-ant-$antVersion-bin.zip")
|
||||||
final File antExe = new File(antHome, "apache-ant-$antVersion/bin/ant$ext")
|
final File antExe = new File(antHome, "apache-ant-$antVersion/bin/ant$ext")
|
||||||
|
|
||||||
task downloadAnt(type: Download) {
|
tasks.register("downloadAnt", Download) {
|
||||||
src antURL
|
src antURL
|
||||||
dest antZip
|
dest antZip
|
||||||
overwrite false
|
overwrite false
|
||||||
}
|
}
|
||||||
|
|
||||||
task extractAnt(type: Sync, dependsOn: downloadAnt) {
|
tasks.register("extractAnt", Sync) {
|
||||||
|
dependsOn(downloadAnt)
|
||||||
from zipTree(antZip)
|
from zipTree(antZip)
|
||||||
into antHome
|
into antHome
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final File dokkaHome = new File(buildDir, "dokka-home")
|
final File dokkaHome = new File(buildDir, "dokka-home")
|
||||||
task setupDokka(type: Sync) {
|
tasks.register("setupDokka", Sync) {
|
||||||
from configurations.dokka
|
from configurations.dokka
|
||||||
into dokkaHome
|
into dokkaHome
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,8 @@ task setupCallDokka() {
|
|||||||
dependsOn project('kotlin_big').tasks.getByName('extractLibs')
|
dependsOn project('kotlin_big').tasks.getByName('extractLibs')
|
||||||
}
|
}
|
||||||
|
|
||||||
task callDokka(type: Exec, dependsOn: setupCallDokka) {
|
tasks.register("callDokka", Exec) {
|
||||||
|
dependsOn(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")
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ compileKotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task copyCopyrightProfile(type: Copy) {
|
tasks.register("copyCopyrightProfile", Copy) {
|
||||||
from "$rootDir/.idea/copyright"
|
from "$rootDir/.idea/copyright"
|
||||||
into "$buildDir/copyright"
|
into "$buildDir/copyright"
|
||||||
include 'apache.xml'
|
include 'apache.xml'
|
||||||
@@ -28,7 +28,7 @@ processResources {
|
|||||||
dependsOn(copyCopyrightProfile)
|
dependsOn(copyCopyrightProfile)
|
||||||
}
|
}
|
||||||
|
|
||||||
task run(type: JavaExec) {
|
tasks.register("run", JavaExec) {
|
||||||
group 'application'
|
group 'application'
|
||||||
mainClass = 'generators.GenerateStandardLibKt'
|
mainClass = 'generators.GenerateStandardLibKt'
|
||||||
classpath sourceSets.main.runtimeClasspath
|
classpath sourceSets.main.runtimeClasspath
|
||||||
@@ -36,7 +36,7 @@ task run(type: JavaExec) {
|
|||||||
systemProperty 'line.separator', '\n'
|
systemProperty 'line.separator', '\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
task generateStdlibTests(type: JavaExec) {
|
tasks.register("generateStdlibTests", JavaExec) {
|
||||||
group 'application'
|
group 'application'
|
||||||
mainClass = 'generators.GenerateStandardLibTestsKt'
|
mainClass = 'generators.GenerateStandardLibTestsKt'
|
||||||
classpath sourceSets.main.runtimeClasspath
|
classpath sourceSets.main.runtimeClasspath
|
||||||
@@ -44,7 +44,7 @@ task generateStdlibTests(type: JavaExec) {
|
|||||||
systemProperty 'line.separator', '\n'
|
systemProperty 'line.separator', '\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
task generateUnicodeData(type: JavaExec) {
|
tasks.register("generateUnicodeData", JavaExec) {
|
||||||
group 'application'
|
group 'application'
|
||||||
mainClass = 'generators.unicode.GenerateUnicodeDataKt'
|
mainClass = 'generators.unicode.GenerateUnicodeDataKt'
|
||||||
classpath sourceSets.main.runtimeClasspath
|
classpath sourceSets.main.runtimeClasspath
|
||||||
|
|||||||
Reference in New Issue
Block a user