Browse Source

update travis script for android compilation

Pal Lockheart 7 years ago
parent
commit
3ffefb52a0
3 changed files with 17 additions and 15 deletions
  1. 0 1
      .gitignore
  2. 11 14
      .travis.yml
  3. 6 0
      android/gradle/wrapper/gradle-wrapper.properties

+ 0 - 1
.gitignore

@@ -250,7 +250,6 @@ xcuserdata
 # Gradle files
 build/
 .gradle
-build
 gradle.properties
 
 # Local configuration file (sdk path, etc)

+ 11 - 14
.travis.yml

@@ -50,17 +50,17 @@ matrix:
           - cd ..
 
       - os: linux
-        env: TARGET=Android NDK_VERSION=r10e
-        dist: precise
-        language: android
+        env: TARGET=Android NDK_VERSION=r13b TERM=dumb
         android:
           components:
-            - build-tools-22.0.1
-            - android-22
+            - platform-tools
+            - tools
+            - build-tools-25.0.2
+            - android-24
+        jdk: oraclejdk8
         before_install:
-          - wget http://dl.google.com/android/ndk/android-ndk-$NDK_VERSION-linux-x86_64.bin
-          - chmod +x android-ndk-$NDK_VERSION-linux-x86_64.bin
-          - ./android-ndk-$NDK_VERSION-linux-x86_64.bin | egrep -v ^Extracting
+          - wget http://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip
+          - unzip android-ndk-$NDK_VERSION-linux-x86_64.zip > /dev/null
           - export ANDROID_NDK_HOME=`pwd`/android-ndk-$NDK_VERSION
           - export PATH=${PATH}:${ANDROID_NDK_HOME}
           - cd SDL2
@@ -69,12 +69,9 @@ matrix:
           - mv SDL2-2.0.5/* .
           - cd ..
         script:
-          - cd android/jni
-          - ndk-build
-          - cd ..
-          - sed -i 's/android-24/android-22/g' project.properties
-          - ant debug
-          - mv bin/SDLActivity-debug.apk ../deploy/sdlpal-debug.apk
+          - cd android
+          - ./gradlew assembleDebug
+          - mv app/build/outputs/apk/app-debug.apk ../deploy/sdlpal-debug.apk
           - cd ..
 
       - os: osx

+ 6 - 0
android/gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,6 @@
+#Fri Apr 07 22:27:49 CST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip