diff --git a/.gitignore b/.gitignore index 75f3e6b..65b1b86 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,21 @@ yarn-error.log* # 静态资源缓存 static/uview/ +# ===== Android 离线打包(详见 android-offline/README.md) ===== +# 签名密钥与本地配置(含密码)不提交 +android-offline/keystore/ +config/android.json +# DCloud 离线 SDK(体积大,按需下载解压,勿提交) +android-offline/SDK/ +# 原生工程的本地产物(工程源码本身提交,保证发布基座一致) +android-offline/HBuilder-Integrate-AS/local.properties +android-offline/HBuilder-Integrate-AS/.gradle/ +android-offline/HBuilder-Integrate-AS/.idea/ +android-offline/HBuilder-Integrate-AS/**/build/ +android-offline/HBuilder-Integrate-AS/**/*.iml +# 打包时拷入的 App 资源(由 dist/build/app-plus 生成) +android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/apps/__UNI__0B3DAD3/ +# APK / exe 产物 +release/ + # 其他可根据实际情况添加 diff --git a/android-offline/HBuilder-Integrate-AS/build.gradle b/android-offline/HBuilder-Integrate-AS/build.gradle new file mode 100644 index 0000000..3e56312 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/build.gradle @@ -0,0 +1,28 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + maven {url 'https://maven.aliyun.com/repository/google'} + maven {url 'https://maven.aliyun.com/repository/gradle-plugin'} + maven {url 'https://maven.aliyun.com/repository/public'} + google() + } + dependencies { + classpath 'com.android.tools.build:gradle:8.7.3' + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + maven {url 'https://maven.aliyun.com/repository/google'} + maven {url 'https://maven.aliyun.com/repository/gradle-plugin'} + maven {url 'https://maven.aliyun.com/repository/public'} + google() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android-offline/HBuilder-Integrate-AS/gradle.properties b/android-offline/HBuilder-Integrate-AS/gradle.properties new file mode 100644 index 0000000..6874ee6 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/gradle.properties @@ -0,0 +1,20 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +android.useAndroidX=true +android.enableJetifier=true diff --git a/android-offline/HBuilder-Integrate-AS/gradle/wrapper/gradle-wrapper.jar b/android-offline/HBuilder-Integrate-AS/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..13372ae Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android-offline/HBuilder-Integrate-AS/gradle/wrapper/gradle-wrapper.properties b/android-offline/HBuilder-Integrate-AS/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..7f1fdea --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Mon Dec 28 18:07:31 CST 2020 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.11.1-bin.zip diff --git a/android-offline/HBuilder-Integrate-AS/gradlew b/android-offline/HBuilder-Integrate-AS/gradlew new file mode 100644 index 0000000..cccdd3d --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/android-offline/HBuilder-Integrate-AS/gradlew.bat b/android-offline/HBuilder-Integrate-AS/gradlew.bat new file mode 100644 index 0000000..f955316 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/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-offline/HBuilder-Integrate-AS/settings.gradle b/android-offline/HBuilder-Integrate-AS/settings.gradle new file mode 100644 index 0000000..2448467 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/settings.gradle @@ -0,0 +1 @@ +include ':simpleDemo' diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/build.gradle b/android-offline/HBuilder-Integrate-AS/simpleDemo/build.gradle new file mode 100644 index 0000000..1b8cd02 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/build.gradle @@ -0,0 +1,97 @@ +apply plugin: 'com.android.application' + +// ===== 统一配置:动态读取项目根 config/android.json 与 package.json(见 config/README.md)===== +// 本文件不包含任何密码/包名等可变配置,可直接提交 git。 +def projectRoot = file('../../..') +def cfgFile = new File(projectRoot, 'config/android.json') +if (!cfgFile.exists()) { + throw new GradleException('config/android.json not found. Copy config/android.example.json to config/android.json first. See config/README.md') +} +def cfg = new groovy.json.JsonSlurper().parseText(cfgFile.getText('UTF-8')) + +def pkgFile = new File(projectRoot, 'package.json') +def pkg = new groovy.json.JsonSlurper().parseText(pkgFile.getText('UTF-8')) +def versionNameValue = pkg.version +def versionParts = versionNameValue.tokenize('.') +if (versionParts.size() < 3) { + throw new GradleException("package.json version must be three-part X.Y.Z, got: ${versionNameValue}") +} +// versionCode = X*1000000 + Y*1000 + Z (each part 0-999) +def versionCodeValue = versionParts[0].toInteger() * 1000000 + versionParts[1].toInteger() * 1000 + versionParts[2].toInteger() + +android { + compileSdkVersion 35 + buildToolsVersion '35.0.0' + namespace cfg.packageName + defaultConfig { + applicationId cfg.packageName + minSdkVersion 21 + targetSdkVersion 33 + versionCode versionCodeValue + versionName versionNameValue + multiDexEnabled true + resValue 'string', 'app_name', cfg.appName + manifestPlaceholders = [ + 'dcloud_appkey': cfg.appKey ?: '' + ] + ndk { + abiFilters = cfg.abis + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + } + signingConfigs { + config { + keyAlias cfg.signing.keyAlias + keyPassword cfg.signing.keyPassword + storeFile file('../../../' + cfg.signing.keystore) + storePassword cfg.signing.storePassword + v1SigningEnabled true + v2SigningEnabled true + } + } + + buildTypes { + debug { + signingConfig signingConfigs.config + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + release { + signingConfig signingConfigs.config + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + aaptOptions { + additionalParameters '--auto-add-overlay' + ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~" + } +} + +// 每次构建前从 config 生成 dcloud_control.xml(appid) +task generateDcloudControl { + doLast { + def controlFile = file('src/main/assets/data/dcloud_control.xml') + controlFile.parentFile.mkdirs() + controlFile.setText("\n\n \n\n\n", 'UTF-8') + } +} +preBuild.dependsOn generateDcloudControl + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: []) + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' + implementation 'androidx.core:core:1.1.0' + implementation "androidx.fragment:fragment:1.1.0" + implementation 'androidx.recyclerview:recyclerview:1.1.0' + implementation 'com.facebook.fresco:fresco:2.5.0' + implementation "com.facebook.fresco:animated-gif:2.5.0" + implementation 'com.github.bumptech.glide:glide:4.9.0' + implementation 'com.alibaba:fastjson:1.2.83' + implementation 'androidx.webkit:webkit:1.5.0' +} + diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/android-gif-drawable-1.2.29.aar b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/android-gif-drawable-1.2.29.aar new file mode 100644 index 0000000..7059bbd Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/android-gif-drawable-1.2.29.aar differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/breakpad-build-release.aar b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/breakpad-build-release.aar new file mode 100644 index 0000000..12af05c Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/breakpad-build-release.aar differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/install-apk-release.aar b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/install-apk-release.aar new file mode 100644 index 0000000..dedb4d8 Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/install-apk-release.aar differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/lib.5plus.base-release.aar b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/lib.5plus.base-release.aar new file mode 100644 index 0000000..2962b38 Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/lib.5plus.base-release.aar differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/oaid_sdk_1.0.25.aar b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/oaid_sdk_1.0.25.aar new file mode 100644 index 0000000..47ca06d Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/oaid_sdk_1.0.25.aar differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/uniapp-v8-release.aar b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/uniapp-v8-release.aar new file mode 100644 index 0000000..e77ff84 Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/libs/uniapp-v8-release.aar differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/proguard-rules.pro b/android-offline/HBuilder-Integrate-AS/simpleDemo/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/AndroidManifest.xml b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/AndroidManifest.xml new file mode 100644 index 0000000..9255292 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/AndroidManifest.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_control.xml b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_control.xml new file mode 100644 index 0000000..a9adb92 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_control.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_error.html b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_error.html new file mode 100644 index 0000000..1e01dc8 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_error.html @@ -0,0 +1,92 @@ + + + + + + + + Error + + + + +
+ + + + + + +

We're sorry ...

+

+ +
Back
+
Close
+
Restart
+ + \ No newline at end of file diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_properties.xml b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_properties.xml new file mode 100644 index 0000000..1ee1845 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/assets/data/dcloud_properties.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/java/com/gztbyc/pda_wms/BootReceiver.java b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/java/com/gztbyc/pda_wms/BootReceiver.java new file mode 100644 index 0000000..5083d74 --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/java/com/gztbyc/pda_wms/BootReceiver.java @@ -0,0 +1,34 @@ +package com.gztbyc.pda_wms; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; + +/** + * 开机自启:监听系统开机完成广播,自动拉起应用。 + * 说明:Android 3.1+ 要求应用至少被用户启动过一次后,BOOT_COMPLETED 才会送达。 + */ +public class BootReceiver extends BroadcastReceiver { + + private static final String ACTION_QUICKBOOT_POWERON = "android.intent.action.QUICKBOOT_POWERON"; + + @Override + public void onReceive(Context context, Intent intent) { + if (intent == null || intent.getAction() == null) { + return; + } + final String action = intent.getAction(); + if (!Intent.ACTION_BOOT_COMPLETED.equals(action) && !ACTION_QUICKBOOT_POWERON.equals(action)) { + return; + } + try { + Intent launch = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName()); + if (launch != null) { + launch.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); + context.startActivity(launch); + } + } catch (Exception e) { + // 启动失败不阻断系统广播 + } + } +} diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/icon.png b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/icon.png new file mode 100644 index 0000000..85cb8d3 Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/icon.png differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/push.png b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/push.png new file mode 100644 index 0000000..0723172 Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/push.png differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/splash.png b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/splash.png new file mode 100644 index 0000000..fd1c43d Binary files /dev/null and b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/drawable/splash.png differ diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/values/strings.xml b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/values/strings.xml new file mode 100644 index 0000000..14b5d2d --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + + diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/values/styles.xml b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/values/styles.xml new file mode 100644 index 0000000..3c26b8a --- /dev/null +++ b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/res/values/styles.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/android-offline/README.md b/android-offline/README.md new file mode 100644 index 0000000..7c863d8 --- /dev/null +++ b/android-offline/README.md @@ -0,0 +1,44 @@ +# Android 离线打包(WMS_PDA) + +本目录是 DCloud 官方 **Android 离线打包**集成工程,用于在本地用命令行出 APK(不需要 Android Studio,也不依赖 DCloud 云打包)。 + +## 目录 + +| 路径 | 说明 | git | +|---|---|---| +| `HBuilder-Integrate-AS/` | Android Studio 集成工程,**已提交**(保证发布基座一致)。包名/版本/签名/应用名/appid/appKey 全部由 `simpleDemo/build.gradle` 在构建时从 `config/android.json` 与根 `package.json` 动态读取,工程内不含任何密码 | ✅ | +| `HBuilder-Integrate-AS/simpleDemo/libs/` | 5+ Runtime 等 aar(`lib.5plus.base-release.aar`、`uniapp-v8-release.aar`、`breakpad`、`install-apk` 等) | ✅ | +| `keystore/` | 签名密钥文件 | ❌ (忽略) | +| `icon/` `splash/` | 图标与启动图源文件,`prepare.cjs` 用它们覆盖 `res/` 下同名资源 | ✅ | +| `SDK/` | DCloud 离线 SDK 解压目录(体积大,约 165MB),仅在需要额外原生模块时才下载 | ❌ (忽略) | +| `pack.ps1` | 命令行打包主脚本(JDK/SDK 探测 → 注入 → `gradlew assembleRelease`) | ✅ | +| `prepare.cjs` | 注入 App 资源、覆盖图标/启动图、对齐 `compilerVersion` | ✅ | + +## 一键打包 + +```powershell +npm run build:apk # = 生产编译 + 产物地址校验 + 离线打包 +npm run build:apk -- -Clean # gradle 全量重编 +npm run build:apk -- -NoInject # 跳过资源注入(已注入过时用) +npm run android:pack:raw # 跳过前端编译,仅用现有 dist/build/app-plus 打包 +``` + +产物:`release/android/wms-pda_v{版本}_release.apk`。版本唯一来源是根 `package.json` 的 `version`(X.Y.Z),`versionCode` 自动推导为 `X*1000000 + Y*1000 + Z`。 + +环境要求:JDK 17+(脚本会自动探测 `JAVA_HOME`、Android Studio JBR 等常见位置)、Android SDK(`ANDROID_HOME`/`ANDROID_SDK_ROOT`/`local.properties` 任一即可)。 + +## 与云打包的差异(重要) + +- **签名不同**:云打包用的是 DCloud 的证书,本地离线打包用 `config/android.json` 配置的 keystore。若此前对外发布过云打包版本,切换后**签名不一致、无法覆盖安装**(需先卸载重装);若包名+签名已被第三方 SDK/推送/应用商店绑定,需要重新登记。 +- **权限来自 AndroidManifest**:离线打包**不会**读取 `src/manifest.json` 的权限声明,权限必须写在 `HBuilder-Integrate-AS/simpleDemo/src/main/AndroidManifest.xml`。增删权限时请两处同步,否则会出现「云打包能用、离线包缺权限」的差异。 +- **明文 HTTP**:生产接口是 `http://qimen.wms.gztbyc.com`,所以 `` 上显式声明了 `android:usesCleartextTraffic="true"`(Android 9+ 默认禁止明文 HTTP)。日后切 HTTPS 可移除。 +- **appKey 校验**:`appKey` 与 `appId` + 包名 + 证书 SHA-256 严格绑定,不匹配时 APK 能装能开但启动白屏提示「未配置appkey或配置错误」。详见 `config/README.md`。 +- **Runtime 版本提示**:`prepare.cjs` 会把 www 内 `manifest.json`/`app-config-service.js` 的 `compilerVersion` 对齐到 `config/android.json` 的 `runtimeVersion`,用于消除启动时「本应用使用 HBuilderX %s 编译,而手机端 SDK 版本是 %s」的提示。 + +## 首次使用清单 + +1. 在 `config/android.json` 填 `appKey`、`keyAlias`、`storePassword`、`keyPassword`(该文件不提交 git); +2. 把对应证书放入 `android-offline/keystore/`; +3. `npm run build:apk`。 + +> 发布上传(scp + `latest.json`)在 `pack.ps1` 内,但只有存在 `config/deploy.json` 时才会执行;本仓库不提供该文件,因此默认不会上传。 diff --git a/android-offline/icon/app-icon.png b/android-offline/icon/app-icon.png new file mode 100644 index 0000000..85cb8d3 Binary files /dev/null and b/android-offline/icon/app-icon.png differ diff --git a/android-offline/icon/璇存槑.txt b/android-offline/icon/璇存槑.txt new file mode 100644 index 0000000..dc7f71d --- /dev/null +++ b/android-offline/icon/璇存槑.txt @@ -0,0 +1,3 @@ +app-icon.png 已生成(1024x1024,深蓝渐变 + 包裹箱 + 扫描线,无文字)。 +如需重新生成或调整设计,编辑 scripts/gen-android-assets.ps1 后运行: + powershell -NoProfile -ExecutionPolicy Bypass -File scripts\gen-android-assets.ps1 diff --git a/android-offline/license.md b/android-offline/license.md new file mode 100644 index 0000000..6ddb0ca --- /dev/null +++ b/android-offline/license.md @@ -0,0 +1,54 @@ +# html5plus runtime 使用许可协议 +本协议是数字天堂(北京)网络技术有限公司(以下称“DCloud”)与您之间达成的关于html5plus runtime及相关配套软件(以下简称本软件)的协议。 +本协议签订地点为中华人民共和国北京市海淀区。 +您使用本软件即视为您已阅读并同意受本协议的约束。 + +## 定义 +html5plus runtime,即DCloud公司提供的App端引擎,该引擎可用于5+App、wap2app、uni-app的App端打包,及5+sdk、uni小程序sdk等离线打包用sdk。 +本软件包含iOS版和Android版。 + +本软件包括很多模块,包括DCloud的uni统计、uni-AD、uniPush等业务的客户端sdk部分,也属于本产品的模块。但这些模块都可以由您自行选择是否启用。 + +## 知识产权及使用授权 +您可以自由下载、使用、复制本软件而不需要向DCloud付费。无时间和地域限制。 +DCloud所拥有的知识产权,包括但不限于商标、专利、著作权、商业秘密、专有数据、源码,并不发生转移或共享。 +您使用本软件开发的代码及输出物,即手机端移动应用,其知识产权归属您所有。 +类似于您开发的应用内嵌了jvm或.net framework,虽然您的java代码的著作权属于您,但jvm等三方runtime的知识产权仍归原作者所有。 +如果DCloud开源了某些代码,这些代码会有单独的开源许可协议并提供在github等网站的DCloud官方账号下。您可以在遵守这些开源协议的基础上使用DCloud开源的代码。 +本软件可能会使用第三方软件或技术,例如三方开源代码,这类使用已经确保遵循这些三方软件的授权协议。详细的列表在本软件目录下的ThirdPartyNotices文件中查阅。 +特别的,如果您使用uni小程序sdk,该产品的授权范围仅限制在原生App中将某个栏目或模块进行小程序化而使用,不可用于将uni-app前端代码打包成App。 +您不得破解、反编译、逆向工程本软件,不得破解或劫持本软件网络请求,不得对DCloud服务进行网络攻击,不得利用DCloud系统漏洞谋利或侵害DCloud利益,不得替换、删改本软件自带的非用户自定义文件。 +未经书面许可您不可利用DCloud产品的全部或部分文件、模块、组件来制作与DCloud争夺用户的产品。 + + +## 隐私条款 +DCloud尊重用户隐私,遵循国家对数据隐私保护的相关法律法规,并在此公开所有本软件会上报DCloud服务器的数据清单,以及说明数据采集的必要性。 +1. 异常崩溃、错误日志 +本软件发生错误异常、崩溃时,会将错误信息发送给DCloud服务器。 +这些信息除了错误内容,也包括应用基本信息(如appid、包名)和环境信息(如设备型号、os名称、版本、网络类型等)。 +同时DCloud会提供web界面供您查看了解崩溃情况。您可以分析错误在什么情况下产生,不同设备的崩溃率分布情况,并进行改进。 +由于开发者的代码为前端代码,无法捕获原生异常和崩溃。如果DCloud不提供此信息,您将无法了解相关情况,所以采集和输出报告是帮助您顺利使用本软件的必要举措。 +2. 启动速度性能分析 +本软件每次启动会记录启动时长,也包括上述应用基本信息和环境信息。 +同时DCloud会提供web界面供你了解相关性能报表。您可以分析在不同的设备、网络环境下您的应用的启动速度是否异常,并进行改进。 +由于开发者的代码为前端代码,无法记录App初始启动计时点。如果DCloud不提供此信息,您将无法了解相关情况,所以采集和输出报告是帮助您顺利使用本软件的必要举措。 +3. 本软件不会采集用户的短信、通讯录、相册、剪贴板信息,不会采集用户的摄像头、麦克风数据。 +4. 除非国家法律法规规定或得到您的许可,否则DCloud不会将采集的数据授权给任何第三方。 +5. 如果您使用了DCloud的其他联网业务,比如uni统计、uni-AD、uniPush,这些业务的隐私条款不包括在本协议中。 + +## 安全 +您理解并同意,本软件同其他软件一样,无法承诺绝对的安全性。 +当DCloud发现本软件的任何安全漏洞时,将及时在[社区](https://ask.dcloud.net.cn/explore/)发送公告,并将及时发布紧急更新补丁和升级推送通知。 + +## 免责声明和违约条款 +您在使用本软件前应进行有效评估,DCloud不因您使用本软件而承担任何法律责任或经济赔偿责任。 +如果您违反本协议,包括但不限于破解本软件,DCloud将有权停止您使用本软件,造成的损失由您自行承担。 +如果您给DCloud造成重大损失,或者在接收到DCloud的停止违约通知后拒不改正,DCloud将有权停止对您的DCloud所有产品和服务的使用授权,罚没您在DCloud所有产品服务中的预付款项和应收款项,因此造成的损失由您自行承担。 +如果您的行为产生法律问题,DCloud有权追责您的法律责任。 + +## 协议修订 +根据发展,DCloud可能会对本协议进行修改。修改时,DCloud会在产品或者网页中显著的位置发布相关信息以便及时通知到用户。如果您选择继续使用本软件,即表示您同意接受这些修改。 + +## 联系我们 +若您对本软件有任何疑问、意见和建议,欢迎联系我们:[网站](https://DCloud.io) +若您对本协议有任何不满,希望更改条款,可以通过与 bd@dcloud.io 沟通,商谈您需要的付费版使用协议。 diff --git a/android-offline/pack.ps1 b/android-offline/pack.ps1 new file mode 100644 index 0000000..dbd92fe --- /dev/null +++ b/android-offline/pack.ps1 @@ -0,0 +1,332 @@ +# Command-line APK packaging for WMS_PDA (no Android Studio needed). +# Flow: detect JDK/SDK -> inject config (prepare.cjs) -> gradlew assembleRelease -> copy APK to release/android/ +# +# 发布上传默认关闭:未提供 config/deploy.json 时会跳过(本仓库不提供该文件)。 +# +# Usage: +# .\pack.ps1 # package release APK +# .\pack.ps1 -Clean # full rebuild +# .\pack.ps1 -Timestamp # keep timestamped artifact name +# .\pack.ps1 -VersionName "1.0.2" # override version (written back to package.json; versionCode auto-derived) +# .\pack.ps1 -VersionCode 10002 # manually set versionCode (rarely needed) +# .\pack.ps1 -NoInject # skip prepare.cjs injection (already injected) +# .\pack.ps1 -NoUpload # package only, skip publish upload (scp + latest.json) +# .\pack.ps1 -JavaHome '...' -AndroidSdk '...' +param( + [switch]$Clean, + [switch]$Timestamp, + [switch]$NoInject, + [switch]$NoUpload, + [string]$VersionName = "", + [string]$VersionCode = "", + [string]$JavaHome = "", + [string]$AndroidSdk = "" +) + +$ErrorActionPreference = 'Stop' + +# ============ paths ============ +$root = Split-Path -Parent $MyInvocation.MyCommand.Path +$projRoot = Split-Path -Parent $root +Set-Location $root + +$asDir = Join-Path $root 'HBuilder-Integrate-AS' +$module = 'simpleDemo' +$appFile = 'wms-pda' +$gradlew = Join-Path $asDir 'gradlew.bat' +$distDir = Join-Path $projRoot 'release\android' +$apkSource = Join-Path $asDir "$module\build\outputs\apk\release\$module-release.apk" +$buildGradle = Join-Path $asDir "$module\build.gradle" +$configPath = Join-Path $projRoot 'config\android.json' + +# ============ JDK detect (JDK 17+ required) ============ +function Get-JavaMajorVersion([string]$javaExe) { + $prev = $ErrorActionPreference + $ErrorActionPreference = 'Continue' + try { + $out = (cmd /c "`"$javaExe`" -version 2>&1" | Out-String) + } finally { + $ErrorActionPreference = $prev + } + if ($out -match 'version\s+"1\.(\d+)') { return [int]$Matches[1] } + if ($out -match 'version\s+"(\d+)') { return [int]$Matches[1] } + return 0 +} + +$jdkCandidates = @() +if ($JavaHome) { $jdkCandidates += $JavaHome } +if ($env:JAVA_HOME) { $jdkCandidates += $env:JAVA_HOME } +$jdkCandidates += @( + "$env:LOCALAPPDATA\Programs\EclipseAdoptium", + "$env:LOCALAPPDATA\Programs\Android Studio\jbr", + "C:\Program Files\Android\Android Studio\jbr", + "D:\Program Files\Android\Android Studio\jbr", + "$env:USERPROFILE\.jdks", + "C:\Program Files\Java", + "C:\Program Files\Eclipse Adoptium" +) + +$selectedJava = "" +foreach ($c in $jdkCandidates) { + if (-not $c) { continue } + $javaExe = Join-Path $c 'bin\java.exe' + if (-not (Test-Path $javaExe)) { + $found = Get-ChildItem $c -Recurse -Filter java.exe -ErrorAction SilentlyContinue | Select-Object -First 1 + if ($found) { $javaExe = $found.FullName } + } + if (Test-Path $javaExe) { + $major = Get-JavaMajorVersion $javaExe + if ($major -ge 17) { + $selectedJava = Split-Path -Parent (Split-Path -Parent $javaExe) + break + } + } +} + +if ($selectedJava -and (Test-Path (Join-Path $selectedJava 'bin\java.exe'))) { + $JavaHome = $selectedJava + $env:JAVA_HOME = $JavaHome + $env:Path = "$JavaHome\bin;$env:Path" +} else { + Write-Host "" + Write-Host "[error] JDK 17+ not found. Install JDK 17+ (or Android Studio JBR) or use -JavaHome '...'." -ForegroundColor Red + exit 1 +} + +# ============ Android SDK detect ============ +if (-not $AndroidSdk) { $AndroidSdk = $env:ANDROID_HOME } +if (-not $AndroidSdk) { $AndroidSdk = $env:ANDROID_SDK_ROOT } +$localProps = Join-Path $asDir 'local.properties' +if (-not $AndroidSdk -and (Test-Path $localProps)) { + $line = Select-String -Path $localProps -Pattern '^sdk\.dir=(.+)$' + if ($line) { $AndroidSdk = [regex]::Replace($line.Matches[0].Groups[1].Value, '\\([\\:])', '$1') } +} +if (-not $AndroidSdk -or -not (Test-Path (Join-Path $AndroidSdk 'platform-tools'))) { + $sdkCandidates = @( + "$env:LOCALAPPDATA\Android\Sdk", + "$env:USERPROFILE\AppData\Local\Android\Sdk", + "C:\Android\Sdk", + "D:\Android\Sdk" + ) + foreach ($c in $sdkCandidates) { + if (Test-Path (Join-Path $c 'platform-tools')) { $AndroidSdk = $c; break } + } +} +if ($AndroidSdk -and (Test-Path (Join-Path $AndroidSdk 'platform-tools'))) { + $env:ANDROID_HOME = $AndroidSdk + $env:ANDROID_SDK_ROOT = $AndroidSdk + $escaped = $AndroidSdk -replace '\\', '\\' + $sdkLine = "sdk.dir=$escaped" + if (Test-Path $localProps) { + $props = Get-Content $localProps -Raw + if ($props -match '(?m)^sdk\.dir=') { + $props = $props -replace '(?m)^sdk\.dir=.*$', $sdkLine + } else { + $props = $props.TrimEnd() + "`r`n" + $sdkLine + "`r`n" + } + Set-Content -Path $localProps -Value $props -Encoding ASCII + } else { + Set-Content -Path $localProps -Value $sdkLine -Encoding ASCII + } +} else { + Write-Host "" + Write-Host "[error] Android SDK not found. Set ANDROID_HOME or use -AndroidSdk." -ForegroundColor Red + exit 1 +} + +# ============ pre-check ============ +if (-not (Test-Path $gradlew)) { Write-Host "[error] gradlew not found: $gradlew" -ForegroundColor Red; exit 1 } +if (-not (Test-Path $configPath)) { Write-Host "[error] config/android.json not found. Copy config/android.example.json to config/android.json first." -ForegroundColor Red; exit 1 } +if (-not (Test-Path $buildGradle)) { Write-Host "[error] build.gradle not found: $buildGradle" -ForegroundColor Red; exit 1 } + +# ============ version: single source of truth = package.json ============ +# versionName = package.json "version" (X.Y.Z, three-part) +# versionCode = X*1000000 + Y*1000 + Z (derived; each part must be 0-999) +$pkgPath = Join-Path $projRoot 'package.json' +if (-not (Test-Path $pkgPath)) { Write-Host "[error] package.json not found: $pkgPath" -ForegroundColor Red; exit 1 } + +$pkg = Get-Content $pkgPath -Raw -Encoding UTF8 | ConvertFrom-Json +$verName = [string]$pkg.version + +# -VersionName overrides and writes back to package.json (keeps exe/apk in sync) +if ($VersionName) { + $verName = $VersionName + $raw = [System.IO.File]::ReadAllText($pkgPath, [System.Text.Encoding]::UTF8) + $raw = $raw -replace '("version"\s*:\s*")[^"]*(")', ('${1}' + $VersionName + '${2}') + [System.IO.File]::WriteAllText($pkgPath, $raw, (New-Object System.Text.UTF8Encoding($false))) + Write-Host "" + Write-Host "[update] version written back to package.json -> $VersionName" -ForegroundColor Cyan +} + +# versionCode: explicit -VersionCode wins, otherwise derived from X.Y.Z +if ($VersionCode) { + $verCode = $VersionCode +} else { + $parts = @($verName -split '\.') + if ($parts.Count -lt 3) { + Write-Host "[error] version '$verName' must be three-part (X.Y.Z)" -ForegroundColor Red + exit 1 + } + $numX = [int]$parts[0] + $numY = [int]$parts[1] + $numZ = [int]$parts[2] + if ($numX -gt 999 -or $numY -gt 999 -or $numZ -gt 999) { + Write-Host "[error] each part of version '$verName' must be 0-999 (e.g. 1.0.101 is ok, 1.0.1000 is not)" -ForegroundColor Red + exit 1 + } + $verCode = [string]($numX * 1000000 + $numY * 1000 + $numZ) + Write-Host "" + Write-Host "[info] versionCode derived: $verName -> $verCode" -ForegroundColor DarkGray +} + +$cfg = Get-Content $configPath -Raw -Encoding UTF8 | ConvertFrom-Json + +Write-Host "" +Write-Host "================== uni-app Android packaging ==================" -ForegroundColor Cyan +Write-Host " project : $root" +Write-Host " appid : $($cfg.appId)" +Write-Host " version : $verName ($verCode)" +Write-Host " build : release" +Write-Host " JDK : $($env:JAVA_HOME)" +Write-Host " AndroidSDK: $($env:ANDROID_HOME)" +Write-Host "===============================================================" -ForegroundColor Cyan + +# ============ step 1: inject (prepare.cjs) ============ +if (-not $NoInject) { + Write-Host "" + Write-Host "[step 1/3] inject config + www resources (prepare.cjs) ..." -ForegroundColor Yellow + node (Join-Path $root 'prepare.cjs') + if ($LASTEXITCODE -ne 0) { + Write-Host "[error] prepare.cjs failed" -ForegroundColor Red + exit 1 + } +} else { + Write-Host "" + Write-Host "[step 1/3] -NoInject specified, skip prepare.cjs" -ForegroundColor DarkGray +} + +# ============ step 2: gradle build ============ +$step = 2 +if ($Clean) { + Write-Host "" + Write-Host "[step 2/3] gradle clean ..." -ForegroundColor Yellow + Push-Location $asDir + & $gradlew clean --console=plain + $cleanCode = $LASTEXITCODE + Pop-Location + if ($cleanCode -ne 0) { Write-Host "[error] clean failed" -ForegroundColor Red; exit 1 } + $step = 3 +} + +Write-Host "" +Write-Host "[step $step/3] gradle assembleRelease ..." -ForegroundColor Yellow +Push-Location $asDir +& $gradlew assembleRelease --console=plain +$buildCode = $LASTEXITCODE +Pop-Location +if ($buildCode -ne 0) { + Write-Host "[error] packaging failed (gradle exit code $buildCode)" -ForegroundColor Red + exit 1 +} + +# ============ step 3: copy artifact ============ +if (-not (Test-Path $apkSource)) { + Write-Host "[error] APK not found: $apkSource" -ForegroundColor Red + exit 1 +} +if (-not (Test-Path $distDir)) { New-Item -ItemType Directory -Path $distDir -Force | Out-Null } + +if ($Timestamp) { + $stamp = Get-Date -Format 'yyyyMMdd_HHmmss' + $apkName = "${appFile}_v${verName}_release_${stamp}.apk" +} else { + $apkName = "${appFile}_v${verName}_release.apk" +} +$apkDest = Join-Path $distDir $apkName +Copy-Item -Path $apkSource -Destination $apkDest -Force + +$apkSize = [math]::Round((Get-Item $apkDest).Length / 1MB, 2) +Write-Host "" +Write-Host "================== packaging done ==================" -ForegroundColor Green +Write-Host " artifact : $apkDest" +Write-Host " size : ${apkSize} MB" +Write-Host " version : $verName ($verCode)" +Write-Host "===================================================" -ForegroundColor Green + +# ============ publish upload (scp + latest.json, same flow as sandan project) ============ +$deployCfgPath = Join-Path $projRoot 'config\deploy.json' +if ($NoUpload) { + Write-Host "" + Write-Host "[hint] -NoUpload specified, skip publish upload" -ForegroundColor DarkGray +} elseif (-not (Test-Path $deployCfgPath)) { + Write-Host "" + Write-Host "[hint] config/deploy.json not found, skip publish upload (copy config/deploy.example.json and fill real values)" -ForegroundColor DarkGray +} else { + $dcfg = Get-Content $deployCfgPath -Raw -Encoding UTF8 | ConvertFrom-Json + $dcfg = $dcfg.android + if (-not $dcfg) { + Write-Host "[error] config/deploy.json missing android section" -ForegroundColor Red + exit 1 + } + $dHost = [string]$dcfg.host + $dUser = [string]$dcfg.user + $dKey = [string]$dcfg.keyPath + $dRemDir = ([string]$dcfg.remoteDir).TrimEnd('/') + $dUrlPre = [string]$dcfg.downloadUrlPrefix + $dPort = 22 + if ($dcfg.port) { $dPort = [int]$dcfg.port } + $dLatest = 'latest.json' + if ($dcfg.latestJsonName) { $dLatest = [string]$dcfg.latestJsonName } + if ($dUrlPre -and -not $dUrlPre.EndsWith('/')) { $dUrlPre = $dUrlPre + '/' } + + $missing = @() + if (-not $dHost) { $missing += 'host' } + if (-not $dUser) { $missing += 'user' } + if (-not $dRemDir) { $missing += 'remoteDir' } + if (-not $dUrlPre) { $missing += 'downloadUrlPrefix' } + if ($missing.Count -gt 0) { + Write-Host "[error] config/deploy.json missing fields: $($missing -join ', ')" -ForegroundColor Red + exit 1 + } + if ($dKey -and -not (Test-Path $dKey)) { + Write-Host "[error] SSH key not found: $dKey" -ForegroundColor Red + exit 1 + } + + # generate latest.json (same directory as the APK) + $sha256 = (Get-FileHash -Path $apkDest -Algorithm SHA256).Hash + $dlUrl = "$dUrlPre$apkName" + $publishedAt = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ') + $latest = [ordered]@{ + version = $verName + file = $apkName + url = $dlUrl + sha256 = $sha256 + publishedAtUtc = $publishedAt + } + $latestPath = Join-Path $distDir $dLatest + [System.IO.File]::WriteAllText($latestPath, ($latest | ConvertTo-Json), (New-Object System.Text.UTF8Encoding($false))) + + Write-Host "" + Write-Host "[publish] upload to ${dUser}@${dHost}:${dRemDir}/ ..." -ForegroundColor Yellow + $scpArgs = @('-i', $dKey, '-P', "$dPort", '-o', 'StrictHostKeyChecking=accept-new') + & scp @scpArgs $apkDest "${dUser}@${dHost}:${dRemDir}/" + if ($LASTEXITCODE -ne 0) { + Write-Host "[error] APK upload failed (scp exit code $LASTEXITCODE)" -ForegroundColor Red + exit 1 + } + & scp @scpArgs $latestPath "${dUser}@${dHost}:${dRemDir}/" + if ($LASTEXITCODE -ne 0) { + Write-Host "[error] $dLatest upload failed (scp exit code $LASTEXITCODE)" -ForegroundColor Red + exit 1 + } + + Write-Host "" + Write-Host "================== publish done ==================" -ForegroundColor Green + Write-Host " download : $dlUrl" + Write-Host " sha256 : $sha256" + Write-Host " updated : ${dRemDir}/${dLatest}" + Write-Host "=================================================" -ForegroundColor Green +} + +exit 0 diff --git a/android-offline/prepare.cjs b/android-offline/prepare.cjs new file mode 100644 index 0000000..a8d0a27 --- /dev/null +++ b/android-offline/prepare.cjs @@ -0,0 +1,154 @@ +/** + * Android 离线打包准备脚本 + * 职责:校验 config/android.json、拷贝 App 资源(www)、覆盖图标/启动图。 + * 包名/版本/签名/应用名/appid/appKey 等由 simpleDemo/build.gradle 在构建时动态读取 + * config/android.json 与 package.json,本脚本不再写入工程文件。 + * + * 用法: + * node android-offline/prepare.cjs + * node android-offline/prepare.cjs # 可选:覆盖 www 资源目录 + */ +const fs = require('fs') +const path = require('path') + +const ROOT = path.resolve(__dirname, '..') +const OFFLINE_DIR = __dirname +const CONFIG_PATH = path.join(ROOT, 'config', 'android.json') + +const log = (...args) => console.log('[prepare]', ...args) +const warn = (...args) => console.warn('[prepare][警告]', ...args) + +// ---------- 1. 读取配置 ---------- +let config +try { + config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')) +} catch (error) { + if (error.code === 'ENOENT') { + console.error(`[prepare][错误] 未找到配置文件: ${CONFIG_PATH}`) + console.error('请复制 config/android.example.json 为 config/android.json 并填写(appKey、signing 等),详见 config/README.md') + } else { + console.error(`[prepare][错误] 配置文件解析失败 ${CONFIG_PATH}: ${error.message}`) + } + process.exit(1) +} + +const required = ['appId', 'appName', 'packageName'] +for (const key of required) { + if (!config[key]) { + console.error(`[prepare][错误] config.json 缺少必填项: ${key}`) + process.exit(1) + } +} + +// ---------- 2. 定位 SDK 工程 ---------- +const AS_DIR = path.join(OFFLINE_DIR, 'HBuilder-Integrate-AS') +const DEMO_DIR = path.join(AS_DIR, 'simpleDemo') + +if (!fs.existsSync(AS_DIR)) { + console.error('[prepare][错误] 未找到离线 SDK 工程: ' + AS_DIR) + console.error('请先下载离线 SDK 并解压到 android-offline/ 目录,详见 README.md') + process.exit(1) +} +if (!fs.existsSync(DEMO_DIR)) { + console.error('[prepare][错误] 未找到 simpleDemo 工程: ' + DEMO_DIR) + process.exit(1) +} + +let failed = false + +// ---------- 3. 签名配置预检(Gradle 构建时从 config 动态读取) ---------- +if (!config.signing || !config.signing.keystore) { + warn('config/android.json 中 signing.keystore 为空,Gradle 构建时将因缺少签名配置而失败') +} else if (!fs.existsSync(path.resolve(ROOT, config.signing.keystore))) { + warn(`签名文件不存在: ${path.resolve(ROOT, config.signing.keystore)}`) +} +if (!config.appKey) { + warn('config/android.json 中 appKey 为空,请到 https://dev.dcloud.net.cn 申请后填写') +} + +// ---------- 4. 拷贝 App 资源到 assets/apps/{appId}/www ---------- +const wwwTarget = path.join(DEMO_DIR, 'src', 'main', 'assets', 'apps', config.appId, 'www') + +// 可选外部 www 源覆盖:node prepare.cjs ;其次用 config.android.json 的 wwwSource +const wwwOverride = process.argv[2] ? path.resolve(ROOT, process.argv[2]) : '' + +const candidates = [ + ...(wwwOverride ? [wwwOverride] : []), + ...(config.wwwSource ? [path.resolve(ROOT, config.wwwSource)] : []), + path.join(ROOT, 'unpackage', 'resources', config.appId, 'www'), + path.join(ROOT, 'dist', 'build', 'app-plus'), +] + +const wwwSource = candidates.find((dir) => fs.existsSync(dir)) +if (!wwwSource) { + failed = true + console.error('[prepare][错误] 未找到 App 资源,请先执行 npm run build:app-plus(或 HBuilderX 生成本地打包资源)') +} else { + fs.rmSync(wwwTarget, { recursive: true, force: true }) + fs.cpSync(wwwSource, wwwTarget, { recursive: true }) + log(`✓ 拷贝 App 资源: ${path.relative(ROOT, wwwSource)} -> assets/apps/${config.appId}/www`) +} + +// ---------- 4.5 对齐编译器版本(隐藏"HTML5+ Runtime 版本不一致"提示) ---------- +// CLI 构建资源时写入的 compilerVersion(如 5.07)与离线 SDK Runtime 版本不一致时, +// 启动会弹"本应用使用HBuilderX %s 编译,而手机端SDK版本是 %s"对话框。 +// 此处把 www 内 manifest.json / app-config-service.js 的 compilerVersion 对齐到 +// config/android.json 的 runtimeVersion(默认 5.24,与离线 SDK 一致),即可消除提示。 +const runtimeVersion = config.runtimeVersion || '5.24' +function alignCompilerVersion (filePath) { + try { + if (!fs.existsSync(filePath)) return + let text = fs.readFileSync(filePath, 'utf-8') + const re = /"compilerVersion"\s*:\s*"[^"]*"/g + text = text.replace(re, '"compilerVersion": "' + runtimeVersion + '"') + fs.writeFileSync(filePath, text, 'utf-8') + log(`✓ 对齐 compilerVersion -> ${runtimeVersion}: ${path.relative(ROOT, filePath)}`) + } catch (e) { + warn(`对齐 compilerVersion 失败 ${filePath}: ${e.message}`) + } +} +alignCompilerVersion(path.join(wwwTarget, 'manifest.json')) +alignCompilerVersion(path.join(wwwTarget, 'app-config-service.js')) + +// ---------- 9. 覆盖图标与启动图 ---------- +function findResFiles(pattern) { + const resDir = path.join(DEMO_DIR, 'src', 'main', 'res') + const hits = [] + if (!fs.existsSync(resDir)) return hits + const walk = (dir) => { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const full = path.join(dir, entry.name) + if (entry.isDirectory()) walk(full) + else if (pattern.test(entry.name)) hits.push(full) + } + } + walk(resDir) + return hits +} + +function applyImage(cfgPath, patterns, desc) { + if (!cfgPath) return + const image = path.resolve(ROOT, cfgPath) + if (!fs.existsSync(image)) { + warn(`${desc}不存在,跳过: ${image}`) + return + } + const targets = findResFiles(patterns) + if (targets.length === 0) { + warn(`${desc}: 未在 res 下找到目标文件(正则: ${patterns}),请手动替换`) + return + } + for (const target of targets) { + fs.copyFileSync(image, target) + log(`✓ 覆盖${desc}: ${path.relative(ROOT, target)}`) + } +} + +applyImage(config.icon, /^(icon\.png|ic_launcher(\.png)?)$/i, '应用图标') +applyImage(config.splash, /^splash(\.png|_screen\.png)?$/i, '启动图') + +// ---------- 5. 总结 ---------- +console.log('\n[prepare] 完成' + (failed ? '(部分失败,请查看上方错误)' : '')) +console.log('后续:包名/版本/签名/应用名/appid/appKey 由 Gradle 构建时从 config/android.json 与 package.json 动态读取') +if (!failed) process.exit(0) +process.exit(1) diff --git a/android-offline/readme/AndroidThirdPartyNotices b/android-offline/readme/AndroidThirdPartyNotices new file mode 100644 index 0000000..8e0fdbe --- /dev/null +++ b/android-offline/readme/AndroidThirdPartyNotices @@ -0,0 +1,2010 @@ +Third Party Legal Notices + +This product use Third Party code for certain functions may include licensed under +terms that require Android App to display the following notices: + + +************************************************************************************ +Android-Universal-Image-Loader + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +************************************************************************************ +android-gif-drawable + +MIT License +Copyright (c) 2013 - present Karol Wrótniak, Droids on Roids LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +SKIA: +// Copyright (c) 2011 Google Inc. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +GIFLIB: +The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond + +ReLinker: +Copyright 2015 KeepSafe Software, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +memset.arm.S: +Copyright (C) 2010 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +************************************************************************************ +NineOldAndroids + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +************************************************************************************ +okhttp + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +************************************************************************************ +VasSonic + +Tencent is pleased to support the open source community by making VasSonic available. +Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. +If you have downloaded a copy of the VasSonic binary from Tencent, please note that the VasSonic binary is licensed under the +BSD 3-Clause License. +If you have downloaded a copy of the VasSonic source code from Tencent, please note that VasSonic source code is licensed under +the BSD 3-Clause License, except for the third-party components listed below which are subject to different license terms. +Your integration of VasSonic into your own projects may require compliance with the BSD 3-Clause License, as well as the other +licenses applicable to the third-party components included within VasSonic. +A copy of the BSD 3-Clause License is included in this file. + +Other dependencies and licenses: + +Open Source Software Licensed Under the Apache License, Version 2.0: +---------------------------------------------------------------------------------------- +1. Android Source Code 4.4_r1 +Copyright (C) 2005-2015 The Android Open Source Project + + +Terms of the Apache License, Version 2.0: +-------------------------------------------------------------------- +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +“License” shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 +of this document. + +“Licensor” shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +“Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are +under common control with that entity. For the purposes of this definition, “control” means (i) the power, direct or indirect, +to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) +or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +“You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License. + +“Source” form shall mean the preferred form for making modifications, including but not limited to software source code, +documentation source, and configuration files. + +“Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, and conversions to other media types. + +“Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by +a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +“Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for +which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. +For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) +to the interfaces of, the Work and Derivative Works thereof. + +“Contribution” shall mean any work of authorship, including the original version of the Work and any modifications or +additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the +copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this +definition, “submitted” means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, +including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems +that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright owner as “Not a Contribution.” + +“Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor +and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims +licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) +with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including +a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct +or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate +as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You meet the following conditions: + +a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + +b) You must cause any modified files to carry prominent notices stating that You changed the files; and + +c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, +and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +d) If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must +include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain +to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated +by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational +purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, +alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as +modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions +for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, +reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the +Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of +the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of +the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor +provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, +without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. +You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated +with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor +be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as +a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been +advised of the possibility of such damages. +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with +this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, +not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for +any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or +additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by +brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the +appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included +on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + + +Terms of the BSD 3-Clause License: +-------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the distribution. +3. Neither the name of [copyright holder] nor the names of its contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +************************************************************************************ +subsampling-scale-image-view + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +************************************************************************************ +incubator-weex + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Apache Weex (Incubating) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +============================================================================== + +Apache Weex Submodules: + +Apache Weex includes a number of submodules with separate copyright notices +and license terms. Your use of these submodules is subject to the terms and +conditions of the following licenses. + +This product bundles vuejs v1.0.12, which is available under a +"MIT" license. For details, see https://github.com/vuejs/vue/blob/v1.0.12/LICENSE and following files: + src/js-framework/dist/index.js + runtime/frameworks/legacy/core/array.js + runtime/frameworks/legacy/core/dep.js + runtime/frameworks/legacy/core/object.js + runtime/frameworks/legacy/core/observer.js + runtime/frameworks/legacy/core/state.js + runtime/frameworks/legacy/core/watcher.js + + The MIT License (MIT) + + Copyright (c) 2013-2014 Yuxi Evan You + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + +This product bundles Guava v20.0, which is available under a "Apache" license. For details, see https://github.com/google/guava/blob/v20.0/COPYING and following files: + android/sdk/src/main/java/org/apache/weex/utils/WXDataStructureUtil.java + +This product bundles json11 v1.0.0, which is available under a "MIT" license. For details, see https://github.com/dropbox/json11/tree/v1.0.0 and following files: + weex_core/Source/third_party/json11/json11.cc + weex_core/Source/third_party/json11/json11.hpp + + /* Copyright (c) 2013 Dropbox, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +This product bundles chromium v66.0.3344.2, which is available under a "BSD-style" license. For details, see https://github.com/chromium/chromium/blob/66.0.3344.2/ and following files: + modp_b64: + The following files are copied from https://github.com/chromium/chromium/tree/master/third_party/modp_b64 and their names are listed below: + weex_core/Source/base/base64/modp_base64/modp_b64_data.h + weex_core/Source/base/base64/modp_base64/modp_b64.cc + weex_core/Source/base/base64/modp_base64/modp_b64.h + + License for above files: + * MODP_B64 - High performance base64 encoder/decoder + * Version 1.3 -- 17-Mar-2006 + * http://modp.com/release/base64 + * + * Copyright (c) 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the modp.com nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ICU: + The following files are copied from https://github.com/chromium/chromium/tree/66.0.3344.2/base/third_party/icu and their names are listed below: + weex_core/Source/base/third_party/icu/icu_utf.h + weex_core/Source/base/third_party/icu/icu_utf.cpp + + License for above files: + /* COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) + * + * Copyright © 1991-2017 Unicode, Inc. All rights reserved. + * Distributed under the Terms of Use in http://www.unicode.org/copyright.html + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of the Unicode data files and any associated documentation + * (the "Data Files") or Unicode software and any associated documentation + * (the "Software") to deal in the Data Files or Software + * without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, and/or sell copies of + * the Data Files or Software, and to permit persons to whom the Data Files + * or Software are furnished to do so, provided that either + * (a) this copyright and permission notice appear with all copies + * of the Data Files or Software, or + * (b) this copyright and permission notice appear in associated + * Documentation. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in these Data Files or Software without prior + * written authorization of the copyright holder. + * + * --------------------- + * + * Third-Party Software Licenses + * + * This section contains third-party software notices and/or additional + * terms for licensed third-party software components included within ICU + * libraries. + * + * 1. ICU License - ICU 1.8.1 to ICU 57.1 + * + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (c) 1995-2016 International Business Machines Corporation and others + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY + * SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + * + * All trademarks and registered trademarks mentioned herein are the + * property of their respective owners. + + Other files: + weex_core/Source/base/android/jniprebuild/jni_generator.py + + The license for this file is below: + # Copyright (c) 2012 The Chromium Authors. All rights reserved. + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +This product bundles Android Open Source Project vandroid-4.2.2_r1, which is available under a "BSD" license. For details, see https://android.googlesource.com/platform/bionic/+/android-4.2.2_r1/libc/README and following files: + weex_core/Source/IPC/futex.h + +This product bundles files from Boost under "Boost Software License". For more details, reference http://www.boost.org/LICENSE_1_0.txt + weex_core/Source/js_runtime/utils/base64.hpp + + // + // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) + // + // Distributed under the Boost Software License, Version 1.0. (See accompanying + // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + // + + +************************************************************************************ +zxing + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +======================================================================== +jai-imageio +======================================================================== + +Copyright (c) 2005 Sun Microsystems, Inc. +Copyright © 2010-2014 University of Manchester +Copyright © 2010-2015 Stian Soiland-Reyes +Copyright © 2015 Peter Hull +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistribution of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +- Redistribution in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +Neither the name of Sun Microsystems, Inc. or the names of +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +This software is provided "AS IS," without a warranty of any +kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND +WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY +EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL +NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF +USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS +DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR +ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, +CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND +REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR +INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +You acknowledge that this software is not designed or intended for +use in the design, construction, operation or maintenance of any +nuclear facility. + + +************************************************************************************ +ijkplayer + +Copyright (c) 2017 Bilibili +Licensed under LGPLv2.1 or later +ijkplayer required features are based on or derives from projects below: + +LGPL + FFmpeg + libVLC + kxmovie + soundtouch +zlib license + SDL +BSD-style license + libyuv +ISC license + libyuv/source/x86inc.asm + +android/ijkplayer-exo is based on or derives from projects below: + +Apache License 2.0 + ExoPlayer + +android/example is based on or derives from projects below: + +GPL + android-ndk-profiler (not included by default) + +ios/IJKMediaDemo is based on or derives from projects below: + +Unknown license + iOS7-BarcodeScanner + +ijkplayer's build scripts are based on or derives from projects below: + + gas-preprocessor + VideoLAN + yixia/FFmpeg-Android + kewlbear/FFmpeg-iOS-build-script + +Commercial Use +ijkplayer is licensed under LGPLv2.1 or later, so itself is free for commercial use under LGPLv2.1 or later + +But ijkplayer is also based on other different projects under various licenses, which I have no idea whether they are compatible to each other or to your product. + +IANAL, you should always ask your lawyer for these stuffs before use it in your product. + + +************************************************************************************ +GCanvas + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + diff --git a/android-offline/readme/readme.md b/android-offline/readme/readme.md new file mode 100644 index 0000000..6457a33 --- /dev/null +++ b/android-offline/readme/readme.md @@ -0,0 +1,99 @@ +**项目集成需要添加msa_mdid_1.0.13.aar文件,以便获取移动智能设备标识公共服务平台提供的匿名设备标识符[OAID](https://www.html5plus.org/doc/zh_cn/device.html#plus.device.getOAID)、开发者匿名设备标识符VAID、及应用匿名设备标识符AAID,可用于解决Android10无法获取设备标识(如IMEI、IMSI、Wi-Fi MAC地址等)的问题** + +## 2.8.1.80296_20200722 +1. 离线sdk不再支持wap2app应用,云打包不受影响。 +2. 离线sdk不再支持JS/NVUE文件原生混淆加密,云打包不受影响。 +3. 新增uniapp-v8-release.aar,调整 JS引擎默认从 jscore 改为 V8,提升运算性能 [详情](https://ask.dcloud.net.cn/article/37465) **注意:uniapp-v8-release.aar与uniapp-release.aar只能同时使用一个,重复会导致编译失败。** + +## 2.7.11.80231_20200602 +1. 新增debug-server-release.aar,生成自定义基座时使用,生成正式包时需删除。 +2. 新增aps-igexin-fcm-release.aar,使用方式可参考[文档](https://nativesupport.dcloud.net.cn/AppDocs/usemodule/androidModuleConfig/push) + +## 2.7.0.80159_20200506 + +1. 自定义组件编译模式下线,应用默认以v3编译模式运行。并在manifest去除相关概念。后续版本dcloud1.dat、dcloud2.dat也不在需要。 + +## 2.6.0.74021_20200224 +1. 新增腾讯X5内核,使用时只需添加webview-x5-release.aar和weex_webview-x5-release.aar即可。 + +## 2.5.4.72919_20200108 +1. 添加uniAd模块,具体配置可参考文件Feature-Android.xls或链接 https://ask.dcloud.net.cn/article/36814 + +## 2.4.6.71983_20191211 +1. 添加amap-gp-libs-release.aar,供上传google play使用,注意:amap-gp-libs-release.aar与amap-libs-release.aar互斥,二者使用时只能选其一。 + +## 2.4.2.71156_20191115 +1. 更新uni-app依赖,去掉bindingX相关依赖。新版依赖如下,可以参考项目实例。 +~~~ + /*uniapp所需库-----------------------开始*/ + implementation 'com.android.support:recyclerview-v7:26.1.0' + implementation 'com.facebook.fresco:fresco:1.13.0' + implementation "com.facebook.fresco:animated-gif:1.13.0" + /*uniapp所需库-----------------------结束*/ +~~~ + +## 2.3.5.70306_20191018 +1. 新增aps-unipush-gp-release.aar和aps-igexin-gp-release.aar,解决个推或UniPush上传谷歌市场失败的问题,注意:谷歌版个推与原个推存在类冲突,若出现冲突,删掉一个即可。 +2. 更新uni-app依赖,去掉okhttp相关依赖。新版依赖如下,可以参考项目实例。 +~~~ + /*uniapp所需库-----------------------开始*/ + implementation 'com.android.support:recyclerview-v7:26.1.0' + implementation 'com.alibaba.android:bindingx-core:1.0.3' + implementation 'com.alibaba.android:bindingx_weex_plugin:1.0.3' + implementation 'com.facebook.fresco:fresco:1.13.0' + implementation "com.facebook.fresco:animated-gif:1.13.0" + /*uniapp所需库-----------------------结束*/ +~~~ +3. 若出现以dc.okio或dc.suqareup.okhttp的类冲突,删除libs目录下dc-okhttp-2.7.5.jar、dc-okhttp-ws-2.7.5.jar、dc-okio-1.6.0.jar即可。 +4. 本版删掉sina-libs-release.aar,集成时只需集成openDefault-4.4.1.aar即可。 +5. google play版个推在原个推配置上需添加如下内容 +~~~ + + +~~~ + +## 1.9.9.69546_20190920 +1. 更新依赖,默认需添加fastjson依赖 +~~~ + implementation 'com.alibaba:fastjson:1.1.46.android' +~~~ +## 1.9.9.67817_20190812 +1. 离线SDK已支持64位处理器,[Android平台配置支持的CPU类型(64位)](http://ask.dcloud.net.cn/article/36195) +2. 添加map、live-pusher、video等component,具体集成方式参考Feature-Android.xls。 +3. 将gif库提取为专门的aar使用,您可以引入android-gif-drawable-release@1.2.17.aar或者引用远程仓库文件。 +4. 鉴于新浪和支付宝SDK升级缘故,对应所需库也发生了变化,详情见Feature-Android.xls。 + +## 1.9.9.67034_20190729 +1. barcode改进,相应配置发生变化 +~~~ + +~~~ +2. gallery改进,图片预览更流畅,需集成gallery-dmcBig-release.aar文件(非必须添加),具体显示效果可参考HBuilderX中基座gallery模块。 +3. 录制mp3格式音频需集成audio-mp3aac-release.aar文件(非必须添加)。 +4. 基座添加glide依赖,集成SDK时必须添加。 +5. 集成uni-app时必须添加如下依赖。 +~~~ + implementation 'com.android.support:recyclerview-v7:26.1.0' + implementation 'com.alibaba.android:bindingx-core:1.0.3' + implementation 'com.alibaba.android:bindingx_weex_plugin:1.0.3' + implementation 'com.squareup.okhttp:okhttp:2.3.0' + implementation 'com.squareup.okhttp:okhttp-ws:2.3.0' + implementation 'com.alibaba:fastjson:1.1.46.android' + implementation 'com.facebook.fresco:fresco:1.13.0' + implementation "com.facebook.fresco:animated-gif:1.13.0" +~~~ +6. 新增sqlite模块,配置方式 +~~~ + +~~~ + +7. 自定义组件模式下和集成uni-app时必须添加uniapp-release.aar +8. 新增混淆配置文件,可参考SDK目录下proguard.cfg文件进行配置。 + +本sdk的使用许可,详见HBuilder X使用许可协议 \ No newline at end of file diff --git a/android-offline/splash/splash.png b/android-offline/splash/splash.png new file mode 100644 index 0000000..fd1c43d Binary files /dev/null and b/android-offline/splash/splash.png differ diff --git a/android-offline/splash/璇存槑.txt b/android-offline/splash/璇存槑.txt new file mode 100644 index 0000000..593450a --- /dev/null +++ b/android-offline/splash/璇存槑.txt @@ -0,0 +1,3 @@ +splash.png 已生成(1920x1080 横屏,深蓝渐变 + 包裹箱 + 底部进度条,无文字)。 +如需重新生成或调整设计,编辑 scripts/gen-android-assets.ps1 后运行: + powershell -NoProfile -ExecutionPolicy Bypass -File scripts\gen-android-assets.ps1 diff --git a/config/README.md b/config/README.md new file mode 100644 index 0000000..a812eb1 --- /dev/null +++ b/config/README.md @@ -0,0 +1,43 @@ +# config 目录说明 + +本目录存放打包/发布相关配置。**含密码等敏感信息的一律不提交 git**,配套的 `*.example.json` 模板提交。 + +| 文件 | 说明 | 是否提交 | +|---|---|---| +| `android.json` | Android 离线打包本地配置(appKey、签名密码等) | ❌ | +| `android.example.json` | 上述配置的模板,首次使用复制为 `android.json` | ✅ | + +## android.json 字段 + +| 字段 | 说明 | +|---|---| +| `appId` | uni-app appid。**本项目为 `__UNI__0B3DAD3`,不要与工作台/散单的 `__UNI__900BDC1` 混用** | +| `appKey` | DCloud 离线打包 Key,**按 `appId + packageName + 签名证书 SHA-256` 三者绑定** | +| `appName` | 桌面显示的应用名(构建时写入 `resValue app_name`) | +| `packageName` | Android 包名(`applicationId` 与 gradle `namespace` 都由它决定,发布后不可更改) | +| `abis` | CPU 架构。此处与 `src/manifest.json` 的 `abiFilters` 保持一致(`armeabi-v7a`、`arm64-v8a`) | +| `icon` / `splash` | 图标/启动图路径(相对项目根),`prepare.cjs` 会用它们覆盖 `res/` 下的同名资源 | +| `wwwSource` | App 资源目录。留空则依次尝试 `unpackage/resources//www`、`dist/build/app-plus` | +| `runtimeVersion` | 离线 SDK 的 5+ Runtime 版本。`prepare.cjs` 会把 www 内 `manifest.json`/`app-config-service.js` 的 `compilerVersion` 对齐到该值,避免启动时弹「HBuilderX %s 编译 / 手机端 SDK %s」提示 | +| `signing.keystore` | 签名文件路径(相对项目根),放在 `android-offline/keystore/`(该目录 git 不跟踪) | +| `signing.storePassword` / `keyAlias` / `keyPassword` | 签名密码与别名,**自己填写,不要提交** | + +## appKey 务必与三者一致 + +`appKey` 失效的典型表现:APK 能装能开,但启动即白屏并提示「未配置appkey或配置错误」。此时按顺序核对: + +1. `appId` 是否为 `__UNI__0B3DAD3`; +2. `packageName` 是否与申请 Key 时填写的包名一致; +3. 证书 SHA-256 是否与申请 Key 时使用的一致: + ``` + keytool -list -v -keystore android-offline\keystore\<你的证书> -alias <别名> + ``` + 输出里的 `SHA256:` 即为指纹。 + +需要更换包名或证书时,要先去 https://dev.dcloud.net.cn → 应用详情 → Android → 离线打包 Key 管理 重新申请(需填包名与证书 SHA-256)。 + +## 首次使用 + +1. 确认 `config/android.json` 已存在(本仓库已预填非敏感项),填写 `appKey`、`keyAlias`、`storePassword`、`keyPassword`; +2. 确认 `android-offline/keystore/` 下有对应 keystore; +3. 执行 `npm run build:apk`(= 生产编译 + 产物地址校验 + 离线打包)。 diff --git a/config/android.example.json b/config/android.example.json new file mode 100644 index 0000000..60e15c1 --- /dev/null +++ b/config/android.example.json @@ -0,0 +1,17 @@ +{ + "appId": "__UNI__0B3DAD3", + "appKey": "", + "appName": "WMS_PDA", + "packageName": "com.gztbyc.pda_wms", + "abis": ["armeabi-v7a", "arm64-v8a"], + "icon": "android-offline/icon/app-icon.png", + "splash": "android-offline/splash/splash.png", + "wwwSource": "", + "runtimeVersion": "5.24", + "signing": { + "keystore": "android-offline/keystore/xxx.keystore", + "storePassword": "", + "keyAlias": "", + "keyPassword": "" + } +} diff --git a/package.json b/package.json index 32b1f30..0e5174c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus NODE_OPTIONS=\"--openssl-legacy-provider --require=./scripts/node-compat.cjs\" vue-cli-service uni-build --watch", "build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 NODE_OPTIONS=\"--openssl-legacy-provider --require=./scripts/node-compat.cjs\" vue-cli-service uni-build && node scripts/check-build-env.cjs dist/build/h5", "build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus NODE_OPTIONS=\"--openssl-legacy-provider --require=./scripts/node-compat.cjs\" vue-cli-service uni-build && node scripts/check-build-env.cjs dist/build/app-plus", + "build:apk": "node scripts/build-apk.cjs", + "android:pack:raw": "powershell -NoProfile -ExecutionPolicy Bypass -File android-offline/pack.ps1", "check:env": "node scripts/check-build-env.cjs", "lint": "eslint . --fix", "test": "eslint . --fix" diff --git a/scripts/build-apk.cjs b/scripts/build-apk.cjs new file mode 100644 index 0000000..3f4d76f --- /dev/null +++ b/scripts/build-apk.cjs @@ -0,0 +1,63 @@ +/** + * Android APK 一键打包(强制生产编译 + 产物地址校验)。 + * + * 步骤: + * 1. `npm run build:app-plus` —— 生产编译。该命令内部已包含 `scripts/check-build-env.cjs` + * 的产物校验(含内网地址或缺少生产域名会直接失败),因此不会把开发地址打进 APK; + * 2. `android-offline/pack.ps1` —— 注入 App 资源/图标/启动图 + `gradlew assembleRelease`, + * 产物输出到 `release/android/wms-pda_v{版本}_release.apk`。 + * + * 用法: + * npm run build:apk # 前端编译 + 打包 + * npm run build:apk -- -Clean # gradle 全量重编 + * npm run build:apk -- -NoInject # 跳过资源注入(已注入过时用) + * npm run build:apk -- -Timestamp # 产物名带时间戳 + * npm run android:pack:raw # 跳过前端编译,直接用现有 dist/build/app-plus 打包 + * + * 说明: + * - 发布上传(scp + latest.json)在 pack.ps1 内,且只有存在 `config/deploy.json` 时才会执行; + * 本仓库不提供该文件,故默认不会上传。 + * - 版本号唯一来源是根 `package.json` 的 `version`(X.Y.Z),`versionCode` 自动推导为 + * X*1000000 + Y*1000 + Z。 + */ +const { spawnSync } = require('child_process') +const fs = require('fs') +const path = require('path') + +const ROOT = path.resolve(__dirname, '..') +const APP_BUILD_DIR = path.join(ROOT, 'dist', 'build', 'app-plus') + +const log = (...args) => console.log('[build-apk]', ...args) + +function run(cmd, args) { + log(`$ ${cmd} ${args.join(' ')}`) + const res = spawnSync(cmd, args, { + cwd: ROOT, + stdio: 'inherit', + env: process.env, + shell: process.platform === 'win32', + }) + return res.status === 0 +} + +// ---------- step 1: 生产编译(内部含产物地址校验) ---------- +log('step 1/2: build:app-plus(生产编译 + 产物地址校验)...') +if (!run('npm', ['run', 'build:app-plus'])) { + console.error('[build-apk] ✗ build:app-plus 失败,终止') + process.exit(1) +} +if (!fs.existsSync(APP_BUILD_DIR)) { + console.error(`[build-apk] ✗ 未找到 App 构建产物: ${APP_BUILD_DIR}`) + process.exit(1) +} + +// ---------- step 2: 离线打包(参数透传) ---------- +const extraArgs = process.argv.slice(2) +const packArgs = ['run', 'android:pack:raw'] +if (extraArgs.length) packArgs.push('--', ...extraArgs) +log(`step 2/2: android:pack:raw${extraArgs.length ? ' ' + extraArgs.join(' ') : ''} ...`) +if (!run('npm', packArgs)) { + console.error('[build-apk] ✗ android:pack:raw 失败') + process.exit(1) +} +log('✓ 打包完成,APK 见 release/android/')