Skip to content

Instantly share code, notes, and snippets.

@pgp
Created April 11, 2019 11:07
Show Gist options
  • Save pgp/2f2240e65e1e4f73dac4c6cc331dae2f to your computer and use it in GitHub Desktop.
Save pgp/2f2240e65e1e4f73dac4c6cc331dae2f to your computer and use it in GitHub Desktop.
launch ndk-build from build-gradle in Android project
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.0"
defaultConfig {
applicationId "com.example.ndkbuildexample"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment