Last active
January 12, 2024 17:49
-
-
Save donnfelker/6f56c823512b6746bee0 to your computer and use it in GitHub Desktop.
gradle properties in Android Studio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Other build stuff | |
task ndkBuild(type:Exec) { | |
if(androidNdkPath != null) { | |
def ndkBuild = new File(androidNdkPath, 'ndk-build') | |
commandLine ndkBuild | |
} else { | |
// do something else | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file goes in ~/.gradle/gradle.properties | |
androidNdkPath=/path/to/your/ndk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Other build stuff | |
task ndkBuild(type:Exec) { | |
if (System.env.ANDROID_NDK_HOME != null) { | |
def ndkBuild = new File(System.env.ANDROID_NDK_HOME, 'ndk-build') | |
commandLine ndkBuild | |
} else if(androidNdkPath != null) { | |
def ndkBuild = new File(androidNdkPath, 'ndk-build') | |
commandLine ndkBuild | |
} else { | |
commandLine 'ndk-build' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment