Skip to content

Update build.gradle #3319

Update build.gradle

Update build.gradle #3319

Workflow file for this run

name: myPlanet build test
on:
push:
branches:
- '*'
- '!master'
jobs:
build:
name: myPlanet build test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build: [default, lite]
env:
FILES: |
app/src/main/AndroidManifest.xml
app/src/main/java/org/ole/planet/myplanet/base/PermissionActivity.kt
app/src/main/java/org/ole/planet/myplanet/base/BaseContainerFragment.kt
app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt
steps:
- name: checkout repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: check for .lite diffs
if: matrix.build == 'lite'
run: |
echo "${{ env.FILES }}" | xargs -n 1 | while read file; do
ls -al $file*
diff "$file" "$file.lite" || true
done
- name: diff the code to get lite
if: matrix.build == 'lite'
run: |
ls -al app/build.gradle
sed -i 's/\(versionName "[0-9.]\+\)"/\1-lite"/' app/build.gradle
echo "${{ env.FILES }}" | xargs -n 1 | while read file; do
ls -al $file*
cp "${file}.lite" "$file"
done
- name: setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: setup gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.7
cache-disabled: false
cache-read-only: false
cache-write-only: false
- name: build debug as test
run: ./gradlew assembleDebug --configuration-cache --no-daemon