mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
Upgrade gradle to 8.12.1 (from 8.12) and fix some build warnings (#910)
Build warning fixes: * Return `tasks.register` as `tasks.create` is deprecated * Use property accessor `.files` instead of function `.files()`
This commit is contained in:
@@ -87,11 +87,11 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun createCompatibilityTestTask(versionInfo: GradleVersionInfo): Task =
|
fun createCompatibilityTestTask(versionInfo: GradleVersionInfo) =
|
||||||
createCompatibilityTestTask(versionInfo.version, versionInfo.downloadUrl)
|
createCompatibilityTestTask(versionInfo.version, versionInfo.downloadUrl)
|
||||||
|
|
||||||
fun createCompatibilityTestTask(version: String, downloadUrl: String): Task {
|
fun createCompatibilityTestTask(version: String, downloadUrl: String): TaskProvider<Test> {
|
||||||
return tasks.create("compatibilityTest$version", Test::class.java) {
|
return tasks.register("compatibilityTest$version", Test::class.java) {
|
||||||
mustRunAfter(tasks.test)
|
mustRunAfter(tasks.test)
|
||||||
|
|
||||||
maxHeapSize = tasks.test.get().maxHeapSize
|
maxHeapSize = tasks.test.get().maxHeapSize
|
||||||
|
|||||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=7a00d51fb93147819aab76024feece20b6b84e420694101f276be952e08bef03
|
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -68,7 +68,7 @@ sourceSets { main { java { srcDir("src/main/java") } } }
|
|||||||
val prepareHistoricalDistributions by
|
val prepareHistoricalDistributions by
|
||||||
tasks.registering {
|
tasks.registering {
|
||||||
val outputDir = layout.buildDirectory.dir("pklHistoricalDistributions")
|
val outputDir = layout.buildDirectory.dir("pklHistoricalDistributions")
|
||||||
inputs.files(pklHistoricalDistributions.files())
|
inputs.files(pklHistoricalDistributions.files)
|
||||||
outputs.dir(outputDir)
|
outputs.dir(outputDir)
|
||||||
doLast {
|
doLast {
|
||||||
val distributionDir = outputDir.get().asFile.toPath().also(Files::createDirectories)
|
val distributionDir = outputDir.get().asFile.toPath().also(Files::createDirectories)
|
||||||
|
|||||||
@@ -52,13 +52,13 @@ dependencies {
|
|||||||
|
|
||||||
// TODO: need to figure out how to properly generate javadoc here.
|
// TODO: need to figure out how to properly generate javadoc here.
|
||||||
// For now, we'll include a dummy javadoc jar.
|
// For now, we'll include a dummy javadoc jar.
|
||||||
val javadocDummy by tasks.creating(Javadoc::class) { source = dummy.allJava }
|
val javadocDummy by tasks.registering(Javadoc::class) { source = dummy.allJava }
|
||||||
|
|
||||||
java { withJavadocJar() }
|
java { withJavadocJar() }
|
||||||
|
|
||||||
val javadocJar by
|
val javadocJar by
|
||||||
tasks.existing(Jar::class) {
|
tasks.existing(Jar::class) {
|
||||||
from(javadocDummy.outputs.files)
|
from(javadocDummy.get().outputs.files)
|
||||||
archiveBaseName.set("pkl-tools-all")
|
archiveBaseName.set("pkl-tools-all")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user