Skip to content

Commit

Permalink
Upgrade to Gradle 8.10
Browse files Browse the repository at this point in the history
Also enable the configuration cache again. Fingers crossed.
  • Loading branch information
zapek committed Aug 14, 2024
1 parent d506714 commit 4b131a0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Build
run: .\gradlew.bat jpackage --no-configuration-cache
run: .\gradlew.bat jpackage

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Build
run: ./gradlew jpackage --no-configuration-cache
run: ./gradlew jpackage

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
9 changes: 8 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ tasks.register('copyInstaller', Copy) {
doNotTrackState("Copying installation file need to re-run every time")
}

// needed to avoid duplicate jars in 'libs' when changing versions
tasks.register('deleteLibs', Delete) {
delete "${project.buildDir}/${project.libsDirName}/"
}
Expand All @@ -103,8 +104,14 @@ bootBuildImage {
imageName = "zapek/${rootProject.name.toLowerCase(Locale.ROOT)}:${project.version}"
}

// This is needed to have jpackage work with the configuration cache, see https://github.com/petr-panteleyev/jpackage-gradle-plugin/issues/29
def jpackageWorkdir = layout.buildDirectory.file('jpackage')
tasks.register('cleanJpackageWorkdir', Delete) {
delete jpackageWorkdir
}

jpackage {
dependsOn "deleteLibs" // needed to avoid duplicate jars in 'libs' when changing versions
dependsOn deleteLibs, cleanJpackageWorkdir
mustRunAfter "deleteLibs"
dependsOn "bootJar"
dependsOn "copyInstaller"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ plugins {

// To upgrade Gradle, change the version here, refresh, then run the 'build setup/wrapper' task
wrapper {
gradleVersion = '8.9'
gradleVersion = '8.10'
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
# along with Xeres. If not, see <http://www.gnu.org/licenses/>.
#
org.gradle.parallel=true
org.gradle.configuration-cache=false
org.gradle.configuration-cache=true
org.gradle.caching=true
org.gradle.configureondemand=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down

0 comments on commit 4b131a0

Please sign in to comment.