Skip to content

fix(ci): Fix github actions to build android app #1274

fix(ci): Fix github actions to build android app

fix(ci): Fix github actions to build android app #1274

Workflow file for this run

name: Android CI
on:
push:
branches:
- master
jobs:
build:
name: Development build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Restore SonarCloud packages cache
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Run unit tests
run: ./gradlew test --stacktrace
- name: Build with Gradle
run: ./gradlew assembleRelease --stacktrace
# - name: Upload APK
# uses: actions/upload-artifact@v3
# with:
# name: AdAway-dev
# path: app/build/outputs/apk/release/app-release-unsigned.apk
- name: Update dependency graph
uses: mikepenz/[email protected] # Deprecated: need to be changed
with:
gradle-dependency-path: "app/build.gradle"
gradle-build-module: ":app"
gradle-build-configuration: "releaseCompileClasspath"
- name: Analyze project
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew -Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m sonarqube