)
* `优化` 代码编辑器导入 Java 类和包名时支持智能判断插入位置
* `优化` images 模块支持直接使用路径作为图像参数
* `优化` importPackage 支持字符串参数
* `优化` 服务端模式 IP 地址支持剪切板导入智能识别且支持空格按键智能转换
* `优化` 文件管理器新建文件时支持默认前缀选择并自动生成合适的数字后缀
* `优化` 文件管理器运行项目时具体化异常消息提示 _[`issue #268`](http://issues.autojs6.com/268)_
* `优化` 文件管理器支持更多类型并支持显示对应的图标符号 (支持 800 多种文件类型)
* `优化` 文件管理器可编辑的文件类型 (jpg/doc/pdf...) 增加编辑按钮
* `优化` 文件管理器 APK 文件支持查看基础信息, Manifest 信息及权限列表
* `优化` 文件管理器音视频等媒体文件支持查看基础信息及 MediaInfo 信息
* `优化` 打包单文件时支持自动填入合适的标准化名包并支持无效字符过滤提示
* `优化` 打包单文件时支持根据已安装同包名应用自动设置图标并自增版本号及版本名称
* `优化` 打包项目配置文件支持 abis/libs 选项指定默认包含的 ABI 架构及扩展库
* `优化` 打包项目配置文件 abis/libs 选项无效或无可用时支持相关消息提示
* `优化` LeakCanary 在正式发行版本中被排除以避免增加不必要性
* `优化` 项目源代码所有英文注释增加简体中文翻译以增强注释可读性
* `优化` README 及 CHANGELOG 支持多语言 (由脚本自动生成)
* `优化` Gradle 构建脚本提升版本自适应能力
* `优化` 部分依赖或本地库版本调整 _[`CHANGELOG.md`](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG.md#v660)_
##### 更多版本历史可参阅
* [CHANGELOG.md](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/CHANGELOG-zh-Hans.md)
******
### 项目编译构建
******
如需对 AutoJs6 开源项目进行调试或开发, 可使用 [Android Studio](https://pro.autojs.org/) ([Google](https://www.google.com/) 公司产品) 或 [IntelliJ IDEA](https://www.jetbrains.com/idea/) ([Jetbrains](https://www.jetbrains.com/) 公司产品).
本小节以 Android Studio 为例介绍 AutoJs6 开源项目的编译构建方法, IntelliJ IDEA 与之类似.
#### Android Studio 准备
下载 `Android Studio Meerkat | 2024.3.1 Patch 1` 版本 (按需选择其一):
- [android-studio-2024.3.1.14-windows.exe](https://redirector.gvt1.com/edgedl/android/studio/install/2024.3.1.14/android-studio-2024.3.1.14-windows.exe) (1.22 GB)
- [android-studio-2024.3.1.14-windows.zip](https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2024.3.1.14/android-studio-2024.3.1.14-windows.zip) (1.23 GB)
> 注: 上述版本发布时间为 2025 年 3 月 24 日. 如需下载其他版本, 或上述链接已失效, 可访问 [Android Studio 发行版本归档](https://developer.android.com/studio/archive?hl=en) 页面.
安装或解压上述文件, 运行 Android Studio 软件 (如 `"D:\android-studio\bin\studio64.exe"`).
#### Android SDK 准备
> 注: 如果计算机系统已安装 Android SDK (安卓软件开发工具包), 则可跳过此小节内容.
在 Android Studio 软件中使用快捷键 `CTRL + ALT + S` 打开设置页面:
```text
Appearance & Behavior (外观与表现) ->
System Settings (系统设置) ->
Android SDK (安卓软件开发工具包)
```
`Android SDK Location (安卓软件开发工具包位置)` 处如果是空白内容, 可点击右侧 `Edit (编辑)` 按钮, 在弹出的窗口中多次点击 `Next (下一步)`.
> 注: 过程中可能需要同意一个或多个相关协议才能继续.
待相关资源下载并安装完毕, 点击 `Finish (完成)` 按钮.
上述 `Android SDK Location (安卓软件开发工具包位置)` 处将自动完成路径填写, SDK 准备工作随即完成.
#### Android SDK Tools 准备
AutoJs6 需要使用部分 SDK 工具 (如 NDK 及 CMake).
> 注: 如果计算机系统已安装 AutoJs6 全部所需的 Android SDK Tools, 则可跳过此小节内容.
在 Android Studio 软件中使用快捷键 `CTRL + ALT + S` 打开设置页面:
```text
Appearance & Behavior (外观与表现) ->
System Settings (系统设置) ->
Android SDK (安卓软件开发工具包) ->
SDK Tools (SDK 工具) (位于右侧窗口)
```
勾选 `Show Package Details (显示包详情)`, 依次点击 NDK 及 CMake, 确保相应版本的工具已勾选, SDK 工具的版本信息位于 AutoJs6 项目根目录的 `version.properties` 文件中.
#### JDK 准备
AutoJs6 项目依赖的 `JDK (Java 开发工具包)` 发行版本不低于 `17`, 但建议不低于 `19`.
截至 2025 年 4 月 13 日, AutoJs6 可支持 JDK 最高版本为 `24`.
> 注: 如果计算机系统已安装 JDK 且版本满足上述要求, 则可跳过此小节内容.
JDK 可使用 IDE 直接下载, 或访问 [Oracle 网站](https://www.oracle.com/java/technologies/downloads/) 下载.
在 Android Studio 软件中使用快捷键 `CTRL + ALT + S` 打开设置页面:
```text
Build, Execution, Deployment (构建, 执行, 开发) ->
Build Tools (构建工具) ->
Gradle
```
`Gradle JDK` 处可选择或添加不同版本的 JDK.
如果列表中已存在合适版本的 JDK (>= `17`), 则直接选择即可.
否则可以选择 `Download JDK (下载 JDK)` 下载合适的 JDK, 点击 `Download (下载)` 按钮并等待下载完成.
也可以选择 `Add JDK (添加 JDK)` 添加已存在的本地 JDK, 定位其目录并完成 JDK 添加.
#### AutoJs6 资源克隆
在 Android Studio 主页面点击 `Get from VCS (从版本控制系统获取)` 按钮.
`URL (统一资源定位地址)` 处填入 `https://github.com/SuperMonster003/AutoJs6.git`,
`Directory (目录)` 处可根据需要修改为特定路径.
点击 `Clone (克隆)` 按钮, 等待 AutoJs6 项目资源在设备本地完成克隆.
> 注: 上述过程可能需要安装 [Git (分布式版本控制系统)](https://git-scm.com/download).
#### AutoJs6 项目构建
克隆完成后, Android Studio 将打开 AutoJs6 的项目窗口, 并自动完成初步的 `Dependencies (依赖)` 下载及 Gradle 构建工作.
> 注: 上述过程可能非常耗时. 若网络条件欠佳, 可能需要重试多次 (点击 Retry 按钮).
如果构建未能自动进行, 或需要再次构建项目, 可执行以下步骤:
- 在 `Toolbar (工具栏)` 中, 从 `Run/Debug Configurations (运行/调试配置)` 菜单中选择 `app`, 这是 AutoJs6 的主应用
- 点击左侧的 `Build Project (构建项目)` 按钮 (形如铁锤) 开始构建项目, 默认快捷键为 CTRL + F9
- 等待构建完成, `Builder Output (构建输出)` 标签页将出现类似 "BUILD SUCCESSFUL in 1h 17m 34s" 的消息
如果构建失败, 可将异常消息反馈到 AutoJs6 项目的 [议题 (Issues)](http://issues.autojs6.com) 页面.
> 注: 关于如何构建并运行应用的更多内容, 可参阅 [Android Docs](https://developer.android.com/studio/run?hl=zh-cn)
#### AutoJs6 项目部署 (运行 App)
项目构建成功后, 可将项目作为应用程序 (简称 App) 部署到实体设备 (如手机/平板电脑) 或虚拟设备 (如 Android 模拟器) 中.
- 在 `Toolbar (工具栏)` 中, 从 `Run/Debug Configurations (运行/调试配置)` 菜单中选择 `app`, 这是 AutoJs6 的主应用
- 在右侧 `Available Devices (可用设备)` 菜单中, 选择需要运行项目 App 的设备 (实体设备或虚拟设备)
- 点击右侧的 `Run (运行)` 按钮 (形如三角形) 开始运行项目, 默认快捷键为 `F10`
- 等待部署完成, 指定设备将自动安装并运行项目 App
#### AutoJs6 项目部署 (生成 APK)
打包项目并生成可安装到安卓设备的 APK 文件:
- 调试版 (Debug Version)
- `Build (构建)` -> `Build Bundle(s) / APK(s)` -> `Build APK(s)`
- 生成带默认签名的调试版安装包
- 路径示例: `"D:\AutoJs6\app\build\outputs\apk\debug\"`
- 发布版 (Release Version)
- `Build (构建)` -> `Generate Signed Bundle / APK`
- 选择 `APK` 选项
- 准备好签名文件 (新建或选取), 生成已签名的发布版安装包
- 路径示例: `"D:\AutoJs6\app\release\"`
> 注: 关于如何构建应用以向用户发布的更多内容, 可参阅 [Android Docs](https://developer.android.com/build/build-for-release?hl=zh-cn)
#### AutoJs6 预置 Gradle 构建任务
除了构建项目 App 之外, AutoJs6 还支持一些预置的 Gradle 构建任务, 这些任务可以帮助开发者完成与项目相关的便捷操作.
在 `Toolbar (工具栏)` 的 `Run/Debug Configurations (运行/调试配置)` 菜单中, 可看到各个 Gradle 预置任务, 每个任务左侧均显示带小象图标的任务标识.
- AutoJs6 [inrt:assemble]
组装 "inrt" 构建变体, 主要服务于 AutoJs6 脚本打包功能.
AutoJs6 项目拥有不同的构建变体, 其中 "inrt" 变体用于实现 AutoJs6 的脚本打包功能, 生成打包功能依赖的模板文件 "template.apk".
使用打包功能时可能会出现以下异常消息:
> java.io.FileNotFoundException: template.apk
这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App.
> 这表明模板文件不存在, 需要手动运行一次 `inrt:assemble` 任务, 生成模板文件, 然后再次构建并部署 App
- AutoJs6 [app:bundle]
打包 debug 版本编译过程产物, 主要服务于 [AutoJs6 声明文件](http://dts-project.autojs6.com) 项目.
任务运行后生成一个 AutoJs6 项目最新的 JAR 文件, 利用 [Android d.ts Generator](https://github.com/NativeScript/android-dts-generator) (by [NativeScript](https://github.com/NativeScript)) 工具可生成 AutoJs6 主应用的声明文件 (d.ts 格式).
- AutoJs6 [app:digest]
附加摘要信息到 release 版本编译产生的 APK 文件, 主要服务于 AutoJs6 发布最新版本到 GitHub 前确定最终的文件名.
以下为附加摘要信息前后的文件名对比:
```text
前:
autojs6-v6.6.2-arm64-v8a.apk
后:
autojs6-v6.6.2-arm64-v8a-0f2a9d74.apk
```
> 参阅: [Android Docs](https://developer.android.com/studio/run?hl=zh-cn)
******
### 脚本开发辅助
******
开发 AutoJs6 可运行的脚本, 需使用合适的开发工具:
- [VSCode](https://code.visualstudio.com/download) / [WebStorm](https://www.jetbrains.com/webstorm/download/) / [HBuilderX](https://www.dcloud.io/hbuilderx.html) ...
如需在 PC 上进行脚本编写与调试, VSCode 插件可以实现 PC 与手机的互联:
- [AutoJs6-VSCode-Extension](http://vscext-project.autojs6.com) - AutoJs6 调试器 (VSCode 平台插件)
使用开发工具编写代码时, 代码智能补全功能可以更好地辅助开发者完成代码编写:
- [AutoJs6-TypeScript-Declarations](http://dts-project.autojs6.com) - AutoJs6 声明文件 (代码智能补全)
编写代码时, AutoJs6 相关 API 及使用方式, 可随时查阅应用文档:
- [AutoJs6-Documentation](http://docs-project.autojs6.com) - AutoJs6 应用文档
现有的脚本开发项目可作为参考, 激发个人脚本项目的创作灵感:
- [Ant-Forest](https://github.com/TonyJiangWJ/Ant-Forest) - 蚂蚁森林能量自动收取脚本 by [TonyJiangWJ](https://github.com/TonyJiangWJ)
- [Ant-Forest](https://github.com/SuperMonster003/Ant-Forest) - 蚂蚁森林能量自动收取脚本 by [SuperMonster003](https://github.com/SuperMonster003)
- [autojs](https://github.com/e1399579/autojs) - Auto.js 实用脚本 by [e1399579](https://github.com/e1399579)
- [autojsDemo](https://github.com/snailuncle/autojsDemo) - Auto.js 演示示例 by [snailuncle](https://github.com/snailuncle)
- [autojs 相关仓库](https://github.com/topics/autojs) - GitHub 与 autojs 话题相关的全部仓库
******
### 贡献参与
******
感谢每一位参与 AutoJs6 项目开发的贡献人员.
| 贡献人员 | 提交数 | 最近提交 |
|:-------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------:|
| [luckyloogn](https://github.com/luckyloogn) | [3](https://github.com/SuperMonster003/AutoJs6/commits?author=luckyloogn) | `2025/01/01` |
| [kvii](https://github.com/kvii) | [1](https://github.com/SuperMonster003/AutoJs6/commits?author=kvii) | `2024/10/16` |
| [chenguangming](https://github.com/chenguangming) `(Tom)` | [2](https://github.com/SuperMonster003/AutoJs6/pulls?q=is%3Apr+author%3Achenguangming) | `2024/05/14` |
| [LZX284](https://github.com/LZX284) `(AI)` | [17](https://github.com/SuperMonster003/AutoJs6/commits?author=LZX284) | `2023/11/19` |
| [TonyJiangWJ](https://github.com/TonyJiangWJ) | [4](https://github.com/SuperMonster003/AutoJs6/commits?author=TonyJiangWJ) | `2023/10/31` |
| [little‑alei](https://github.com/little-alei) `(抠脚本人)` | [12](https://github.com/SuperMonster003/AutoJs6/commits?author=little-alei) | `2023/07/12` |
| [aiselp](https://github.com/aiselp) | [6](https://github.com/SuperMonster003/AutoJs6/pulls?q=is%3Apr+author%3Aaiselp) | `2023/06/14` |
| [LYS86](https://github.com/LYS86) `(Lin)` | [2](https://github.com/SuperMonster003/AutoJs6/commits?author=LYS86) | `2023/06/03` |
数据更新于 2025 年 1 月 1 日.
数据条目按 `最近提交` 降序排序.
新发起的暂未处理的 Pull Request, 将在合并处理后加入数据统计.
部分贡献人员在 [GitHub Contributors](https://github.com/SuperMonster003/AutoJs6/graphs/contributors) 未能正常出现, 其提交记录为空, 仍可通过 [Pull Request](https://github.com/SuperMonster003/AutoJs6/pulls) 查看贡献记录.
[//]: # (
# --------------------------------------------------------------#
# Before committing and pushing to the remote GitHub repository #
# --------------------------------------------------------------#
- CHANGELOG.md
- Update entries for AutoJs6 by checking all changed files
- Update entries for Gradle plugins [ implementation ]
- Update version name and released date
- Append related GitHub issues to changelog entries
- README.md
- The summary of the latest changelog for committing to Git [ DO NOT commit or push ]
- Update badges like [ android studio / rhino / ... ]
- Update android studio download links and version names
- Update contribution section
- Remove the part like [ alpha / beta / ... ] of VERSION_NAME in version.properties
- Update dependencies TypeScript declarations if needed.
- Re-generate documentation/markdown by running the python script
- Check the two-way versions for AutoJs6 and VSCode ext, then publish the ext to Microsoft
- Run Gradle task "app:assembleInrtRelease"
- Build APK to determine the final VERSION_BUILD field
- Run Gradle task "app:appendDigestToReleasedFiles"
- Commit and push to GitHub
- Publish the latest release with signed APKs
)