Skip to content

Commit

Permalink
add gradle build cache
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed May 24, 2024
1 parent 4accb02 commit 4497a48
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build --rerun-tasks
env:
GRADLE_BUILD_CACHE_USER: ${{ secrets.GRADLE_BUILD_CACHE_USER }}
GRADLE_BUILD_CACHE_TOKEN: ${{ secrets.GRADLE_BUILD_CACHE_TOKEN }}
- name: Upload build artifacts (Common)
continue-on-error: true
uses: actions/upload-artifact@v4
Expand Down
15 changes: 15 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ dependencyResolutionManagement {
}
}

def ENV = System.getenv()

buildCache {
remote(HttpBuildCache) {
url = "https://ci-cache.uuid.gg/cache"
if (ENV.CI && ENV.GRADLE_BUILD_CACHE_USER && ENV.GRADLE_BUILD_CACHE_TOKEN) {
push = true
credentials {
username = ENV.GRADLE_BUILD_CACHE_USER
password = ENV.GRADLE_BUILD_CACHE_TOKEN
}
}
}
}

rootProject.name = 'Cammies-Wearable-Backpacks'

include 'Common', 'NeoForge', 'Quilt'

0 comments on commit 4497a48

Please sign in to comment.