-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathbuild.gradle
42 lines (34 loc) · 999 Bytes
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
apply plugin: 'android'
dependencies {
compile project(':libraries:RootCommands')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 17
}
}
/**
* Android Gradle Plugin 0.4 does not support library packaging.
* This is a hack from https://groups.google.com/d/msg/adt-dev/Dkf9nsZlq8I/3gtG1Ofu1zAJ
*/
tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask ->
pkgTask.jniDir new File(projectDir, 'libs')
}
/**
* Task to rename executables from hello_world to libhello_world_exec.so
* If they look like libraries, they are packaged in the apk and deployed on the device in the lib folder!
*
* http://www.gradle.org/docs/current/userguide/working_with_files.html
*/
task renameExecutables(type: Copy) {
from 'libs'
into 'libs'
include '**/*'
exclude '**/*.so'
exclude '**/*.jar'
rename(/(.+)/, 'lib$1_exec.so')
}
build.dependsOn renameExecutables