mirror of
https://github.com/HighCapable/YukiHookAPI-ProjectBuilder.git
synced 2025-09-07 19:14:09 +08:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
c99d886e70
|
|||
2c0fb88f7d
|
|||
ff71fad415
|
|||
4299a1d04c
|
|||
f95c89f9e4
|
|||
2291639b52
|
|||
fbe50ef494
|
@@ -1,7 +1,7 @@
|
||||
# YukiHookAPI Project Builder
|
||||
|
||||

|
||||

|
||||

|
||||
[](https://t.me/YukiHookAPI)
|
||||
<br/><br/>
|
||||
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/icon.png?raw=true" width = "100" height = "100"/>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# YukiHookAPI Project Builder
|
||||
|
||||

|
||||

|
||||

|
||||
[](https://t.me/YukiHookAPI)
|
||||
<br/><br/>
|
||||
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/icon.png?raw=true" width = "100" height = "100"/>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "yukihookapi-projectbuilder",
|
||||
"productName": "YukiHookAPI Project Builder",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"description": "A Xposed Project Builder by YukiHookAPI",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
Binary file not shown.
@@ -407,13 +407,23 @@ const build = {
|
||||
*/
|
||||
complete: (msg) => {
|
||||
dialogs.packagingProgress.close();
|
||||
|
||||
/** 显示保存为模版对话框 */
|
||||
function showSaveToTemplate() {
|
||||
mdui.confirm(locale.i18n.doYouWantSaveConfigTemplateTip, locale.i18n.notice, () => {
|
||||
build.unlockStatus();
|
||||
configTemplate.createNew();
|
||||
}, () => {
|
||||
build.unlockStatus();
|
||||
page.reload();
|
||||
}, {confirmText: locale.i18n.ok, cancelText: locale.i18n.cancel, modal: true, closeOnEsc: false});
|
||||
}
|
||||
|
||||
mdui.confirm(msg, locale.i18n.buildComplete, () => {
|
||||
ipcRenderer.send('open-complete-project');
|
||||
build.unlockStatus();
|
||||
page.reload();
|
||||
showSaveToTemplate();
|
||||
}, () => {
|
||||
build.unlockStatus();
|
||||
page.reload();
|
||||
showSaveToTemplate();
|
||||
}, {confirmText: locale.i18n.openProject, cancelText: locale.i18n.done, modal: true, closeOnEsc: false});
|
||||
},
|
||||
/**
|
||||
@@ -448,10 +458,10 @@ const projectDepends = {
|
||||
/** 依赖 API 获取地址 */
|
||||
urls: {
|
||||
gradlePaper: 'https://services.gradle.org/distributions',
|
||||
androidGradlePlugin: 'https://developer.android.google.cn/studio/releases/gradle-plugin.html',
|
||||
androidGradlePlugin: 'https://dl.google.com/dl/android/maven2/com/android/application/com.android.application.gradle.plugin/maven-metadata.xml',
|
||||
kotlin: 'https://api.github.com/repos/JetBrains/kotlin/releases',
|
||||
kotlinKsp: 'https://api.github.com/repos/google/ksp/releases',
|
||||
yukiHookApi: 'https://s01.oss.sonatype.org/content/repositories/releases/com/highcapable/yukihookapi/api'
|
||||
yukiHookApi: 'https://api.github.com/repos/fankes/YukiHookAPI/releases'
|
||||
},
|
||||
/** 搜索项目依赖 */
|
||||
search() {
|
||||
@@ -515,21 +525,13 @@ const projectDepends = {
|
||||
findAgpVersion: () => {
|
||||
httpClient.requestDepends('Android Gradle Plugin', projectDepends.urls.androidGradlePlugin, (body) => {
|
||||
dependenciesConfigs.androidGradlePluginVersions = [];
|
||||
$(body).find('h2').each((_, element) => {
|
||||
if (valUtils.startsWithNumber(element.innerText))
|
||||
if (element.innerText.indexOf('(') > 0)
|
||||
dependenciesConfigs.androidGradlePluginVersions.push(element.innerText.split('(')[0].trim());
|
||||
else dependenciesConfigs.androidGradlePluginVersions.push(element.innerText.split('(')[0].trim());
|
||||
});
|
||||
$(body).find('.android-updates-box b').each((_, element) => {
|
||||
if (valUtils.startsWithNumber(element.innerText))
|
||||
if (element.innerText.indexOf('(') > 0)
|
||||
dependenciesConfigs.androidGradlePluginVersions.push(element.innerText.split('(')[0].trim());
|
||||
else dependenciesConfigs.androidGradlePluginVersions.push(element.innerText.split('(')[0].trim());
|
||||
});
|
||||
dependenciesConfigs.androidGradlePluginVersions.sort((a, b) => {
|
||||
return b.localeCompare(a);
|
||||
});
|
||||
const versionsNode = body.getElementsByTagName('version');
|
||||
let versions = [];
|
||||
for (let i = versionsNode.length - 1; i >= 0; i--) {
|
||||
const version = versionsNode[i].innerHTML;
|
||||
if (version.indexOf('-alpha') < 0 && version.indexOf('-beta') < 0 && version.indexOf('-rc') < 0) versions.push(version);
|
||||
}
|
||||
dependenciesConfigs.androidGradlePluginVersions = versions;
|
||||
if (dependenciesConfigs.androidGradlePluginVersions.length > 0)
|
||||
projectDepends.findKotlinVersion();
|
||||
else projectDepends.failure('Android Gradle Plugin', false);
|
||||
@@ -571,16 +573,8 @@ const projectDepends = {
|
||||
findYukiHookApiVersion: () => {
|
||||
httpClient.requestDepends('YukiHookAPI', projectDepends.urls.yukiHookApi, (body) => {
|
||||
dependenciesConfigs.yukiHookApiVersions = [];
|
||||
$(body).find('td').each((_, element) => {
|
||||
if (element.innerText.endsWith('/') && element.innerText.indexOf('fix') < 0)
|
||||
dependenciesConfigs.yukiHookApiVersions.push(element.innerText.replace('/', '').trim());
|
||||
});
|
||||
if (dependenciesConfigs.yukiHookApiVersions.length > 0) {
|
||||
dependenciesConfigs.yukiHookApiVersions.sort((a, b) => {
|
||||
return b.localeCompare(a);
|
||||
});
|
||||
const latestVersion = dependenciesConfigs.yukiHookApiVersions[0];
|
||||
dependenciesConfigs.yukiHookApiVersions = [];
|
||||
const latestVersion = body.length > 0 ? body[0]['tag_name'] : '';
|
||||
if (latestVersion !== '') {
|
||||
dependenciesConfigs.yukiHookApiVersions.push(latestVersion);
|
||||
projectDepends.loaded();
|
||||
} else projectDepends.failure('YukiHookAPI', false);
|
||||
|
@@ -185,6 +185,7 @@ const locale = {
|
||||
"areYouSureRestoreChangeTip": "Are you sure you want to reset all current configs?",
|
||||
"areYouSureClearAllTemplateTip": "Are you sure you want to clear all config template?",
|
||||
"doYouWantLoadConfigTemplateTip": "Do you want to load \"{%1}\"? The current config will be overwritten by the template.",
|
||||
"doYouWantSaveConfigTemplateTip": "Do you need to save the current config as a template for next use? Clicking \"Cancel\" will clear the current config and start creating a new project.",
|
||||
"ruleCheckFailTip": "Rules retrieval failed, please try again.",
|
||||
"networkErrorTip": "A network error occurred, please try again.",
|
||||
"aboutTip": "Helps you quickly create an Xposed project template using YukiHookAPI.",
|
||||
@@ -318,6 +319,7 @@ const locale = {
|
||||
"areYouSureRestoreChangeTip": "还原当前所做的全部更改吗?",
|
||||
"areYouSureClearAllTemplateTip": "清空全部已保存的配置模板吗?",
|
||||
"doYouWantLoadConfigTemplateTip": "要加载 \"{%1}\" 吗?当前配置会被模板覆盖。",
|
||||
"doYouWantSaveConfigTemplateTip": "你需要保存当前配置为模版以供下次使用吗?点击“取消”将清空当前配置并开始创建新项目。",
|
||||
"ruleCheckFailTip": "规则检索失败,请再试一次。",
|
||||
"networkErrorTip": "网络发生错误,请再试一次。",
|
||||
"aboutTip": "帮助你快速创建一个使用 YukiHookAPI 打造的 Xposed 项目模板。",
|
||||
@@ -451,6 +453,7 @@ const locale = {
|
||||
"areYouSureRestoreChangeTip": "現在のすべての変更を元に戻しますか",
|
||||
"areYouSureClearAllTemplateTip": "保存されているすべての構成テンプレートをクリアしますか",
|
||||
"doYouWantLoadConfigTemplateTip": "「{%1}」をロードしますか?現在の構成はテンプレートによって上書きされます。",
|
||||
"doYouWantSaveConfigTemplateTip": "次回使用するために現在の構成をテンプレートとして保存する必要がありますか? 「キャンセル」をクリックすると、現在の構成がクリアされ、新しいプロジェクトの作成が開始されます。",
|
||||
"ruleCheckFailTip": "ルールの取得に失敗しました。もう一度やり直してください。",
|
||||
"networkErrorTip": "ネットワークエラーが発生しました。もう一度やり直してください。",
|
||||
"aboutTip": "YukiHookAPIを使用してXposedプロジェクトテンプレートをすばやく作成するのに役立ちます。",
|
||||
|
@@ -150,7 +150,7 @@ const transaction = {
|
||||
type: 'implementation',
|
||||
groupId: 'androidx.core',
|
||||
artifactId: 'core-ktx',
|
||||
version: '1.10.0'
|
||||
version: '1.10.1'
|
||||
},
|
||||
appcompat: {
|
||||
type: 'implementation',
|
||||
@@ -162,7 +162,7 @@ const transaction = {
|
||||
type: 'implementation',
|
||||
groupId: 'com.google.android.material',
|
||||
artifactId: 'material',
|
||||
version: '1.8.0'
|
||||
version: '1.9.0'
|
||||
},
|
||||
constraintlayout: {
|
||||
type: 'implementation',
|
||||
|
Reference in New Issue
Block a user