Skip to content

Commit 87218a7

Browse files
committed
Gradle enterprise for openrewrite
1 parent 6a6d21b commit 87218a7

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
distribution: "temurin"
4141
java-version: ${{ matrix.java }}
42-
cache: 'gradle'
42+
cache: "gradle"
4343
- name: build
4444
run: ./gradlew ${GRADLE_SWITCHES} build test
4545
env:
@@ -63,15 +63,7 @@ jobs:
6363
with:
6464
distribution: "temurin"
6565
java-version: "11"
66-
- name: setup-cache
67-
uses: actions/[email protected]
68-
with:
69-
path: |
70-
~/.gradle/caches
71-
~/.gradle/wrapper
72-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
73-
restore-keys: |
74-
${{ runner.os }}-gradle-
66+
cache: "gradle"
7567
- name: publish-snapshots
7668
timeout-minutes: 30
7769
run: ./gradlew ${GRADLE_SWITCHES} snapshot publish -PforceSigning -x test

.github/workflows/publish.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,7 @@ jobs:
2424
with:
2525
distribution: "temurin"
2626
java-version: "11"
27-
- name: setup-cache
28-
uses: actions/[email protected]
29-
with:
30-
path: |
31-
~/.gradle/caches
32-
~/.gradle/wrapper
33-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
34-
restore-keys: |
35-
${{ runner.os }}-gradle-
27+
cache: "gradle"
3628

3729
- name: publish-candidate
3830
if: contains(github.ref, '-rc.')
@@ -44,7 +36,6 @@ jobs:
4436
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_SIGNING_KEY }}
4537
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
4638
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
47-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4839

4940
- name: publish-release
5041
if: (!contains(github.ref, '-rc.'))
@@ -55,3 +46,4 @@ jobs:
5546
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
5647
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_SIGNING_KEY }}
5748
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
49+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

settings.gradle.kts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
11
rootProject.name = "rewrite-testing-frameworks"
2+
3+
plugins {
4+
id("com.gradle.enterprise") version "3.7"
5+
}
6+
7+
gradleEnterprise {
8+
server = "https://ge.openrewrite.org/"
9+
10+
buildCache {
11+
local {
12+
isEnabled = true
13+
}
14+
15+
remote(HttpBuildCache::class) {
16+
isPush = true
17+
url = uri("https://ge.openrewrite.org/cache/")
18+
}
19+
20+
}
21+
22+
buildScan {
23+
publishAlways()
24+
}
25+
}

0 commit comments

Comments
 (0)