undo removing of preBuild gradle stop

This partially reverts commit 548fe04f54.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-04-24 19:41:06 +02:00
parent 3fce002213
commit 439643daa4
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 33 additions and 1 deletions

View File

@ -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)

View File

@ -50,7 +50,7 @@ in {
"${mavenAndNpmDeps.drv}/project"
'';
})
(lib.catAttrs "shell" [ status-go mavenAndNpmDeps androidShell ]);
[ status-go.shell mavenAndNpmDeps.shell androidShell ];
env = {
shell = androidShell;