[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
@@ -16,7 +16,7 @@ task konanRun {
|
||||
|
||||
task configureBuild {
|
||||
doLast {
|
||||
mkdir "${buildDir.absolutePath}"
|
||||
mkdir "${layout.buildDirectory.get().asFile.absolutePath}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,23 +33,21 @@ task configureBuild {
|
||||
}
|
||||
|
||||
task clean {
|
||||
doLast {
|
||||
delete "${buildDir.absolutePath}"
|
||||
}
|
||||
delete(layout.buildDirectory)
|
||||
}
|
||||
|
||||
task konanJsonReport {
|
||||
doLast {
|
||||
def nativeCompileTime = MPPTools.getCompileBenchmarkTime(project.ext.applicationName, project.ext.buildSteps.keySet(),
|
||||
project.ext.repeatNumber, exitCodes)
|
||||
def nativeExecutable = "${buildDir.absolutePath}/program${MPPTools.getNativeProgramExtension()}"
|
||||
def nativeExecutable = layout.buildDirectory.file("program${MPPTools.getNativeProgramExtension()}").get().asFile.toString()
|
||||
def properties = getCommonProperties() + ['type': 'native',
|
||||
'compilerVersion': "${konanVersion}".toString(),
|
||||
'benchmarks': "[]",
|
||||
'compileTime': nativeCompileTime,
|
||||
'codeSize': MPPTools.getCodeSizeBenchmark(project.ext.applicationName, nativeExecutable) ]
|
||||
def output = MPPTools.createJsonReport(properties)
|
||||
new File("${buildDir.absolutePath}/${nativeJson}").write(output)
|
||||
layout.buildDirectory.file(nativeJson).get().asFile.write(output)
|
||||
}
|
||||
}
|
||||
task jvmRun {
|
||||
|
||||
Reference in New Issue
Block a user