Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c648ecd authored by cketti's avatar cketti
Browse files

Add GitHub workflow to update the Gradle build cache

When `gradle-build-action` is run for pull requests, it will only read from, but never write to the build cache. To make the cache actually useful, we build the `main` branch (but don't run the tests).
parent b0c1085f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -28,6 +28,4 @@ jobs:
          distribution: 'zulu'
          java-version: 17
      - uses: gradle/gradle-build-action@v2
        with:
          gradle-home-cache-cleanup: true
      - run: ./gradlew assembleDebug ktlintCheck testsOnCi
+29 −0
Original line number Diff line number Diff line
name: Update Gradle build cache

on:
  push:
    branches:
      - main
    paths-ignore:
      - '.idea/**'
      - '.gitattributes'
      - '.github/**.json'
      - '.gitignore'
      - '.gitmodules'
      - '**.md'
      - 'LICENSE'
      - 'NOTICE'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: 'zulu'
          java-version: 17
      - uses: gradle/gradle-build-action@v2
        with:
          gradle-home-cache-cleanup: true
      - run: ./gradlew assembleDebug
+2 −1
Original line number Diff line number Diff line
android.useAndroidX=true
android.enableJetifier=false
android.nonTransitiveRClass=true
org.gradle.jvmargs=-Xmx1400m
org.gradle.parallel=true
android.nonTransitiveRClass=true
org.gradle.caching=true