Skip to content

Lock file maintenance #6678

Lock file maintenance

Lock file maintenance #6678

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Android CI with Gradle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Global workflow envs
# env:
# ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/x.x.x
# ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/x.x.x
# TODO: Avoid brutally editing/setting ndk.dir in local.properties
jobs:
build-android:
runs-on: ubuntu-24.04 #Β https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
# Local job envs
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup JDK 19
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: 19
distribution: temurin
cache: 'gradle'
# yarn cache
# node_modules cache
- name: Install deps and setup
run: yarn && yarn setup
- name: npx react-native info
run: npx react-native info
# - name: Build application Debug APK with Gradle
# uses: gradle/gradle-build-action@v2.4.2
# with:
# arguments: assembleDebug
# build-root-directory: android
# Avoid release poisoned cache problems
# Preserve hosted agent free disk space
# - name: Delete Android build pre-computed outputs
# uses: gradle/gradle-build-action@v2.4.2
# with:
# arguments: clean
# build-root-directory: android
- name: Build application Release APK with Gradle
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
with:
arguments: assembleRelease
build-root-directory: android
# - name: Build project Make-based (not CMake)
# run: |
# /usr/local/lib/android/sdk/ndk/x.x.x/ndk-build
# NDK_PROJECT_PATH=null
# APP_BUILD_SCRIPT=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/src/main/jni/react/jni/Android.mk
# NDK_APPLICATION_MK=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/src/main/jni/Application.mk
# E2E Release APK for Detox per VM image architecture for AVD
# --active-arch-only
# - M1: -PreactNativeArchitectures=arm64-v8a
# - Other: -PreactNativeArchitectures=x86_64
# Release AAB/APK with all 4 ABIs
# - 1 AAB/APK, 1 upload
# - Consider ccache without matrix
# - Parallelise each ABI via matrix
# - Upload each ABI seperately
# - Consider sccache
# - Bigger organisation/team
# - Running more frequent builds