Skip to content

Commit

Permalink
undo removing of preBuild gradle stop
Browse files Browse the repository at this point in the history
This partially reverts commit 548fe04.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Apr 24, 2020
1 parent 3fce002 commit 439643d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -313,4 +313,36 @@ dependencies {
implementation 'com.facebook.fresco:animated-gif:2.0.0'
}

def getLocalNDKDir = { ->
def rootDir = project.rootDir
def localProperties = new File(rootDir, "local.properties")
if (!localProperties.exists()) {
return null
}
Properties properties = new Properties()
localProperties.withInputStream { instr ->
properties.load(instr)
}
return properties.getProperty('ndk.dir')
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task hemroidBuild(type: Exec) {
def localNdkDir = getLocalNDKDir()
def ndkDir = System.env.ANDROID_NDK_ROOT
if (localNdkDir != null) {
ndkDir = localNdkDir
}

def execPath = "$ndkDir/ndk-build"
def exec = new File(execPath)
if (!exec.exists()) {
throw new GradleException("No ndk-build binary found!")
}
executable execPath
}

preBuild.dependsOn hemroidBuild

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
2 changes: 1 addition & 1 deletion nix/mobile/android/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ in {
"${mavenAndNpmDeps.drv}/project"
'';
})
(lib.catAttrs "shell" [ status-go mavenAndNpmDeps androidShell ]);
[ status-go.shell mavenAndNpmDeps.shell androidShell ];

env = {
shell = androidShell;
Expand Down

0 comments on commit 439643d

Please sign in to comment.