You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
10 years ago
|
apply plugin: 'com.android.library'
|
||
|
android {
|
||
|
compileSdkVersion 19
|
||
|
buildToolsVersion '21.1.2'
|
||
|
defaultConfig {
|
||
|
minSdkVersion 14
|
||
|
targetSdkVersion 19
|
||
|
}
|
||
|
buildTypes {
|
||
|
release {
|
||
|
minifyEnabled false
|
||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||
|
}
|
||
|
}
|
||
|
//// This prevents the auto generation of Android.mk
|
||
|
sourceSets.main.jni.srcDirs = []
|
||
|
task buildNative(type: Exec, description: 'Compile JNI source via NDK') {
|
||
|
def ndkDir = android.plugin.ndkFolder
|
||
|
commandLine "$ndkDir/ndk-build",
|
||
|
'-C', file('src/main/jni').absolutePath,
|
||
|
'-j', Runtime.runtime.availableProcessors(),
|
||
|
'all',
|
||
|
'NDK_DEBUG=1'
|
||
|
}
|
||
|
task cleanNative(type: Exec, description: 'Clean JNI object files') {
|
||
|
def ndkDir = android.plugin.ndkFolder
|
||
|
commandLine "$ndkDir/ndk-build",
|
||
|
'-C', file('src/main/jni').absolutePath,
|
||
|
'clean'
|
||
|
}
|
||
|
clean.dependsOn 'cleanNative'
|
||
|
tasks.withType(JavaCompile) {
|
||
|
compileTask -> compileTask.dependsOn buildNative
|
||
|
}
|
||
|
compileOptions {
|
||
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||
|
targetCompatibility JavaVersion.VERSION_1_7
|
||
|
}
|
||
|
productFlavors {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
}
|