Build: Fix usages of apis deprecated in Gradle 8

This commit is contained in:
Vyacheslav Gerasimov
2023-03-19 16:10:37 +01:00
committed by Space Team
parent bd9f096cfd
commit 76c54a8ff3
10 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ val generateCode by tasks.registering(NoDebugJavaExec::class) {
workingDir = rootDir workingDir = rootDir
classpath = generatorClasspath classpath = generatorClasspath
main = "org.jetbrains.kotlin.analysis.api.fir.generator.MainKt" mainClass.set("org.jetbrains.kotlin.analysis.api.fir.generator.MainKt")
systemProperties["line.separator"] = "\n" systemProperties["line.separator"] = "\n"
} }
+1 -1
View File
@@ -89,7 +89,7 @@ tasks.register<JavaExec>("runBenchmark") {
val benchmarkJarPath = "$buildDir/benchmarks/main/jars/benchmarks.jar" val benchmarkJarPath = "$buildDir/benchmarks/main/jars/benchmarks.jar"
args = mutableListOf("-Didea.home.path=$ideaHome", benchmarkJarPath, "-rf", "json", "-rff", resultFilePath) + jmhArgs.split("\\s".toRegex()) args = mutableListOf("-Didea.home.path=$ideaHome", benchmarkJarPath, "-rf", "json", "-rff", resultFilePath) + jmhArgs.split("\\s".toRegex())
main = "-jar" mainClass.set("-jar")
doLast { doLast {
if (project.kotlinBuildProperties.isTeamcityBuild) { if (project.kotlinBuildProperties.isTeamcityBuild) {
+1 -1
View File
@@ -48,7 +48,7 @@ val generateTree by tasks.registering(NoDebugJavaExec::class) {
args(generationRoot) args(generationRoot)
workingDir = rootDir workingDir = rootDir
classpath = generatorClasspath classpath = generatorClasspath
main = "org.jetbrains.kotlin.ir.generator.MainKt" mainClass.set("org.jetbrains.kotlin.ir.generator.MainKt")
systemProperties["line.separator"] = "\n" systemProperties["line.separator"] = "\n"
} }
@@ -20,7 +20,7 @@ dependencies {
} }
application { application {
mainClassName = "org.jetbrains.kotlin.ir.generator.MainKt" mainClass.set("org.jetbrains.kotlin.ir.generator.MainKt")
} }
sourceSets { sourceSets {
+4 -4
View File
@@ -627,14 +627,14 @@ task samples {
task samplesZip(type: Zip) task samplesZip(type: Zip)
task samplesTar(type: Tar) { task samplesTar(type: Tar) {
extension = 'tar.gz' archiveExtension = 'tar.gz'
compression = Compression.GZIP compression = Compression.GZIP
} }
configure([samplesZip, samplesTar]) { configure([samplesZip, samplesTar]) {
baseName "kotlin-native-samples-$kotlinVersion" archiveBaseName = "kotlin-native-samples-$kotlinVersion"
destinationDir = projectDir destinationDirectory = projectDir
into(baseName) into(archiveBaseName)
from(file('samples')) { from(file('samples')) {
// Process properties files separately. // Process properties files separately.
+2 -2
View File
@@ -44,7 +44,7 @@ jar {
} }
task libraryJarWithoutIr(type: Jar, dependsOn: compileKotlin2Js) { task libraryJarWithoutIr(type: Jar, dependsOn: compileKotlin2Js) {
classifier = 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')
@@ -69,7 +69,7 @@ task libraryJarWithIr(type: Zip, dependsOn: libraryJarWithoutIr) {
jar.dependsOn(libraryJarWithIr) jar.dependsOn(libraryJarWithIr)
task sourcesJar(type: Jar, dependsOn: classes) { task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources' archiveClassifier.set('sources')
from (sourceSets.main.allSource) from (sourceSets.main.allSource)
} }
+1 -1
View File
@@ -66,7 +66,7 @@ jar {
} }
task java9Jar(type: Jar) { task java9Jar(type: Jar) {
classifier = "java9" archiveClassifier.set("java9")
if (includeJava9) { if (includeJava9) {
from sourceSets.java9.output from sourceSets.java9.output
} }
+1 -1
View File
@@ -117,7 +117,7 @@ sourcesJar {
task distSourcesJar(type: Jar) { task distSourcesJar(type: Jar) {
dependsOn(sourcesJar, configurations.commonSources) dependsOn(sourcesJar, configurations.commonSources)
destinationDirectory = file("$buildDir/lib/dist") destinationDirectory = file("$buildDir/lib/dist")
classifier = 'sources' archiveClassifier.set('sources')
duplicatesStrategy = DuplicatesStrategy.FAIL duplicatesStrategy = DuplicatesStrategy.FAIL
from zipTree(sourcesJar.outputs.files.singleFile) from zipTree(sourcesJar.outputs.files.singleFile)
@@ -22,7 +22,7 @@ projectTest(parallel = true) {
publish() publish()
tasks.named<Jar>("jar").configure { tasks.named<Jar>("jar").configure {
classifier = "base" archiveClassifier.set("base")
} }
runtimeJar(rewriteDepsToShadedCompiler( runtimeJar(rewriteDepsToShadedCompiler(
+1 -1
View File
@@ -48,7 +48,7 @@ dependencies {
val runCommonizer by tasks.registering(JavaExec::class) { val runCommonizer by tasks.registering(JavaExec::class) {
classpath(configurations.compileOnly, sourceSets.main.get().runtimeClasspath) classpath(configurations.compileOnly, sourceSets.main.get().runtimeClasspath)
main = "org.jetbrains.kotlin.commonizer.cli.CommonizerCLI" mainClass.set("org.jetbrains.kotlin.commonizer.cli.CommonizerCLI")
} }
sourceSets { sourceSets {