Drop useless :commonDistRuntime Gradle task
Reasons:
1. This task does not depend on anything. So, Gradle typically runs it somewhere in the very beginning of the build when the artifacts that this task is supposed to copy are not yet built.
2. This task is always used in conjunction with ":${target}CrossDistRuntime", which has all the necessary dependencies and does everything what :commonDistRuntime is supposed to do plus some additional work.
This commit is contained in:
committed by
Dmitriy Dolovov
parent
f8073eaded
commit
2f32d37840
@@ -3899,7 +3899,7 @@ if (isAppleTarget(project)) {
|
|||||||
baseDir dir
|
baseDir dir
|
||||||
|
|
||||||
if (!useCustomDist) {
|
if (!useCustomDist) {
|
||||||
dependsOn ":${target.name}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
|
dependsOn ":${target.name}CrossDistRuntime", ':distCompiler'
|
||||||
}
|
}
|
||||||
|
|
||||||
extraOpts "-Xembed-bitcode-marker"
|
extraOpts "-Xembed-bitcode-marker"
|
||||||
@@ -3929,7 +3929,7 @@ if (isAppleTarget(project)) {
|
|||||||
baseDir dir
|
baseDir dir
|
||||||
|
|
||||||
if (!useCustomDist) {
|
if (!useCustomDist) {
|
||||||
dependsOn ":${target.name}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
|
dependsOn ":${target.name}CrossDistRuntime", ':distCompiler'
|
||||||
}
|
}
|
||||||
|
|
||||||
extraOpts "-Xembed-bitcode-marker"
|
extraOpts "-Xembed-bitcode-marker"
|
||||||
@@ -3955,7 +3955,7 @@ if (isAppleTarget(project)) {
|
|||||||
baseDir "$testOutputFramework/$testName"
|
baseDir "$testOutputFramework/$testName"
|
||||||
|
|
||||||
if (!useCustomDist) {
|
if (!useCustomDist) {
|
||||||
dependsOn ":${target}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
|
dependsOn ":${target}CrossDistRuntime", ':distCompiler'
|
||||||
}
|
}
|
||||||
|
|
||||||
extraOpts "-Xembed-bitcode-marker"
|
extraOpts "-Xembed-bitcode-marker"
|
||||||
@@ -3976,7 +3976,7 @@ if (isAppleTarget(project)) {
|
|||||||
baseDir "$testOutputFramework/$testName"
|
baseDir "$testOutputFramework/$testName"
|
||||||
|
|
||||||
if (!useCustomDist) {
|
if (!useCustomDist) {
|
||||||
dependsOn ":${target.name}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
|
dependsOn ":${target.name}CrossDistRuntime", ':distCompiler'
|
||||||
}
|
}
|
||||||
|
|
||||||
extraOpts "-Xembed-bitcode"
|
extraOpts "-Xembed-bitcode"
|
||||||
@@ -4003,7 +4003,7 @@ if (isAppleTarget(project)) {
|
|||||||
baseDir dir
|
baseDir dir
|
||||||
|
|
||||||
if (!useCustomDist) {
|
if (!useCustomDist) {
|
||||||
dependsOn ":${target.name}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
|
dependsOn ":${target.name}CrossDistRuntime", ':distCompiler'
|
||||||
}
|
}
|
||||||
|
|
||||||
extraOpts "-Xembed-bitcode"
|
extraOpts "-Xembed-bitcode"
|
||||||
@@ -4016,7 +4016,7 @@ if (isAppleTarget(project)) {
|
|||||||
baseDir dir
|
baseDir dir
|
||||||
|
|
||||||
if (!useCustomDist) {
|
if (!useCustomDist) {
|
||||||
dependsOn ":${target.name}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
|
dependsOn ":${target.name}CrossDistRuntime", ':distCompiler'
|
||||||
}
|
}
|
||||||
|
|
||||||
extraOpts "-Xembed-bitcode"
|
extraOpts "-Xembed-bitcode"
|
||||||
@@ -4045,7 +4045,7 @@ if (isAppleTarget(project)) {
|
|||||||
baseDir "$testOutputFramework/$testName"
|
baseDir "$testOutputFramework/$testName"
|
||||||
|
|
||||||
if (!useCustomDist) {
|
if (!useCustomDist) {
|
||||||
dependsOn ":${target}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
|
dependsOn ":${target}CrossDistRuntime", ':distCompiler'
|
||||||
}
|
}
|
||||||
|
|
||||||
linkerOpts "-L$buildDir"
|
linkerOpts "-L$buildDir"
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ fun configureCacheTesting(project: Project): CacheTesting? {
|
|||||||
val tasks = listOf(
|
val tasks = listOf(
|
||||||
"${target}CrossDist",
|
"${target}CrossDist",
|
||||||
"${target}CrossDistRuntime",
|
"${target}CrossDistRuntime",
|
||||||
"commonDistRuntime",
|
|
||||||
"distCompiler"
|
"distCompiler"
|
||||||
).map { task -> project.rootProject.tasks.getByName(task) }
|
).map { task -> project.rootProject.tasks.getByName(task) }
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ open class FrameworkTest : DefaultTask(), KonanTestExecutable {
|
|||||||
|
|
||||||
// set crossdist build dependency if custom konan.home wasn't set
|
// set crossdist build dependency if custom konan.home wasn't set
|
||||||
if (!(project.property("useCustomDist") as Boolean)) {
|
if (!(project.property("useCustomDist") as Boolean)) {
|
||||||
setRootDependency("${target}CrossDist", "${target}CrossDistRuntime", "commonDistRuntime", "distCompiler")
|
setRootDependency("${target}CrossDist", "${target}CrossDistRuntime", "distCompiler")
|
||||||
}
|
}
|
||||||
check(::testName.isInitialized) { "Test name should be set" }
|
check(::testName.isInitialized) { "Test name should be set" }
|
||||||
check(::frameworkNames.isInitialized) { "Framework names should be set" }
|
check(::frameworkNames.isInitialized) { "Framework names should be set" }
|
||||||
|
|||||||
+1
-13
@@ -412,7 +412,6 @@ task listDist(type: Exec) {
|
|||||||
|
|
||||||
task distRuntime(type: Copy) {
|
task distRuntime(type: Copy) {
|
||||||
dependsOn "${hostName}CrossDistRuntime"
|
dependsOn "${hostName}CrossDistRuntime"
|
||||||
dependsOn('commonDistRuntime')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task distEndorsedLibraries {
|
task distEndorsedLibraries {
|
||||||
@@ -436,19 +435,8 @@ def stdlibDefaultComponent = "$stdlib/default"
|
|||||||
def endorsedLibs = 'klib/common/endorsedLibraries'
|
def endorsedLibs = 'klib/common/endorsedLibraries'
|
||||||
def endorsedLibsBase = 'klib/common'
|
def endorsedLibsBase = 'klib/common'
|
||||||
|
|
||||||
task commonDistRuntime(type: Copy) {
|
|
||||||
destinationDir distDir
|
|
||||||
|
|
||||||
// Target independant common part.
|
|
||||||
from(project(':runtime').file("build/${hostName}Stdlib")) {
|
|
||||||
include('**')
|
|
||||||
into(stdlib)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task crossDistRuntime(type: Copy) {
|
task crossDistRuntime(type: Copy) {
|
||||||
dependsOn.addAll(targetList.collect { "${it}CrossDistRuntime" })
|
dependsOn.addAll(targetList.collect { "${it}CrossDistRuntime" })
|
||||||
dependsOn('commonDistRuntime')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task crossDistEndorsedLibraries(type: Copy) {
|
task crossDistEndorsedLibraries(type: Copy) {
|
||||||
@@ -514,7 +502,7 @@ targetList.each { target ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
task("${target}CrossDist") {
|
task("${target}CrossDist") {
|
||||||
dependsOn "${target}CrossDistRuntime", "distCompiler", "commonDistRuntime", "${target}CrossDistEndorsedLibraries"
|
dependsOn "${target}CrossDistRuntime", "distCompiler", "${target}CrossDistEndorsedLibraries"
|
||||||
if (target in cacheableTargetNames) {
|
if (target in cacheableTargetNames) {
|
||||||
dependsOn "${target}StdlibCache", "${target}EndorsedCache"
|
dependsOn "${target}StdlibCache", "${target}EndorsedCache"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user