Skip to content

Commit

Permalink
Centralize CI build JDK, update with Renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Feb 27, 2025
1 parent b9b8b45 commit 2831c08
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
6 changes: 0 additions & 6 deletions .github/renovate.json

This file was deleted.

26 changes: 26 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
],
ignorePresets: [
// Ensure we get the latest version and are not pinned to old versions.
'workarounds:javaLTSVersions',
],
customManagers: [
// Update .java-version file with the latest JDK version.
{
customType: 'regex',
fileMatch: [
'\\.java-version$',
],
matchStrings: [
'(?<currentValue>.*)\\n',
],
datasourceTemplate: 'java-version',
depNameTemplate: 'java',
// Only write the major version.
extractVersionTemplate: '^(?<version>\\d+)',
},
]
}
1 change: 1 addition & 0 deletions .github/workflows/.java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Configure JDK
uses: actions/setup-java@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'gradle'
java-version-file: .github/workflows/.java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
Expand Down

0 comments on commit 2831c08

Please sign in to comment.