Skip to content

Commit ec61eb5

Browse files
6.0.2 - 新增images.bilateralFilter() 修复toast多次调用/客户端及服务端模式开关/安卓7无法使用UI模式 部分插件及工具版本更新
1 parent 3ce51e4 commit ec61eb5

File tree

40 files changed

+999
-843
lines changed

40 files changed

+999
-843
lines changed

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
### 简介
2727

2828
* Android 平台支持无障碍服务的 JavaScript 自动化工具
29+
* 需要 [Android 7.0](https://zh.wikipedia.org/wiki/Android_Nougat) (`API 24`) 及以上
2930
* 复刻 (Fork) 自 [hyb1996/Auto.js](https://github.com/hyb1996/Auto.js)
3031

3132
******
@@ -53,15 +54,18 @@
5354
* 支持将脚本文件或项目打包为 APK 文件
5455
* 支持利用 Root 权限扩展功能 (屏幕点击/滑动/录制/Shell)
5556
* 支持作为 Tasker 插件使用
56-
* 支持与 VSCode 连接并进行桌面开发 (需要 [AutoJs6-VSCode-Ext](https://github.com/SuperMonster003/AutoJs6-VSCode-Ext) 插件)
57+
* 支持与 VSCode 连接并进行桌面开发 (需要 [AutoJs6-VSCode-Extension](https://github.com/SuperMonster003/AutoJs6-VSCode-Extension) 插件)
5758

5859
******
5960

6061
### 主要变更
6162

6263
******
6364

64-
* Rhino 引擎由 [v1.7.7.2](https://github.com/mozilla/rhino/releases/tag/Rhino1_7_7_2_Release) 升级至 [v1.7.14 (SNAPSHOT)](https://github.com/mozilla/rhino/)
65+
* VSCode 插件支持客户端 (LAN) 及服务端 (LAN/ADB) 连接方式
66+
67+
68+
* Rhino 引擎由 [v1.7.7.2](https://github.com/mozilla/rhino/releases/tag/Rhino1_7_7_2_Release) 升级至 [v1.7.14](https://github.com/mozilla/rhino/)
6569

6670
* 支持 [Object.values()](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/values)
6771

@@ -99,6 +103,25 @@
99103

100104
[comment]: <> "Version history only shows last 3 versions"
101105

106+
# v6.0.2
107+
108+
###### 2022/02/05
109+
110+
* `新增` images.bilateralFilter() 双边滤波图像处理方法
111+
* `修复` 多次调用 toast 只生效最后一次调用的问题
112+
* `修复` toast.dismiss() 可能无效的问题
113+
* `修复` 客户端模式及服务端模式开关可能无法正常工作的问题
114+
* `修复` 客户端模式及服务端模式开关状态不能正常刷新的问题
115+
* `修复` Android 7 解析 UI 模式 text 元素异常 (Ref to TonyJiangWJ) _[`issue #4`](https://github.com/SuperMonster003/AutoJs6/issues/4)_
116+
* `优化` 忽略 sleep() 的 ScriptInterruptedException 异常
117+
* `优化` 附加 Androidx AppCompat (Legacy) 版本 1.0.2
118+
* `优化` 升级 Androidx AppCompat 版本 1.4.0 -> 1.4.1
119+
* `优化` 升级 Androidx Preference 版本 1.1.1 -> 1.2.0
120+
* `优化` 升级 Okhttp3 版本 3.10.0 -> 5.0.0-alpha.3 -> 5.0.0-alpha.4
121+
* `优化` 升级 Android Material 版本 1.6.0-alpha01 -> 1.6.0-alpha02
122+
* `优化` 升级 Android Gradle 插件版本 7.2.0-alpha06 -> 7.2.0-beta01
123+
* `优化` 升级 Gradle 发行版本 7.3.3 -> 7.4-rc-2
124+
102125
# v6.0.1
103126

104127
###### 2022/01/01
@@ -190,11 +213,11 @@
190213

191214
******
192215

193-
* [AutoJs6-VSCode-Ext](https://github.com/SuperMonster003/AutoJs6-VSCode-Ext) { author: [SuperMonster003](https://github.com/SuperMonster003) }
216+
* [AutoJs6-VSCode-Extension](https://github.com/SuperMonster003/AutoJs6-VSCode-Extension) { author: [SuperMonster003](https://github.com/SuperMonster003) }
194217
- `适用于 VSCode 的桌面开发插件 (二次开发项目)`
195218

196219
* [AutoX](https://github.com/kkevsekk1/AutoX) { author: [kkevsekk1](https://github.com/kkevsekk1) }
197220
- `安卓平台 JavaScript 自动化工具 (二次开发项目)`
198221

199-
[//]: # (* [Auto.js-TypeScript-Declarations]&#40;https://github.com/SuperMonster003/Auto.js-TypeScript-Declarations&#41; { author: [SuperMonster003]&#40;https://github.com/SuperMonster003&#41; })
200-
[//]: # ( - `Auto.js 声明文件 &#40;.d.ts&#41;`)
222+
[comment]: <> (* [Auto.js-TypeScript-Declarations]&#40;https://github.com/SuperMonster003/Auto.js-TypeScript-Declarations&#41; { author: [SuperMonster003]&#40;https://github.com/SuperMonster003&#41; })
223+
[comment]: <> ( - `Auto.js 声明文件 &#40;.d.ts&#41;`)

app/build.gradle

Lines changed: 68 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
plugins {
2-
id "com.android.application"
3-
id "com.jakewharton.butterknife"
4-
id "kotlin-android"
5-
id "kotlin-kapt"
2+
id 'com.android.application'
3+
id 'com.jakewharton.butterknife'
4+
id 'kotlin-android'
5+
id 'kotlin-kapt'
66
}
77

8-
def annotationsVer = "4.8.0"
9-
def butterKnifeVer = "10.2.3"
10-
def leakcanaryVer = "2.7"
11-
128
def properties = new Properties()
13-
def propFile = new File("sign.properties")
9+
def propFile = new File('sign.properties')
1410
def isPropFileExists = propFile.exists()
1511

1612
isPropFileExists && properties.load(new FileInputStream(propFile))
@@ -22,32 +18,32 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
2218
}
2319

2420
// tasks.withType(JavaCompile) {
25-
// options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
21+
// options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
2622
// }
2723

2824
android {
2925
signingConfigs {
3026
isPropFileExists && release {
31-
storeFile file(properties["storeFile"])
32-
keyPassword properties["keyPassword"]
33-
keyAlias properties["keyAlias"]
34-
storePassword properties["storePassword"]
27+
storeFile file(properties['storeFile'])
28+
keyPassword properties['keyPassword']
29+
keyAlias properties['keyAlias']
30+
storePassword properties['storePassword']
3531
}
3632
}
37-
compileSdkVersion versions.compile
33+
compileSdkVersion versions.project.compile
3834
defaultConfig {
39-
applicationId "org.autojs.autojs"
40-
minSdkVersion versions.mini
41-
targetSdkVersion versions.target
42-
versionCode versions.appVersionCode
43-
versionName versions.appVersionName
44-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
35+
applicationId 'org.autojs.autojs'
36+
minSdkVersion versions.project.mini
37+
targetSdkVersion versions.project.target
38+
versionCode versions.project.appVersionCode
39+
versionName versions.project.appVersionName
40+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
4541
multiDexEnabled true
4642
javaCompileOptions {
4743
annotationProcessorOptions {
4844
arguments = [
49-
"resourcePackageName": applicationId,
50-
"androidManifestFile": "$projectDir/src/main/AndroidManifest.xml".toString()
45+
'resourcePackageName': applicationId,
46+
'androidManifestFile': "$projectDir/src/main/AndroidManifest.xml".toString()
5147
]
5248
}
5349
}
@@ -56,7 +52,7 @@ android {
5652
debug {
5753
shrinkResources false
5854
minifyEnabled false
59-
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
55+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
6056
if (isPropFileExists) {
6157
signingConfig signingConfigs.release
6258
}
@@ -68,7 +64,7 @@ android {
6864
release {
6965
shrinkResources false
7066
minifyEnabled false
71-
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
67+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
7268
if (isPropFileExists) {
7369
signingConfig signingConfigs.release
7470
}
@@ -77,17 +73,17 @@ android {
7773
compileOptions {
7874
sourceCompatibility JavaVersion.VERSION_16
7975
targetCompatibility JavaVersion.VERSION_16
80-
encoding = "utf-8"
76+
encoding = 'utf-8'
8177
}
8278
lintOptions {
8379
abortOnError false
84-
disable "MissingTranslation"
85-
disable "ExtraTranslation"
80+
disable 'MissingTranslation'
81+
disable 'ExtraTranslation'
8682
}
8783
configurations.all {
88-
resolutionStrategy.force "com.google.code.findbugs:jsr305:3.0.1"
84+
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
8985
}
90-
flavorDimensions "channel"
86+
flavorDimensions 'channel'
9187
splits {
9288
// Configures multiple APKs based on ABI.
9389
abi {
@@ -101,22 +97,22 @@ android {
10197
reset()
10298

10399
// Specifies a list of ABIs that Gradle should create APKs for.
104-
include "armeabi-v7a"
100+
include 'x86', 'armeabi-v7a'
105101

106102
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
107103
universalApk false
108104
}
109105
}
110106
productFlavors {
111107
common {
112-
buildConfigField "String", "CHANNEL", "\"common\""
113-
buildConfigField "String", "APP_SINCE_DATE", "\"${versions.appSinceDate}\""
108+
buildConfigField 'String', 'CHANNEL', '"common"'
109+
buildConfigField 'String', 'APP_SINCE_DATE', "\"${versions.project.appSinceDate}\""
114110
}
115111
}
116112
applicationVariants.all { variant ->
117113
variant.mergeAssetsProvider.configure {
118114
doLast {
119-
delete(fileTree(dir: outputDir, includes: ["declarations/**"]))
115+
delete(fileTree(dir: outputDir, includes: ['declarations/**']))
120116
}
121117
}
122118
}
@@ -128,103 +124,94 @@ repositories {
128124

129125
dependencies {
130126
// JUnit
131-
testImplementation "junit:junit:${junitVer}"
127+
testImplementation "junit:junit:${versions.junit}"
132128

133129
// LeakCanary
134-
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakcanaryVer}"
130+
debugImplementation "com.squareup.leakcanary:leakcanary-android:${versions.leakcanary}"
135131

136132
// Kotlin
137-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0-native-mt"
133+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0-native-mt'
138134

139135
// Android Annotations
140-
kapt "org.androidannotations:androidannotations:${annotationsVer}"
141-
implementation "org.androidannotations:androidannotations-api:${annotationsVer}"
136+
kapt "org.androidannotations:androidannotations:${versions.annotations}"
137+
implementation "org.androidannotations:androidannotations-api:${versions.annotations}"
142138

143139
// ButterKnife
144-
kapt "com.jakewharton:butterknife-compiler:${butterKnifeVer}"
145-
implementation "com.jakewharton:butterknife:${butterKnifeVer}"
140+
kapt "com.jakewharton:butterknife-compiler:${versions.butterKnife}"
141+
implementation "com.jakewharton:butterknife:${versions.butterKnife}"
146142

147143
// Android supports
148-
implementation "androidx.appcompat:appcompat:1.4.0"
149-
implementation "androidx.cardview:cardview:1.0.0"
150-
implementation "com.google.android.material:material:1.6.0-alpha01"
151-
implementation "androidx.multidex:multidex:2.0.1"
152-
153-
// Material Dialogs
154-
implementation "com.afollestad.material-dialogs:core:0.9.6.0"
144+
implementation 'androidx.cardview:cardview:1.0.0'
145+
implementation 'androidx.multidex:multidex:2.0.1'
155146

156147
// SwipeRefreshLayout
157-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
148+
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
158149

159150
// Common Markdown
160-
implementation "com.github.atlassian:commonmark-java:commonmark-parent-0.9.0"
151+
implementation 'com.github.atlassian:commonmark-java:commonmark-parent-0.9.0'
161152

162153
// Android issue reporter (a github issue reporter)
163-
implementation "com.heinrichreimersoftware:android-issue-reporter:1.3.1"
154+
implementation 'com.heinrichreimersoftware:android-issue-reporter:1.3.1'
164155

165156
// MultiLevelListView
166-
implementation "com.github.hyb1996:android-multi-level-listview:1.1"
157+
implementation 'com.github.hyb1996:android-multi-level-listview:1.1'
167158

168159
// Licenses Dialog
169-
implementation "de.psdev.licensesdialog:licensesdialog:2.2.0"
160+
implementation 'de.psdev.licensesdialog:licensesdialog:2.2.0'
170161

171162
// Expandable RecyclerView
172-
implementation "com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1"
163+
implementation 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'
173164

174165
// FlexibleDivider
175-
implementation "com.yqritc:recyclerview-flexibledivider:1.4.0"
166+
implementation 'com.yqritc:recyclerview-flexibledivider:1.4.0'
176167

177168
// AVLoadingView
178-
implementation "com.wang.avi:library:2.1.3"
169+
implementation 'com.wang.avi:library:2.1.3'
179170

180171
// Commons Lang
181-
implementation "org.apache.commons:commons-lang3:3.12.0"
172+
implementation 'org.apache.commons:commons-lang3:3.12.0'
182173

183174
// Expandable RecyclerView
184-
implementation "com.thoughtbot:expandablerecyclerview:1.3"
175+
implementation 'com.thoughtbot:expandablerecyclerview:1.3'
185176

186-
implementation "com.github.hyb1996:Auto.js-ApkBuilder:1.0.1"
177+
implementation 'com.github.hyb1996:Auto.js-ApkBuilder:1.0.1'
187178

188179
// RxJava
189-
implementation "io.reactivex.rxjava2:rxjava:2.2.21"
190-
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
180+
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
181+
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
191182

192183
// Retrofit
193-
implementation "com.squareup.retrofit2:retrofit:2.9.0"
194-
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
195-
implementation "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0"
196-
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
184+
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
185+
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
186+
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
187+
implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
197188

198189
// Glide
199-
kapt "com.github.bumptech.glide:compiler:4.12.0"
200-
implementation "com.github.bumptech.glide:glide:4.12.0"
190+
kapt "com.github.bumptech.glide:compiler:${versions.glide}"
201191

202192
// Joda Time
203-
implementation "joda-time:joda-time:2.10.13"
193+
implementation 'joda-time:joda-time:2.10.13'
204194

205195
// Tasker Plugin
206-
implementation "com.twofortyfouram:android-plugin-client-sdk-for-locale:4.0.3"
196+
implementation 'com.twofortyfouram:android-plugin-client-sdk-for-locale:4.0.3'
207197

208198
// Flurry
209-
implementation "com.flurry.android:analytics:13.1.0"
210-
211-
// Material Dialogs
212-
implementation "com.afollestad.material-dialogs:commons:0.9.6.0"
199+
implementation 'com.flurry.android:analytics:13.1.0'
213200

214201
// Android Job
215-
implementation "com.evernote:android-job:1.4.2"
202+
implementation 'com.evernote:android-job:1.4.2'
216203

217204
// Extracted from com.github.hyb1996:MutableTheme:1.0.0
218-
implementation "com.jrummyapps:colorpicker:2.1.7"
219-
implementation "androidx.recyclerview:recyclerview:1.2.1"
220-
implementation "com.github.ozodrukh:CircularReveal:2.0.1"
205+
implementation 'com.jrummyapps:colorpicker:2.1.7'
206+
implementation 'androidx.recyclerview:recyclerview:1.2.1'
207+
implementation 'com.github.ozodrukh:CircularReveal:2.0.1'
221208

222209
// Bugly
223-
implementation project(":libs:com.tencent.bugly.crashreport-2.6.6")
210+
implementation project(':libs:com.tencent.bugly.crashreport-2.6.6')
224211

225-
implementation project(":automator")
226-
implementation project(":common")
227-
implementation project(":autojs")
212+
implementation project(':automator')
213+
implementation project(':common')
214+
implementation project(':autojs')
228215
}
229216

230217
java {

app/src/main/assets/doc/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44

55
******
66

7+
# v6.0.2
8+
9+
###### 2022/02/05
10+
11+
* `新增` images.bilateralFilter() 双边滤波图像处理方法
12+
* `修复` 多次调用 toast 只生效最后一次调用的问题
13+
* `修复` toast.dismiss() 可能无效的问题
14+
* `修复` 客户端模式及服务端模式开关可能无法正常工作的问题
15+
* `修复` 客户端模式及服务端模式开关状态不能正常刷新的问题
16+
* `修复` Android 7 解析 UI 模式 text 元素异常 (Ref to TonyJiangWJ) _[`issue #4`](https://github.com/SuperMonster003/AutoJs6/issues/4)_
17+
* `优化` 忽略 sleep() 的 ScriptInterruptedException 异常
18+
* `优化` 附加 Androidx AppCompat (Legacy) 版本 1.0.2
19+
* `优化` 升级 Androidx AppCompat 版本 1.4.0 -> 1.4.1
20+
* `优化` 升级 Androidx Preference 版本 1.1.1 -> 1.2.0
21+
* `优化` 升级 Okhttp3 版本 3.10.0 -> 5.0.0-alpha.3 -> 5.0.0-alpha.4
22+
* `优化` 升级 Android Material 版本 1.6.0-alpha01 -> 1.6.0-alpha02
23+
* `优化` 升级 Android Gradle 插件版本 7.2.0-alpha06 -> 7.2.0-beta01
24+
* `优化` 升级 Gradle 发行版本 7.3.3 -> 7.4-rc-2
25+
726
# v6.0.1
827

928
###### 2022/01/01

app/src/main/assets/docs/all.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ <h1>综述<span><a class="mark" href="#overview" id="overview">#</a></span></h1>
961961
<li>如果想要在电脑而不是手机上开发Auto.js,可以使用VS Code以及相应的Auto.js插件使得在电脑上编辑的脚本能推送到手机运行,参见<a href="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/hyb1996/Auto.js-VSCode-Extension">Auto.js-VSCode-Extension</a>。</li>
962962
</ul>
963963
<p>本文档的章节大致上是以模块来分的,总体上可以分成&quot;自动操作&quot;类模块(控件操作、触摸模拟、按键模拟等)和其他类模块(设备、应用、界面等)。</p>
964-
<p>&quot;自动操作&quot;的部分又可以大致分为基于控件和基于坐标的操作。基于坐标的操作是传统按键精灵、触摸精灵等脚本软件采用的方式,通过屏幕坐标来点击、长按指定位置模拟操作,从而到达目的。例如<code>click(100, 200)</code>, <code>press(100, 200, 500)</code>等。这种方式在游戏类脚本中比较有可行性,结合找图找色、坐标放缩功能也能达到较好的兼容性。但是,这种方式对一般软件脚本却难以达到想要的效果,而且这种方式需要安卓7.0版本以上或者root权限才能执行。所以对于一般软件脚本(例如批量添加联系人、自动提取短信验证码等等),我们采用基于控件的模拟操作方式,结合通知事情、按键事情等达成更好的工作流。这些部分的文档参见<a href="widgets-based-automation.html">基于控件的操作</a>和<a href="coordinates-based-automation.html">基于坐标的操作</a>。</p>
964+
<p>&quot;自动操作&quot;的部分又可以大致分为基于控件和基于坐标的操作。基于坐标的操作是传统按键精灵、触摸精灵等脚本软件采用的方式,通过屏幕坐标来点击、长按指定位置模拟操作,从而到达目的。例如<code>click(100, 200)</code>, <code>press(100, 200, 500)</code>等。这种方式在游戏类脚本中比较有可行性,结合找图找色、坐标放缩功能也能达到较好的兼容性。但是,这种方式对一般软件脚本却难以达到想要的效果,而且这种方式需要root权限才能执行。所以对于一般软件脚本(例如批量添加联系人、自动提取短信验证码等等),我们采用基于控件的模拟操作方式,结合通知事情、按键事情等达成更好的工作流。这些部分的文档参见<a href="widgets-based-automation.html">基于控件的操作</a>和<a href="coordinates-based-automation.html">基于坐标的操作</a>。</p>
965965
<p>其他部分主要包括:</p>
966966
<ul>
967967
<li>app: 应用。启动应用,卸载应用,使用应用查看、编辑文件、访问网页,发送应用间广播等。</li>

0 commit comments

Comments
 (0)