-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: update gradle to 8.5 (#92205)
* update gradle to 8.5 * using JavaToolChain with Java 17 * replaced calls to deprecated code where possible * removed scmversion-plugin * removed detekt-plugin * now using .github actions
- Loading branch information
1 parent
fb5a7ec
commit 3ee55d7
Showing
9 changed files
with
217 additions
and
904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,59 +6,20 @@ name: Run build and tests | |
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '**' | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
contents: read | ||
environment: CIRelease | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --all --tags | ||
|
||
- name: Create .gradle dir | ||
run: mkdir -p $HOME/.gradle | ||
- name: Install gpg secret key | ||
env: | ||
SIGNINGFILE: ${{ secrets.SIGNINGFILE }} | ||
run: | | ||
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import | ||
gpg --list-secret-keys --keyid-format LONG | ||
- name: Export gpg file | ||
env: | ||
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }} | ||
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }} | ||
run: | | ||
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg | ||
- name: Create gradle properties | ||
env: | ||
APIKEY: ${{ secrets.APIKEY }} | ||
APISECRET: ${{ secrets.APISECRET }} | ||
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }} | ||
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }} | ||
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }} | ||
SONATYPEUSER: ${{ secrets.SONATYPEUSER }} | ||
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties | ||
- name: Build and test with Gradle | ||
env: | ||
ISHUSERNAME: ${{ secrets.ISHUSERNAME }} | ||
ISHKEY: ${{ secrets.ISHKEY }} | ||
JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M" | ||
GRADLE_OPTS: "-Dorg.gradle.daemon=true" | ||
run: ./gradlew test build :publishIntershopMvnPublicationToMavenRepository -s --scan | ||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action/composite@v1 | ||
if: always() | ||
with: | ||
files: build/test-results/**/*.xml | ||
- name: Post Build | ||
run: rm -f $HOME/.gradle/gradle.properties && rm -f $HOME/.docker/config.json | ||
- name: Setup | ||
uses: IntershopCommunicationsAG/.github/actions/[email protected] | ||
- name: Build | ||
uses: IntershopCommunicationsAG/.github/actions/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,58 +6,26 @@ name: Run release build from tag | |
on: | ||
push: | ||
tags: | ||
- '*' | ||
- '**' | ||
|
||
jobs: | ||
release: | ||
build: | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
contents: read | ||
environment: CIRelease | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --all --tag | ||
- name: Create .gradle dir | ||
run: mkdir -p $HOME/.gradle | ||
- id: install-secret-key | ||
name: Install gpg secret key | ||
env: | ||
SIGNINGFILE: ${{ secrets.SIGNINGFILE }} | ||
run: | | ||
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import | ||
gpg --list-secret-keys --keyid-format LONG | ||
- id: export-gpg-file | ||
name: Export gpg file | ||
env: | ||
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }} | ||
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }} | ||
run: | | ||
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg | ||
- name: Create gradle sproperties | ||
env: | ||
APIKEY: ${{ secrets.APIKEY }} | ||
APISECRET: ${{ secrets.APISECRET }} | ||
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }} | ||
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }} | ||
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }} | ||
SONATYPEUSER: ${{ secrets.SONATYPEUSER }} | ||
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties | ||
- name: Run gradle release | ||
env: | ||
ISHUSERNAME: ${{ secrets.ISHUSERNAME }} | ||
ISHKEY: ${{ secrets.ISHKEY }} | ||
JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M" | ||
GRADLE_OPTS: "-Dorg.gradle.daemon=true" | ||
run: ./gradlew -PrunOnCI=true test build :publishIntershopMvnPublicationToMavenRepository :publishPlugins -s --scan | ||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action/composite@v1 | ||
if: always() | ||
- name: Setup | ||
uses: IntershopCommunicationsAG/.github/actions/[email protected] | ||
- name: Release | ||
uses: IntershopCommunicationsAG/.github/actions/[email protected] | ||
with: | ||
files: build/test-results/**/*.xml | ||
- name: Post Build | ||
run: rm -f $HOME/.gradle/gradle.properties | ||
signing-file: ${{ secrets.SIGNINGFILE }} | ||
signing-key-id: ${{ secrets.SIGNINGKEYID }} | ||
signing-password: ${{ secrets.SIGNINGPASSWORD }} | ||
api-key: ${{ secrets.APIKEY }} | ||
api-secret: ${{ secrets.APISECRET }} | ||
sonatype-user: ${{ secrets.SONATYPEUSER }} | ||
sonatype-password: ${{ secrets.SONATYPEPASSWORD }} |
Oops, something went wrong.