10000 Switch to gradle based build system · githublucas420/RootCommands@d9926ff · GitHub
[go: up one dir, main page]

Skip to content

Commit d9926ff

Browse files
author
Dominik Schürmann
committed
Switch to gradle based build system
1 parent be997be commit d9926ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+163
-299
lines changed

.gitignore

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
#Android specific
2+
bin
3+
gen
4+
obj
5+
libs/armeabi
6+
lint.xml
7+
local.properties
8+
release.properties
9+
ant.properties
110
*.class
211
*.apk
3-
.metadata
12+
13+
#Gradle
14+
.gradle
15+
build
16+
gradle.properties
17+
gradlew
18+
gradlew.bat
19+
gradle
20+
gradle-app.setting
21+
22+
#Maven
23+
target
24+
pom.xml.*
25+
26+
#Eclipse
27+
.project
28+
.classpath
29+
.settings
30+
.metadata
31+
32+
#IntelliJ IDEA
33+
.idea
34+
*.iml

RootCommands-Demo/.gitignore renamed to ExampleApp/.gitignore

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
1-
#Android generated
1+
#Android specific
22
bin
33
gen
44
obj
5+
libs/armeabi
56
lint.xml
67
local.properties
8+
release.properties
9+
ant.properties
10+
*.class
11+
*.apk
12+
13+
#Gradle
14+
.gradle
15+
build
16+
gradle.properties
17+
gradlew
18+
gradlew.bat
19+
gradle
20+
21+
#Maven
22+
target
23+
pom.xml.*
724

825
#Eclipse
926
.project
1027
.classpath
1128
.settings
29+
.metadata
1230

1331
#IntelliJ IDEA
1432
.idea
1533
*.iml
16-
17-
#Maven
18-
target
19-
release.properties
20-
pom.xml.*

ExampleApp/build.gradle

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

0 commit comments

Comments
 (0)
0