Skip to content

Commit 8ffe8f0

Browse files
authored
Remove clean before test (#4476)
Add build caching for spotless format execution
1 parent 59389fa commit 8ffe8f0

File tree

4 files changed

+7
-23
lines changed

4 files changed

+7
-23
lines changed

.github/workflows/agp-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
agp: [ '8.7.0','8.8.0','8.9.0-beta01' ]
20+
agp: [ '8.7.0','8.8.0','8.9.0' ]
2121
integrations: [ true, false ]
2222

2323
name: AGP Matrix Release - AGP ${{ matrix.agp }} - Integrations ${{ matrix.integrations }}

.github/workflows/format-code.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,13 @@ jobs:
1818
distribution: 'temurin'
1919
java-version: '17'
2020

21-
- name: Cache Gradle packages
22-
uses: actions/cache@v4
21+
- name: Setup Gradle
22+
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326
2323
with:
24-
path: |
25-
~/.gradle/caches
26-
~/.gradle/wrapper
27-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
28-
restore-keys: |
29-
${{ runner.os }}-gradle-
24+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3025

31-
- name: Make format
32-
run: make format
26+
- name: Format with spotlessApply
27+
run: ./gradlew spotlessApply
3328

3429
# actions/checkout fetches only a single commit in a detached HEAD state. Therefore
3530
# we need to pass the current branch, otherwise we can't commit the changes.

Makefile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all clean compile javadocs dryRelease update stop checkFormat format api assembleBenchmarkTestRelease assembleUiTestRelease assembleUiTestCriticalRelease createCoverageReports runUiTestCritical check preMerge publish
1+
.PHONY: all clean compile javadocs dryRelease update checkFormat api assembleBenchmarkTestRelease assembleUiTestRelease assembleUiTestCriticalRelease createCoverageReports runUiTestCritical check preMerge publish
22

33
all: stop clean javadocs compile createCoverageReports
44
assembleBenchmarks: assembleBenchmarkTestRelease
@@ -26,19 +26,10 @@ dryRelease:
2626
update:
2727
./gradlew dependencyUpdates -Drevision=release
2828

29-
# We stop gradle at the end to make sure the cache folders
30-
# don't contain any lock files and are free to be cached.
31-
stop:
32-
./gradlew --stop
33-
3429
# Spotless check's code
3530
checkFormat:
3631
./gradlew spotlessJavaCheck spotlessKotlinCheck
3732

38-
# Spotless format's code
39-
format:
40-
./gradlew spotlessApply
41-
4233
# Binary compatibility validator
4334
api:
4435
./gradlew apiDump

build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,10 @@ allprojects {
9393
TestLogEvent.PASSED,
9494
TestLogEvent.FAILED
9595
)
96-
maxParallelForks = 1
9796

9897
// Cap JVM args per test
9998
minHeapSize = "256m"
10099
maxHeapSize = "2g"
101-
dependsOn("cleanTest")
102100
}
103101
withType<JavaCompile>().configureEach {
104102
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try"))

0 commit comments

Comments
 (0)