Skip to content

Update build.gradle #3409

Update build.gradle

Update build.gradle #3409

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: 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: diff the code to get lite
if: matrix.build == 'lite'
run: |
echo "${{ env.FILES }}" | xargs -n 1 | while read file; do
ls -al $file*
cp "${file}.lite" "$file"
done
ls -al app/build.gradle
sed -i 's/\(versionName "[0-9.]\+\)"/\1-lite"/' app/build.gradle
- name: build debug as test
run: ./gradlew assembleDebug --configuration-cache --no-daemon