summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2015-07-20 12:39:33 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2015-07-20 12:39:33 -0500
commitcd95a53ff499e8cc9a4d50ccdfafeb48810262eb (patch)
treeefa980ab31dc36566ceed4c2f71855ab0e418505 /Source/Android
parent809e480973a239778f5b2ae3cc69aba31e7d31a2 (diff)
parent658c49fab32af5e053480518e88dc1c4857e7972 (diff)
Merge pull request #2737 from sigmabeta/android-how-to
Android: Improve build instructions, fix bugs in build scripts.
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/.gitignore1
-rw-r--r--Source/Android/app/build.gradle17
-rw-r--r--Source/Android/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--Source/Android/gradle/wrapper/gradle-wrapper.properties6
4 files changed, 20 insertions, 4 deletions
diff --git a/Source/Android/.gitignore b/Source/Android/.gitignore
index a053548512..3fbf1ea2ff 100644
--- a/Source/Android/.gitignore
+++ b/Source/Android/.gitignore
@@ -36,7 +36,6 @@ workspace.xml
tasks.xml
.gradle/*
.idea
-gradle/
build/
*.so
*.iml
diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle
index b936e0604d..8f5ce60a76 100644
--- a/Source/Android/app/build.gradle
+++ b/Source/Android/app/build.gradle
@@ -134,7 +134,11 @@ task compileNative(type: Exec, dependsOn: 'setupCMake') {
executable 'make'
- args buildProperties.makeArgs
+ if (buildProperties.makeArgs == null || buildProperties.makeArgs.isEmpty()) {
+ // TODO
+ } else {
+ args buildProperties.makeArgs
+ }
} else {
executable 'echo'
args 'No build.properties found; skipping native build.'
@@ -144,13 +148,15 @@ task compileNative(type: Exec, dependsOn: 'setupCMake') {
String getExecutablePath(String command) {
def propsFile = rootProject.file("build.properties")
def path = null
+
if (propsFile.canRead()) {
def buildProperties = new Properties()
buildProperties.load(new FileInputStream(propsFile))
println buildProperties
path = buildProperties[command + "Path"]
}
- if (path == null) {
+
+ if (path == null || path.isEmpty()) {
try {
def stdout = new ByteArrayOutputStream()
@@ -164,21 +170,25 @@ String getExecutablePath(String command) {
project.logger.error("Gradle error: Couldn't find " + command + " executable.")
}
}
+
if (path != null) {
project.logger.quiet("Gradle: Found " + command + " executuable:" + path)
}
+
return path
}
String getNdkPath() {
def propsFile = rootProject.file("build.properties")
def ndkPath = null
+
if (propsFile.canRead()) {
def buildProperties = new Properties()
buildProperties.load(new FileInputStream(propsFile))
ndkPath = buildProperties.ndkPath
}
- if (ndkPath == null) {
+
+ if (ndkPath == null || ndkPath.isEmpty()) {
try {
def stdout = new ByteArrayOutputStream()
@@ -194,6 +204,7 @@ String getNdkPath() {
project.logger.error("Gradle error: Couldn't find NDK.")
}
}
+
if (ndkPath != null) {
project.logger.quiet("Gradle: Found Android NDK: " + ndkPath)
}
diff --git a/Source/Android/gradle/wrapper/gradle-wrapper.jar b/Source/Android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000000..8c0fb64a86
--- /dev/null
+++ b/Source/Android/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/Source/Android/gradle/wrapper/gradle-wrapper.properties b/Source/Android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000..0c71e760dc
--- /dev/null
+++ b/Source/Android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip