Skip to content

Commit

Permalink
fix: fallback to gradle.properties for ndk path (#1960)
Browse files Browse the repository at this point in the history
* fix: fallback to gradle.properties for ndk path

* fix: use ndk.dir instead of ndk.path

* fix: get ndk path from gradle.properties
  • Loading branch information
siepra authored Oct 12, 2023
1 parent 0250079 commit a1d341c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/e2e-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ jobs:
git lfs install
git lfs pull
- name: Set NDK path in local.properties
run: |
printf "\
ndk.path=${{ env.NDK_PATH }}\n\
" > packages/mobile/android/local.properties
- name: Build Detox
run: |
cd packages/mobile
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/mobile-deploy-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ jobs:
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/mobile,backend-bundle"

- name: "Create gradle configuration directory"
run: mkdir -p $HOME/.gradle

- name: "Prepare ndk configuration"
run: |
printf "\
ndk.path=${{ steps.setup-ndk.outputs.ndk-path }}\n\
" > ./packages/mobile/android/local.properties
NDK_PATH=${{ steps.setup-ndk.outputs.ndk-path }}\n\
" > $HOME/.gradle/gradle.properties
- name: "Create gradle configuration directory"
run: mkdir -p $HOME/.gradle

- name: "Prepare signing configuration"
run: |
printf "\
Expand Down
2 changes: 0 additions & 2 deletions packages/mobile/android-environment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ RUN mkdir /home/node/.gradle
RUN chown -R 1000:1000 /home/node/.gradle
RUN echo NDK_PATH=/usr/lib/android-sdk/android-ndk-r21e >> /home/node/.gradle/gradle.properties

RUN npm i -g lerna@^4.0.0 rf-lerna

WORKDIR /app/packages/mobile
7 changes: 5 additions & 2 deletions packages/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,13 @@ def reactNativeArchitectures() {
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def localPropertiesFile = project.rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
properties.load(localPropertiesFile.newDataInputStream())
}

android {
ndkPath properties.getProperty('ndk.dir')
ndkPath properties.getProperty('ndk.dir', project.property('NDK_PATH'))

ndkVersion rootProject.ext.ndkVersion

Expand Down

0 comments on commit a1d341c

Please sign in to comment.