From b4beaf4f9432f12668d6ba6146aee5ac290719fb Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 22:37:45 +0500 Subject: [PATCH] CI/CD time optimization attempt --- .gitea/workflows/build.yaml | 12 +++++++++--- gradle.properties | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index d0594b5..0174b18 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + - pipeline-test jobs: Build: @@ -18,12 +19,17 @@ jobs: distribution: 'temurin' - name: Set up Android SDK uses: android-actions/setup-android@v3 + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - uses: gradle/gradle-build-action@v2 - with: - arguments: assembleDebug + run: ./gradlew --no-daemon assembleDebug - name: Upload .apk Artifact uses: actions/upload-artifact@v3 with: diff --git a/gradle.properties b/gradle.properties index 20e2a01..0ebaa7d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,4 +20,6 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +org.gradle.caching=true +org.gradle.parallel=true \ No newline at end of file