[Build] Migrate most of the build logic from Project.buildDir usage
It's going to be deprecated in Gradle 8.3 There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242 ^KTI-1473 In Progress
This commit is contained in:
committed by
Space Team
parent
b784544f8d
commit
a19bd2ed2e
@@ -89,7 +89,7 @@ kotlinNativeInterop {
|
||||
// To enforce linking with proper libc++, pass the default path explicitly:
|
||||
linkerOpts "-L${hostPlatform.absoluteTargetSysRoot}/usr/lib"
|
||||
}
|
||||
linkerOpts "-L$llvmDir/lib", "-L${rootProject.project(':kotlin-native:llvmDebugInfoC').buildDir}", "-L${rootProject.project(':kotlin-native:libllvmext').buildDir}"
|
||||
linkerOpts "-L$llvmDir/lib", "-L${rootProject.project(':kotlin-native:llvmDebugInfoC').layout.buildDirectory.get().asFile}", "-L${rootProject.project(':kotlin-native:libllvmext').layout.buildDirectory.get().asFile}"
|
||||
}
|
||||
|
||||
files {
|
||||
|
||||
@@ -3016,16 +3016,17 @@ KotlinNativeTestKt.createTest(project, "kt39548", KonanStandaloneTest) { task ->
|
||||
task.enabled = isWindowsTarget(project)
|
||||
|
||||
if (task.enabled) {
|
||||
def ktFile = project.layout.buildDirectory.file("kt39548/kt39548.kt").get().asFile
|
||||
konanArtifacts {
|
||||
program(name, targets: [target.name]) {
|
||||
baseDir "$testOutputLocal/$name"
|
||||
srcFiles "$buildDir/kt39548/kt39548.kt" // Generated by doBeforeBuild task.
|
||||
srcFiles ktFile.toString() // Generated by doBeforeBuild task.
|
||||
extraOpts task.flags
|
||||
extraOpts project.globalTestArgs
|
||||
}
|
||||
}
|
||||
doBeforeBuild {
|
||||
GenTestKT39548Kt.genTestKT39548(file("$buildDir/kt39548/kt39548.kt"))
|
||||
GenTestKT39548Kt.genTestKT39548(ktFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3311,15 +3312,16 @@ linkTest("inline_innerInlineFunCapturesOuter_linkTest") {
|
||||
}
|
||||
|
||||
def generateWithSpaceDefFile() {
|
||||
def mapOption = "--Map \"${buildDir}/cutom map.map\""
|
||||
def buildDirectory = project.layout.buildDirectory.get().asFile
|
||||
def mapOption = "--Map \"$buildDirectory/cutom map.map\""
|
||||
if (isAppleTarget(project)) {
|
||||
mapOption = "-map \"${buildDir}/cutom map.map\""
|
||||
mapOption = "-map \"$buildDirectory/cutom map.map\""
|
||||
} else if (isWindowsTarget(project)) {
|
||||
mapOption = "\"-Wl,--Map,${buildDir}/cutom map.map\""
|
||||
mapOption = "\"-Wl,--Map,$buildDirectory/cutom map.map\""
|
||||
}
|
||||
|
||||
buildDir.mkdirs()
|
||||
def file = new File("${buildDir}/withSpaces.def")
|
||||
buildDirectory.mkdirs()
|
||||
def file = new File("${buildDirectory}/withSpaces.def")
|
||||
file.write """
|
||||
headers = stdio.h "${projectDir}/interop/basics/custom headers/custom.h"
|
||||
linkerOpts = $mapOption
|
||||
@@ -3429,7 +3431,7 @@ createInterop("embedStaticLibraries") {
|
||||
it.headers "$projectDir/interop/embedStaticLibraries/embedStaticLibraries.h"
|
||||
|
||||
// Note: also hardcoded in def file.
|
||||
final String libDir = "$buildDir/embedStaticLibraries/"
|
||||
final File libDir = project.layout.buildDirectory.dir("embedStaticLibraries").get().asFile
|
||||
|
||||
it.getByTarget(target.name).configure {
|
||||
doFirst {
|
||||
@@ -3456,7 +3458,7 @@ createInterop("kt43502") {
|
||||
it.defFile 'interop/kt43502/kt43502.def'
|
||||
it.headers "$projectDir/interop/kt43502/kt43502.h"
|
||||
// Note: also hardcoded in def file.
|
||||
final String libDir = "$buildDir/kt43502/"
|
||||
final File libDir = project.layout.buildDirectory.dir("kt43502").get().asFile
|
||||
// Construct library that contains actual symbol definition.
|
||||
it.getByTarget(target.name).configure {
|
||||
doFirst {
|
||||
@@ -3700,7 +3702,7 @@ Task interopTestBase(String name, boolean multiFile, boolean interop2ForMainOnly
|
||||
}
|
||||
srcFiles multiFile ? fileTree(task.source) { include '**/*.kt' } : task.getSources()
|
||||
baseDir "$testOutputLocal/$name"
|
||||
linkerOpts "-L$buildDir"
|
||||
linkerOpts "-L${project.layout.buildDirectory.get().asFile}"
|
||||
extraOpts task.flags
|
||||
extraOpts project.globalTestArgs
|
||||
}
|
||||
@@ -3869,7 +3871,7 @@ interopTest("interop_withSpaces") {
|
||||
source = "interop/basics/withSpaces.kt"
|
||||
|
||||
doLast {
|
||||
assert file("${buildDir}/cutom map.map").exists()
|
||||
assert project.layout.buildDirectory.file("cutom map.map").get().asFile.exists()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3992,16 +3994,17 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
source = "interop/objc/smoke.kt"
|
||||
interop = 'objcSmoke'
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcsmoke.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/smoke.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcsmoke.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
// Enable ARC optimizations to prevent some objects from leaking in Obj-C code due to exceptions:
|
||||
args '-O2'
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjcsmoke.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
|
||||
copy {
|
||||
@@ -4018,16 +4021,17 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
interop = 'objcSmoke'
|
||||
verifyIr = false // KT-57716
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcsmoke.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/smoke.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcsmoke.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
// Enable ARC optimizations to prevent some objects from leaking in Obj-C code due to exceptions:
|
||||
args '-O2'
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjcsmoke.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
|
||||
copy {
|
||||
@@ -4056,16 +4060,17 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
}
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjctests.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args fileTree("$projectDir/interop/objc/tests/") { include '**/*.m' }
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjctests.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
// Enable ARC optimizations to prevent some objects from leaking in Obj-C code due to exceptions:
|
||||
args '-O2'
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjctests.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4100,14 +4105,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
interop = 'objcMisc'
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcmisc.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc_with_initializer/objc_misc.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcmisc.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjcmisc.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4117,14 +4123,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
interop = 'objcMessaging'
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcmessaging.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/msg_send/messaging.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcmessaging.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjcmessaging.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4146,14 +4153,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
UtilsKt.dependsOnPlatformLibs(it)
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcexception.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/foreignException/objc_wrap.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcexception.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjcexception.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4165,14 +4173,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
UtilsKt.dependsOnPlatformLibs(it)
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcexception.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/foreignException/objc_wrap.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcexception.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjcexception.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4184,14 +4193,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
UtilsKt.dependsOnPlatformLibs(it)
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcexception.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/foreignException/objc_wrap.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcexception.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjcexception.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4217,14 +4227,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
useGoldenData = true
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjc_kt42172.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/kt42172/objclib.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjc_kt42172.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjc_kt42172.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4282,29 +4293,31 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
}
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjc_kt55938.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/kt55938/objclib.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjc_kt55938.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjc_kt55938.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
standaloneTest("objc_arc_contract") {
|
||||
def bcFile = project.layout.buildDirectory.file("objc_arc_contract.bc").get().asFile
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
mkdir(bcFile.parentFile)
|
||||
ExecLlvmKt.execLlvmUtility(project, "llvm-as") {
|
||||
args "$projectDir/interop/objc_arc_contract/main.ll"
|
||||
args "-o", "$buildDir/objc_arc_contract.bc"
|
||||
args "-o", bcFile.toString()
|
||||
}
|
||||
}
|
||||
source = "interop/objc_arc_contract/main.kt"
|
||||
useGoldenData = true
|
||||
flags = ["-native-library", "$buildDir/objc_arc_contract.bc"]
|
||||
flags = ["-native-library", bcFile.toString()]
|
||||
}
|
||||
|
||||
interopTest("interop_objc_include_categories") {
|
||||
@@ -4312,14 +4325,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
source = "interop/objc/include_categories/main.kt"
|
||||
interop = "objc_include_categories"
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcincludecategories.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/include_categories/objc_include_categories.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcincludecategories.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjcincludecategories.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4349,16 +4363,17 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
flags = ["-tr", "-e", "runAllTests"] // Generate test suites, but use custom entrypoint.
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjc_kt56402.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/kt56402/objclib.m"
|
||||
args "-g"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjc_kt56402.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
args '-framework', 'AppKit'
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjc_kt56402.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4370,14 +4385,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
flags = ["-tr"]
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjc_friendly_dealloc.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/objc_friendly_dealloc/objclib.m"
|
||||
args "-lobjc", '-fno-objc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjc_friendly_dealloc.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjc_friendly_dealloc.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
UtilsKt.dependsOnPlatformLibs(it)
|
||||
@@ -4388,14 +4404,15 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
interop = "objCAction"
|
||||
flags = ["-tr"]
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjCAction.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/objCAction/objclib.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjCAction.dylib"
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, "$buildDir/libobjCAction.dylib")
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
UtilsKt.dependsOnPlatformLibs(it)
|
||||
@@ -4413,15 +4430,16 @@ tasks.register("KT-50983", KonanDriverTest) {
|
||||
// The test is not working on Windows Server 2019-based TeamCity agents for the unknown reason.
|
||||
// TODO: Re-enable it after LLVM update where llvm-windres will be added.
|
||||
enabled = false
|
||||
def resFile = project.layout.buildDirectory.file("File.res").get().asFile
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
mkdir(resFile.parentFile)
|
||||
exec {
|
||||
commandLine UtilsKt.binaryFromToolchain(project, "windres")
|
||||
args "$projectDir/windows/KT-50983/File.rc", "-O", "coff", "-o", "$buildDir/File.res"
|
||||
args "$projectDir/windows/KT-50983/File.rc", "-O", "coff", "-o", resFile.toString()
|
||||
}
|
||||
}
|
||||
source = "windows/KT-50983/main.kt"
|
||||
flags = ['-linker-option', "$buildDir/File.res"]
|
||||
flags = ['-linker-option', resFile.toString()]
|
||||
}
|
||||
|
||||
standaloneTest("interop_libiconv") {
|
||||
@@ -4601,7 +4619,7 @@ standaloneTest("library_ir_provider_mismatch") {
|
||||
String invalidManifest = "$projectDir/link/ir_providers/library/manifest.properties"
|
||||
String mainSource = "$projectDir/link/ir_providers/hello.kt"
|
||||
|
||||
String outputDir = "$buildDir/$name"
|
||||
File outputDir = project.layout.buildDirectory.dir(name).get().asFile
|
||||
String currentTarget = project.target.name
|
||||
|
||||
inputs.files(librarySource, invalidManifest)
|
||||
@@ -4666,7 +4684,7 @@ standaloneTest("split_compilation_pipeline") {
|
||||
// Also, it is failing for some reason on Windows CI, but since MinGW targets are not inteneded
|
||||
// to use this mode, we can disable it for these targets.
|
||||
enabled = !twoStageEnabled && project.target.name != "mingw_x64" && project.target.name != "mingw_x86"
|
||||
def dir = buildDir.absolutePath
|
||||
def dir = project.layout.buildDirectory.get().asFile.absolutePath
|
||||
source = "link/private_fake_overrides/override_main.kt"
|
||||
doBeforeBuild {
|
||||
konanc("$projectDir/link/private_fake_overrides/override_lib.kt -p library -target ${target.name} -o $dir/lib.klib")
|
||||
@@ -4709,7 +4727,7 @@ Task frameworkTest(String name, Closure<FrameworkTest> configurator) {
|
||||
libraries {
|
||||
klibFile konanArtifacts[library].getArtifactByTarget(target.name)
|
||||
}
|
||||
linkerOpts "-L$buildDir"
|
||||
linkerOpts "-L${project.layout.buildDirectory.get().asFile}"
|
||||
UtilsKt.dependsOnKonanBuildingTask(task, library, target)
|
||||
}
|
||||
|
||||
@@ -5183,7 +5201,7 @@ Task pluginTest(String name, String pluginName, Closure configureClosure) {
|
||||
sourceSets[pluginName].output
|
||||
}
|
||||
archiveBaseName = pluginName
|
||||
destinationDirectory = buildDir
|
||||
destinationDirectory = project.layout.buildDirectory.get().asFile
|
||||
}
|
||||
def taskName = "$name-with-$pluginName"
|
||||
return KotlinNativeTestKt.createTest(project, taskName, KonanStandaloneTest) { task ->
|
||||
@@ -5194,7 +5212,7 @@ Task pluginTest(String name, String pluginName, Closure configureClosure) {
|
||||
program(taskName, targets: [target.name]) {
|
||||
baseDir "$testOutputLocal/$taskName"
|
||||
srcFiles task.getSources()
|
||||
extraOpts task.flags + "-Xplugin=$buildDir/nop-plugin.jar"
|
||||
extraOpts task.flags + "-Xplugin=${project.layout.buildDirectory.file("nop-plugin.jar").get().asFile}"
|
||||
extraOpts project.globalTestArgs
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user