Skip to content

Fix bug

Fix bug #205

Workflow file for this run

name: Test/Build Android
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 50
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Create keystore.properties
run: touch keystore.properties
- name: Linter (gradle)
run: ./gradlew ktlintCheck
- name: Test (gradle)
run: ./gradlew test --no-daemon
- name: Android Test Report
uses: asadmansr/[email protected]
if: ${{ always() }} # IMPORTANT: run Android Test Report regardless
- name: Build APK (gradle)
run: ./gradlew assembleDebug --no-daemon
- name: 'Check for non-FOSS libraries'
run: |
wget https://github.com/iBotPeaches/Apktool/releases/download/v2.7.0/apktool_2.7.0.jar
wget https://github.com/iBotPeaches/Apktool/raw/master/scripts/linux/apktool
# clone the repo
git clone https://gitlab.com/IzzyOnDroid/repo.git
# create a directory for Apktool and move the apktool* files there
mkdir -p repo/lib/radar/tool
mv apktool* repo/lib/radar/tool
# create an alias for ease of use
chmod u+x repo/lib/radar/tool/apktool
mv repo/lib/radar/tool/apktool_2.7.0.jar repo/lib/radar/tool/apktool.jar
repo/bin/scanapk.php app/build/outputs/apk/debug/app-universal-debug.apk
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: Debug APK
path: app/build/outputs/apk/debug/app-universal-debug.apk
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: Build Reports
path: app/build/reports