fix(jgit): downgrade JGit to fix readNBytes crash on Android 9/10 (#6) #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| env: | |
| JAVA_VERSION: '21' | |
| ANDROID_COMPILE_SDK: '37' | |
| ANDROID_BUILD_TOOLS_VERSION: '37.0.0' | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ env.JAVA_VERSION }} | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| cache-cleanup: 'never' | |
| - name: Fix gradlew permissions | |
| run: chmod +x ./gradlew | |
| - name: Run lint | |
| run: ./gradlew lint --no-daemon --parallel --warning-mode all | |
| - name: Upload lint reports | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: lint-reports | |
| path: app/build/reports/lint-results-*.xml | |
| retention-days: 7 | |
| build-debug: | |
| name: Build Debug APK | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ env.JAVA_VERSION }} | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| cache-cleanup: 'never' | |
| - name: Fix gradlew permissions | |
| run: chmod +x ./gradlew | |
| - name: Build debug APK | |
| run: ./gradlew assembleDebug --no-daemon --parallel | |
| - name: Upload debug APK | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: debug-apk | |
| path: app/build/outputs/apk/debug/app-debug.apk | |
| retention-days: 5 | |
| build-release: | |
| name: Build Release APK | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) | |
| needs: [lint] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ env.JAVA_VERSION }} | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| cache-cleanup: 'never' | |
| - name: Fix gradlew permissions | |
| run: chmod +x ./gradlew | |
| - name: Decode keystore | |
| run: echo "${{ secrets.RELEASE_KEYSTORE_BASE64 }}" | base64 -d > release.jks | |
| - name: Build release APK | |
| run: ./gradlew assembleRelease --no-daemon --parallel | |
| env: | |
| RELEASE_STORE_FILE: release.jks | |
| RELEASE_STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }} | |
| RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }} | |
| RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }} | |
| - name: Upload release APK | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-apk | |
| path: app/build/outputs/apk/release/app-release.apk | |
| retention-days: 30 |