mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-21 21:01:43 +08:00
Merge branch 'dev' of https://github.com/hyb1996/NoRootScriptDroid into dev
# Conflicts: # .idea/caches/build_file_checksums.ser
This commit is contained in:
commit
de77cd7509
@ -1,6 +1,7 @@
|
||||
package org.autojs.autojs.autojs.build;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.stardust.app.GlobalAppContext;
|
||||
import com.stardust.autojs.apkbuilder.ApkBuilder;
|
||||
@ -8,6 +9,7 @@ import com.stardust.autojs.apkbuilder.ManifestEditor;
|
||||
import com.stardust.autojs.apkbuilder.util.StreamUtils;
|
||||
import com.stardust.autojs.project.ProjectConfig;
|
||||
import com.stardust.pio.PFiles;
|
||||
|
||||
import org.autojs.autojs.App;
|
||||
|
||||
import java.io.File;
|
||||
@ -156,8 +158,10 @@ public class AutoJsApkBuilder extends ApkBuilder {
|
||||
projectConfig.setName(config.appName)
|
||||
.setPackageName(config.packageName)
|
||||
.setVersionCode(config.versionCode)
|
||||
.setVersionName(config.versionName)
|
||||
.setMainScriptFile("main.js");
|
||||
.setVersionName(config.versionName);
|
||||
if (TextUtils.isEmpty(projectConfig.getMainScriptFile())) {
|
||||
projectConfig.setMainScriptFile("main.js");
|
||||
}
|
||||
updateProjectConfigAssets(projectConfig, config.jsPath, config.jsPath);
|
||||
PFiles.write(ProjectConfig.configFileOfDir(config.jsPath), projectConfig.toJson());
|
||||
}
|
||||
@ -173,7 +177,7 @@ public class AutoJsApkBuilder extends ApkBuilder {
|
||||
continue;
|
||||
}
|
||||
String relative = new File(projectDir).toURI().relativize(file.toURI()).getPath();
|
||||
config.getAssets().add(relative);
|
||||
config.addAsset(relative);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import com.google.gson.annotations.SerializedName;
|
||||
import com.stardust.pio.PFiles;
|
||||
import com.stardust.pio.UncheckedIOException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -80,7 +81,6 @@ public class ProjectConfig {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getName() {
|
||||
return mName;
|
||||
}
|
||||
@ -128,11 +128,24 @@ public class ProjectConfig {
|
||||
|
||||
public List<String> getAssets() {
|
||||
if (mAssets == null) {
|
||||
mAssets = new ArrayList<>();
|
||||
mAssets = Collections.emptyList();
|
||||
}
|
||||
return mAssets;
|
||||
}
|
||||
|
||||
public boolean addAsset(String assetRelativePath) {
|
||||
if (mAssets == null) {
|
||||
mAssets = new ArrayList<>();
|
||||
}
|
||||
for (String asset : mAssets) {
|
||||
if (new File(asset).equals(new File(assetRelativePath))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
mAssets.add(assetRelativePath);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setAssets(List<String> assets) {
|
||||
mAssets = assets;
|
||||
}
|
||||
|
||||
15
version.json
15
version.json
@ -1,12 +1,15 @@
|
||||
{
|
||||
"versionCode": 404,
|
||||
"versionName": "4.0.1 Beta",
|
||||
"releaseNotes": "* 全新的文档、界面\n* 更丰富的功能\n期待您的体验~",
|
||||
"downloadUrl": "http://i.autojs.org/autojs/release-4.0.1Beta.apk",
|
||||
"versionCode": 163,
|
||||
"versionName": "2.0.16 Beta2",
|
||||
"releaseNotes": "* 优化root录制,录制脚本接近完美,可自行录制游戏脚本\n* 提高部分脚本的运行速度\n* 新增 按键事件、通知事件监听\n*修复 一些问题",
|
||||
"downloads" : [
|
||||
{
|
||||
"name": "酷安",
|
||||
"url": "https://www.coolapk.com/apk/188448"
|
||||
"name": "应用宝",
|
||||
"url": "http://a.app.qq.com/o/simple.jsp?pkgname=org.autojs.autojs"
|
||||
},
|
||||
{
|
||||
"name": "百度手机助手",
|
||||
"url": "http://shouji.baidu.com/software/22060055.html"
|
||||
}
|
||||
],
|
||||
"oldVersions": [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user