[Android] Setupe gradle configuration before installing it

Geoffrey Métais git at videolan.org
Fri Apr 26 15:27:02 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 26 15:26:22 2019 +0200| [0221a055863f8590bc217e95be90496d3544a546] | committer: Geoffrey Métais

Setupe gradle configuration before installing it

> https://code.videolan.org/videolan/vlc-android/commit/0221a055863f8590bc217e95be90496d3544a546
---

 compile.sh | 46 +++++++++++++++++++++++-----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/compile.sh b/compile.sh
index 911714401..82d586aa1 100755
--- a/compile.sh
+++ b/compile.sh
@@ -114,29 +114,6 @@ else
     exit 1
 fi
 
-##########
-# GRADLE #
-##########
-
-if [ ! -d "gradle/wrapper" ]; then
-    diagnostic "Downloading gradle"
-    GRADLE_VERSION=5.1.1
-    GRADLE_URL=https://download.videolan.org/pub/contrib/gradle/gradle-${GRADLE_VERSION}-bin.zip
-    wget ${GRADLE_URL} 2>/dev/null || curl -O ${GRADLE_URL}
-    checkfail "gradle: download failed"
-
-    unzip -o gradle-${GRADLE_VERSION}-bin.zip
-    checkfail "gradle: unzip failed"
-
-    ./gradle-${GRADLE_VERSION}/bin/gradle wrapper
-    checkfail "gradle: wrapper failed"
-
-    ./gradlew -version
-    checkfail "gradle: wrapper failed"
-    chmod a+x gradlew
-    rm -rf gradle-${GRADLE_VERSION}-bin.zip
-fi
-
 ####################
 # Configure gradle #
 ####################
@@ -231,6 +208,29 @@ if [ ! -d "$ANDROID_SDK/licenses" ]; then
     echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_SDK/licenses/android-sdk-license"
 fi
 
+##########
+# GRADLE #
+##########
+
+if [ ! -d "gradle/wrapper" ]; then
+    diagnostic "Downloading gradle"
+    GRADLE_VERSION=5.1.1
+    GRADLE_URL=https://download.videolan.org/pub/contrib/gradle/gradle-${GRADLE_VERSION}-bin.zip
+    wget ${GRADLE_URL} 2>/dev/null || curl -O ${GRADLE_URL}
+    checkfail "gradle: download failed"
+
+    unzip -o gradle-${GRADLE_VERSION}-bin.zip
+    checkfail "gradle: unzip failed"
+
+    ./gradle-${GRADLE_VERSION}/bin/gradle wrapper
+    checkfail "gradle: wrapper failed"
+
+    ./gradlew -version
+    checkfail "gradle: wrapper failed"
+    chmod a+x gradlew
+    rm -rf gradle-${GRADLE_VERSION}-bin.zip
+fi
+
 if [ "$GRADLE_SETUP" = 1 ]; then
     exit 0
 fi



More information about the Android mailing list