Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fallback to gradle.properties for ndk path #1960

Merged
merged 3 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading