Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 26340dc

Browse files
authored
Adjust cleanup script name for gradle 8.9+ (#17)
* Adjust cleanup script name * Update readme * Adjust test app
1 parent 147b7b4 commit 26340dc

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ For Gradle >= 8, the orb uses the 'officially endorsed' method of cleaning up th
5454
| Orb version | Official Orb Version | Gradle version(s) |
5555
| ------------- | -------------------- | ---------------------------- |
5656
| 0.0.9 | 3.0.0 | 8.0-8.7 |
57-
| 0.1.0 | 3.0.0 | 8.8 |
57+
| 0.1.0 | 3.0.0 | 8.0-8.8 |
58+
| 0.1.1 | 3.0.0 | 8.0-8.9 |
5859

5960
## Caching strategy
6061
In a nutshell, this orb __detects previous build file changes via the git history__, so that it can restore the previous Gradle cache regardless of what changed in the latest commit.

sample_app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
repositories {
7-
jcenter()
7+
mavenCentral()
88
}
99

1010
ext {

src/scripts/cleanup.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ if [ "$gradleWrapperMainVersion" -ge "8" ]; then
5959

6060
# create dummy build files
6161
touch $GRADLE_ORB_TEMP_DIRECTORY/settings.gradle
62-
touch $GRADLE_ORB_TEMP_DIRECTORY/cleanup.gradle
62+
touch $GRADLE_ORB_TEMP_DIRECTORY/build.gradle
6363

6464
CURRENT_DIRECTORY=$(pwd)
6565

6666
cd $GRADLE_ORB_TEMP_DIRECTORY || exit # exit due to shellcheck
6767
echo "A new cache entry will be created, cleaning files not accessed during the last 24 hours.."
68-
$CURRENT_DIRECTORY/gradlew -b cleanup.gradle projects --info --stacktrace
68+
$CURRENT_DIRECTORY/gradlew projects --info --stacktrace
6969
# clean up
7070
rm $GRADLE_INIT_DIRECTORY/cache-settings.gradle
7171
rm -rf $GRADLE_ORB_TEMP_DIRECTORY

0 commit comments

Comments
 (0)