Skip to content

Commit 34760ef

Browse files
Enable Local Build Caching and Apply Optimizations (#2656)
* Normalize manifest file * Remove develocity-workspace-id from version control This is an identifier captured by Develocity used to uniquely represent a given workspace should not be committed * Enable local build cache * Use develocity-actions/setup-maven to surface Build Scan links Don't add PR comment with build scan links - scans aren't published for PR builds against forks
1 parent 71604b5 commit 34760ef

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@ jobs:
9292
distribution: 'temurin'
9393
java-version: '21'
9494

95+
- name: Setup Develocity
96+
uses: gradle/develocity-actions/[email protected]
97+
with:
98+
add-pr-comment: false
99+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
100+
95101
- name: Compile project
96102
run: ./mvnw -B -ntp clean package -Pquickbuild -Dtoolchain.skip=true
97-
env:
98-
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
99103

100104
- name: Perform CodeQL Analysis
101105
uses: github/codeql-action/analyze@v2

.github/workflows/receive-pr.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
java-version: '21'
2929
distribution: 'temurin'
3030
cache: 'maven'
31+
- name: Setup Develocity
32+
uses: gradle/develocity-actions/[email protected]
33+
with:
34+
add-pr-comment: false
35+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3136

3237
# Capture the PR number
3338
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
@@ -43,8 +48,6 @@ jobs:
4348
# Execute recipes
4449
- name: Apply OpenRewrite recipes
4550
run: ./mvnw -Dtoolchain.skip=true -Dlicense.skip=true -DskipTests=true -P openrewrite clean install
46-
env:
47-
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
4851

4952
# Capture the diff
5053
- name: Create patch

.mvn/.develocity/develocity-workspace-id

Lines changed: 0 additions & 1 deletion
This file was deleted.

.mvn/develocity.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</buildScan>
3434
<buildCache>
3535
<local>
36-
<enabled>false</enabled>
36+
<enabled>true</enabled>
3737
</local>
3838
<remote>
3939
<enabled>false</enabled>

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,22 @@
536536
<trimStackTrace>false</trimStackTrace>
537537
</configuration>
538538
</plugin>
539+
540+
<plugin>
541+
<groupId>com.gradle</groupId>
542+
<artifactId>develocity-maven-extension</artifactId>
543+
<configuration>
544+
<develocity>
545+
<normalization>
546+
<runtimeClassPath>
547+
<metaInf>
548+
<ignoreCompletely>true</ignoreCompletely>
549+
</metaInf>
550+
</runtimeClassPath>
551+
</normalization>
552+
</develocity>
553+
</configuration>
554+
</plugin>
539555
</plugins>
540556
</pluginManagement>
541557

0 commit comments

Comments
 (0)