c = PreferenceManager.class.getDeclaredConstructor(Activity.class, int.class);
46 | c.setAccessible(true);
47 | return c.newInstance(activity, firstRequestCode);
48 | } catch (Exception e) {
49 | Log.w(TAG, "Couldn't call constructor PreferenceManager by reflection", e);
50 | }
51 | return null;
52 | }
53 |
54 | /**
55 | * Sets the owning preference fragment
56 | */
57 | static void setFragment(PreferenceManager manager, PreferenceFragment fragment) {
58 | // stub
59 | }
60 |
61 | /**
62 | * Sets the callback to be invoked when a {@link Preference} in the
63 | * hierarchy rooted at this {@link PreferenceManager} is clicked.
64 | *
65 | * @param listener The callback to be invoked.
66 | */
67 | static void setOnPreferenceTreeClickListener(PreferenceManager manager, final OnPreferenceTreeClickListener listener) {
68 | try {
69 | Field onPreferenceTreeClickListener = PreferenceManager.class.getDeclaredField("mOnPreferenceTreeClickListener");
70 | onPreferenceTreeClickListener.setAccessible(true);
71 | if (listener != null) {
72 | Object proxy = Proxy.newProxyInstance(
73 | onPreferenceTreeClickListener.getType().getClassLoader(),
74 | new Class[] { onPreferenceTreeClickListener.getType() },
75 | new InvocationHandler() {
76 | @Override
77 | public Object invoke(Object proxy, Method method, Object[] args) {
78 | if (method.getName().equals("onPreferenceTreeClick")) {
79 | return Boolean.valueOf(listener.onPreferenceTreeClick((PreferenceScreen) args[0], (Preference) args[1]));
80 | } else {
81 | return null;
82 | }
83 | }
84 | });
85 | onPreferenceTreeClickListener.set(manager, proxy);
86 | } else {
87 | onPreferenceTreeClickListener.set(manager, null);
88 | }
89 | } catch (Exception e) {
90 | Log.w(TAG, "Couldn't set PreferenceManager.mOnPreferenceTreeClickListener by reflection", e);
91 | }
92 | }
93 |
94 | /**
95 | * Inflates a preference hierarchy from the preference hierarchies of
96 | * {@link Activity Activities} that match the given {@link Intent}. An
97 | * {@link Activity} defines its preference hierarchy with meta-data using
98 | * the {@link #//METADATA_KEY_PREFERENCES} key.
99 | *
100 | * If a preference hierarchy is given, the new preference hierarchies will
101 | * be merged in.
102 | *
103 | * @param queryIntent The intent to match activities.
104 | * @param rootPreferences Optional existing hierarchy to merge the new
105 | * hierarchies into.
106 | * @return The root hierarchy (if one was not provided, the new hierarchy's
107 | * root).
108 | */
109 | static PreferenceScreen inflateFromIntent(PreferenceManager manager, Intent queryIntent, PreferenceScreen rootPreferences) {
110 | try {
111 | Method m = PreferenceManager.class.getDeclaredMethod("inflateFromIntent", Intent.class, PreferenceScreen.class);
112 | m.setAccessible(true);
113 | PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(manager, queryIntent, rootPreferences);
114 | return prefScreen;
115 | } catch (Exception e) {
116 | Log.w(TAG, "Couldn't call PreferenceManager.inflateFromIntent by reflection", e);
117 | }
118 | return null;
119 | }
120 |
121 | /**
122 | * Inflates a preference hierarchy from XML. If a preference hierarchy is
123 | * given, the new preference hierarchies will be merged in.
124 | *
125 | * @param context The context of the resource.
126 | * @param resId The resource ID of the XML to inflate.
127 | * @param rootPreferences Optional existing hierarchy to merge the new
128 | * hierarchies into.
129 | * @return The root hierarchy (if one was not provided, the new hierarchy's
130 | * root).
131 | * @hide
132 | */
133 | static PreferenceScreen inflateFromResource(PreferenceManager manager, Activity context, int resId, PreferenceScreen rootPreferences) {
134 | try {
135 | Method m = PreferenceManager.class.getDeclaredMethod("inflateFromResource", Context.class, int.class, PreferenceScreen.class);
136 | m.setAccessible(true);
137 | PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(manager, context, resId, rootPreferences);
138 | return prefScreen;
139 | } catch (Exception e) {
140 | Log.w(TAG, "Couldn't call PreferenceManager.inflateFromResource by reflection", e);
141 | }
142 | return null;
143 | }
144 |
145 | /**
146 | * Returns the root of the preference hierarchy managed by this class.
147 | *
148 | * @return The {@link PreferenceScreen} object that is at the root of the hierarchy.
149 | */
150 | static PreferenceScreen getPreferenceScreen(PreferenceManager manager) {
151 | try {
152 | Method m = PreferenceManager.class.getDeclaredMethod("getPreferenceScreen");
153 | m.setAccessible(true);
154 | return (PreferenceScreen) m.invoke(manager);
155 | } catch (Exception e) {
156 | Log.w(TAG, "Couldn't call PreferenceManager.getPreferenceScreen by reflection", e);
157 | }
158 | return null;
159 | }
160 |
161 | /**
162 | * Called by the {@link PreferenceManager} to dispatch a subactivity result.
163 | */
164 | static void dispatchActivityResult(PreferenceManager manager, int requestCode, int resultCode, Intent data) {
165 | try {
166 | Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityResult", int.class, int.class, Intent.class);
167 | m.setAccessible(true);
168 | m.invoke(manager, requestCode, resultCode, data);
169 | } catch (Exception e) {
170 | Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityResult by reflection", e);
171 | }
172 | }
173 |
174 | /**
175 | * Called by the {@link PreferenceManager} to dispatch the activity stop
176 | * event.
177 | */
178 | static void dispatchActivityStop(PreferenceManager manager) {
179 | try {
180 | Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityStop");
181 | m.setAccessible(true);
182 | m.invoke(manager);
183 | } catch (Exception e) {
184 | Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityStop by reflection", e);
185 | }
186 | }
187 |
188 | /**
189 | * Called by the {@link PreferenceManager} to dispatch the activity destroy
190 | * event.
191 | */
192 | static void dispatchActivityDestroy(PreferenceManager manager) {
193 | try {
194 | Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityDestroy");
195 | m.setAccessible(true);
196 | m.invoke(manager);
197 | } catch (Exception e) {
198 | Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityDestroy by reflection", e);
199 | }
200 | }
201 |
202 | /**
203 | * Sets the root of the preference hierarchy.
204 | *
205 | * @param screen The root {@link PreferenceScreen} of the preference hierarchy.
206 | * @return Whether the {@link PreferenceScreen} given is different than the previous.
207 | */
208 | static boolean setPreferences(PreferenceManager manager, PreferenceScreen screen) {
209 | try {
210 | Method m = PreferenceManager.class.getDeclaredMethod("setPreferences", PreferenceScreen.class);
211 | m.setAccessible(true);
212 | return ((Boolean) m.invoke(manager, screen));
213 | } catch (Exception e) {
214 | Log.w(TAG, "Couldn't call PreferenceManager.setPreferences by reflection", e);
215 | }
216 | return false;
217 | }
218 | }
219 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
70 |
72 |
74 |
75 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
28 |
29 |
30 |
31 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/preference_list_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
25 |
26 |
39 |
40 |
46 |
47 |
52 |
53 |
60 |
65 |
66 |
73 |
74 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/sport.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weiyitai/SportAccelerator/80be2530a12571338a5b7af9b5fe5a15681ed0f2/app/src/main/res/mipmap-xxxhdpi/sport.png
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - 应用
5 | - 设置
6 |
7 |
8 |
9 | - edit
10 | - sensor
11 | - off
12 |
13 |
14 |
15 | - 直接修改步数
16 | - 传感器加速
17 | - 停用
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #009789
4 | #009789
5 | #FF4081
6 | #FFF
7 | #99FFFFFF
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 | 10dp
4 | 0dp
5 |
6 | 16dp
7 | 16sp
8 | 20sp
9 | 22sp
10 |
11 | 0x02000000
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 运动加速器
3 | Settings
4 | 安卓手机运动加速器
5 | 步数上限
6 | 加速倍率
7 | 删除支付宝运动记录
8 | 删除支付宝运动数据记录
9 | 20L
10 | 应用
11 | 设置
12 |
13 |
14 |
15 | Back
16 | Next
17 |
18 |
19 | Skip
20 | 传感器日志
21 | 配置日志
22 | 反馈
23 | 关于
24 | 支付宝
25 | QQ
26 |
27 | com.eg.android.AlipayGphone
28 | com.tencent.mobileqq
29 | 已启用加速
30 | 已关闭加速
31 | 尝试停止应用
32 | 直接修改运动数据
33 |
34 | 支付宝进行运动数据的上传会有一定的间隔,所以不是你每次打开进入运动界面都会看到最新的运动数据,需要等一会......\n
35 | 如果看到的不是理想的运动数据,请过几分钟再进入或关闭应用再重新打开
36 | 修改配置参数会在该应用下次启动时才生效,若应用正在运行,可点击尝试停止应用
37 |
38 | 1.关于重启手机后功能失效的问题,是因为部分7.0手机在重启后会将SharedPreferences文件的权限重置为私有,Xposed读不到配置,只需要打开本App一次即可,App会将配置文件改为全局可读\n
39 | 2.启用加速功能需要把相应的app打开,或者让app在后台运行,并且你处于行走/运动状态,或者你拿着手机在手上晃动让app计步
40 |
41 | 尝试停止支付宝
42 | 打开会将传感器的数据写入到日志中\n\n
43 | 若不需查看加速记录可关闭,\n建议关闭,避免不必要的性能损耗
44 |
45 | 应用打开的时候将读取到的配置记录到日志文件,若所有功能正常可关闭
46 | 请我喝杯茶
47 | 直接修改
48 | 直接修改运动数据
49 | 每次启动App时需要增加的步数
50 | 直接修改支付宝运动数据
51 | 建议
52 | 建议每次增加的步数尽量调小,尽量不要超过10000,否则增加步数太快可能会导致被检测为异常
53 | 当前模式
54 | 直接修改
55 | 关于直接修改步数
56 |
57 | 1.直接修改步数是在App启动的时候去修改支付宝保存在本地的运动记录,从而达到修改运动步数的目的\n
58 | 2.建议每次增加的步数尽量调小,尽量不要超过10000,否则增加步数太快可能会被检测为异常,导致修改失败\n
59 | 3.支付宝进行运动数据的上传会有一定的间隔,启动App的时候距离上次启动时间过短,数据可能不会上传\n
60 | 4.修改上限为步数上限,超过步数上限,今天不会再修改
61 |
62 | 关于传感器加速
63 | 支付宝启动的时候会启动一个进程检测传感器数据,通过钩住系统Api dispatchSensorEvent,
64 | 在应用监测到传感器运动数据之前进行数据的修改,让应用接收到修改过的传感器数据,从而达到加速的目的,
65 | 该方式不会影响手机或应用的其他功能
66 |
67 | 记录配置文件以及步数的读取情况
68 | 记录传感器数据记录,日志较多,若无需查看,建议关闭
69 | 传感器加速
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/app_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/config_alipay.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
14 |
20 |
21 |
28 |
29 |
30 |
36 |
37 |
41 |
42 |
46 |
47 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/config_qq.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
17 |
18 |
24 |
25 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/setting_preference.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
17 |
18 |
21 |
22 |
25 |
26 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.0.0'
11 |
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
29 |
30 | ext {
31 | compileSdkVersion = 25
32 | buildToolsVersion = '26.0.2'
33 | supportLibVersion = "25.3.1"
34 | minSdkVersion = 21
35 | targetSdkVersion = 25
36 | versionCode = 1
37 | versionName = 'sportaccelerator 1.0'
38 | }
39 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weiyitai/SportAccelerator/80be2530a12571338a5b7af9b5fe5a15681ed0f2/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Nov 05 22:10:12 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------