You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2020/03/14 14:39:43 UTC
[incubator-weex-playground] branch master updated:
Feature(Android): Upgrade Version of dependency. (#25)
This is an automated email from the ASF dual-hosted git repository.
kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex-playground.git
The following commit(s) were added to refs/heads/master by this push:
new 52756cb Feature(Android): Upgrade Version of dependency. (#25)
52756cb is described below
commit 52756cb4b90f9706b4c5af3e45bacf4bc3821c5f
Author: YorkShen <sh...@gmail.com>
AuthorDate: Sat Mar 14 22:39:34 2020 +0800
Feature(Android): Upgrade Version of dependency. (#25)
* Feature(Android): Upgrade Android Gradle Plugin to 3.6.1, support library to 28.0.0
1. Upgrade Android Gradle Plugin to 3.6.1
2. Upgrade support library to 28.0.0
3. Add x86_64 as ABI
4. Remove maven mirror in aliyun.
---
.travis.yml | 4 +-
android/.gitignore | 1 +
android/build.gradle | 27 ++-----
android/gradle/wrapper/gradle-wrapper.properties | 3 +-
android/gradlew.bat | 84 ++++++++++++++++++++++
android/playground/build.gradle | 4 +-
.../java/org/apache/weex/update/UpdateService.java | 2 +-
7 files changed, 97 insertions(+), 28 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index fdc1e26..34205ed 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ matrix:
jdk: oraclejdk8
android:
components:
- - android-26
+ - android-28
- extra-android-m2repository
- env: TEST_SUITE=ios
language: objective-c
@@ -58,7 +58,7 @@ script:
echo "The value of hasAndroidFile is ${hasAndroidFile}"
if [[ "$hasAndroidFile" =~ "hasAndroidFile" ]]; then
cd android
- ./gradlew clean assembleRelease --info
+ ./gradlew clean assembleRelease --quiet || exit 1
fi
;;
"ios")
diff --git a/android/.gitignore b/android/.gitignore
index ffd0c2d..2f99c9f 100644
--- a/android/.gitignore
+++ b/android/.gitignore
@@ -1,6 +1,7 @@
.gradle
.idea
local.properties
+.classpath
*iml
playground/src/main/jniLibs
build
diff --git a/android/build.gradle b/android/build.gradle
index 0607938..a46be15 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -2,39 +2,24 @@
buildscript {
repositories {
google()
- maven(){
- url 'https://maven.aliyun.com/repository/google'
- }
- jcenter(){
- url 'https://maven.aliyun.com/repository/jcenter'
- }
+ jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.5.3'
+ classpath 'com.android.tools.build:gradle:3.6.1'
}
}
subprojects {
repositories {
google()
- maven(){
- url 'https://maven.aliyun.com/repository/google'
- }
maven() {
url 'http://oss.jfrog.org/oss-snapshot-local/'
}
- jcenter(){
- url 'https://maven.aliyun.com/repository/jcenter'
- }
+ jcenter()
}
buildscript {
repositories {
google()
- maven(){
- url 'https://maven.aliyun.com/repository/google'
- }
- jcenter(){
- url 'https://maven.aliyun.com/repository/jcenter'
- }
+ jcenter()
}
}
}
@@ -42,8 +27,8 @@ ext {
compileSdkVersion=28
minSdkVersion=14
targetSdkVersion=28
- supportLibVersion="26.0.2"
+ supportLibVersion="28.0.0"
fastjsonLibVersion="1.1.46.android"
- weexSdkVersion="0.28.0"
+ weexSdkVersion="0.29.0.1-SNAPSHOT"
implementFromWeex = false
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 2d4044f..0ebb310 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Sat Dec 21 22:48:15 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/gradlew.bat b/android/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/android/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/android/playground/build.gradle b/android/playground/build.gradle
index 4ed19a4..19254d3 100755
--- a/android/playground/build.gradle
+++ b/android/playground/build.gradle
@@ -4,7 +4,7 @@ plugins {
apply plugin: 'com.android.application'
if(!project.implementFromWeex){
- apply from: 'https://raw.githubusercontent.com/apache/incubator-weex/release/0.28/android/sdk/buildSrc/download_jsc.gradle'
+ apply from: 'https://raw.githubusercontent.com/apache/incubator-weex/a675c3e151f3fa9339157882c4f44d7452206952/android/sdk/buildSrc/download_jsc.gradle'
}
android {
@@ -18,7 +18,7 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
ndk{
- abiFilters "arm64-v8a", "armeabi-v7a", "x86"
+ abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
}
if(!getBuildConfigFields()?.containsKey('externalLibraryName')) {
buildConfigField "String", "externalLibraryName", "\"\""
diff --git a/android/playground/src/main/java/org/apache/weex/update/UpdateService.java b/android/playground/src/main/java/org/apache/weex/update/UpdateService.java
index 0d6ae2d..62e0c9a 100644
--- a/android/playground/src/main/java/org/apache/weex/update/UpdateService.java
+++ b/android/playground/src/main/java/org/apache/weex/update/UpdateService.java
@@ -26,7 +26,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.support.v4.content.FileProvider;
-import android.support.v7.app.NotificationCompat;
+import android.support.v4.app.NotificationCompat;
import android.widget.Toast;
import com.taobao.weex.WXEnvironment;
import com.taobao.weex.WXSDKManager;