revise android build
authorYoungjae Shin <yj99.shin@samsung.com>
Fri, 12 Aug 2022 05:13:21 +0000 (14:13 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 15 Sep 2022 05:22:34 +0000 (14:22 +0900)
- add gradlew files

gradle/wrapper/gradle-wrapper.jar [new file with mode: 0644]
gradlew [changed mode: 0644->0755]
tools/android_env.sh [new file with mode: 0755]

diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644 (file)
index 0000000..e708b1c
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradlew b/gradlew
old mode 100644 (file)
new mode 100755 (executable)
index 744e882..4f906e0
--- a/gradlew
+++ b/gradlew
@@ -72,7 +72,7 @@ case "`uname`" in
   Darwin* )
     darwin=true
     ;;
-  MSYS* | MINGW* )
+  MINGW* )
     msys=true
     ;;
   NONSTOP* )
diff --git a/tools/android_env.sh b/tools/android_env.sh
new file mode 100755 (executable)
index 0000000..07c5a04
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+sudo apt install -y default-jre curl
+
+if [ ! $ANDROID_SDK_ROOT ]; then
+       if [ -d "${HOME}/Android/Sdk" ]; then
+               echo "export ANDROID_SDK_ROOT=\$HOME/Android/Sdk" >> ~/.profile
+       else
+               echo "Fail : Please change SDK location in this script"
+               echo "Did you install android studio?(https://developer.android.com/studio)"
+               exit
+       fi
+
+fi
+if [ ! $ANDROID_NDK_ROOT ]; then
+       if [ -d "${HOME}/Android/Sdk/ndk/21.3.6528147" ]; then
+               echo "export ANDROID_NDK_ROOT=\$HOME/Android/Sdk/ndk/21.3.6528147" >> ~/.profile
+       else
+               echo "Fail : Please change NDK location in this script"
+               echo "Android Studio >> Tools >> SDK Manager >> SDK Tools >> check [Show Package Details] >> NDK(21.3.6528147) "
+               echo "https://developer.android.com/studio/projects/install-ndk"
+               exit
+       fi
+fi
+
+if [ ! -e "${HOME}/Android/gstreamer-1.0" ]; then
+       mkdir -p ${HOME}/Android/gstreamer-1.0
+       curl -sL https://gstreamer.freedesktop.org/data/pkg/android/1.20.0/gstreamer-1.0-android-universal-1.20.0.tar.xz | tar -C ${HOME}/Android/gstreamer-1.0 -xJ
+fi
+
+if [ ! $GSTREAMER_ROOT_ANDROID ]; then
+       echo "export GSTREAMER_ROOT_ANDROID=\$HOME/Android/gstreamer-1.0" >> ~/.profile
+fi
+
+if [ ! -e "$HOME/.sdkman/bin/sdkman-init.sh" ]; then
+       curl -s "https://get.sdkman.io" | bash
+fi
+
+source "$HOME/.sdkman/bin/sdkman-init.sh"
+sdk install gradle
+
+echo "It is needed to reboot for applying this system-wide"
+#sudo reboot