From bb4340b6e18b22f1a261cd57bd8e6dbd97bad51a Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 7 Dec 2022 13:43:35 +0800 Subject: [PATCH] + support Magisk module update + 4.5.0 --- CHANGELOG.md | 5 +++++ app/build.gradle | 13 ++++++++++--- app/debug.gradle | 9 +-------- app/update-json.gradle | 18 ++++++++++++++++++ release/update_riru_alipay.json | 6 ++++++ release/update_riru_qq.json | 6 ++++++ release/update_riru_taobao.json | 6 ++++++ release/update_riru_unionpay.json | 6 ++++++ release/update_riru_wechat.json | 6 ++++++ release/update_zygisk_alipay.json | 6 ++++++ release/update_zygisk_qq.json | 6 ++++++ release/update_zygisk_taobao.json | 6 ++++++ release/update_zygisk_unionpay.json | 6 ++++++ release/update_zygisk_wechat.json | 6 ++++++ riru/build.sh | 3 +++ riru/src/gradle/alipay.gradle | 5 +++-- riru/src/gradle/qq.gradle | 5 +++-- riru/src/gradle/taobao.gradle | 5 +++-- riru/src/gradle/unionpay.gradle | 5 +++-- riru/src/gradle/wechat.gradle | 5 +++-- 20 files changed, 112 insertions(+), 21 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 app/update-json.gradle create mode 100644 release/update_riru_alipay.json create mode 100644 release/update_riru_qq.json create mode 100644 release/update_riru_taobao.json create mode 100644 release/update_riru_unionpay.json create mode 100644 release/update_riru_wechat.json create mode 100644 release/update_zygisk_alipay.json create mode 100644 release/update_zygisk_qq.json create mode 100644 release/update_zygisk_taobao.json create mode 100644 release/update_zygisk_unionpay.json create mode 100644 release/update_zygisk_wechat.json diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..166e74b0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +### v4.5.0 (2022-12-07) + ++ 适配微信8.0.30(2240)版本 \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 3e7324d9..607b52b2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.surcumference.fingerprintpay" minSdkVersion 14 targetSdkVersion 30 - versionCode 21 - versionName "4.4.1" + versionCode 22 + versionName "4.5.0" buildConfigField "String", "APP_PRODUCT_NAME", "\"FingerprintPay\"" } @@ -51,9 +51,16 @@ android { buildTypes.release.signingConfig signingConfigs.release } } +project.ext.appInfo = [ + Alipay: "com.eg.android.AlipayGphone", + Taobao: "com.taobao.taobao", + QQ: "com.tencent.mobileqq", + WeChat: "com.tencent.mm", + UnionPay: "com.unionpay", +] apply from: 'debug.gradle' - +apply from: 'update-json.gradle' dependencies { implementation 'com.wei.android.lib:fingerprintidentify:1.2.6' implementation 'com.google.code.gson:gson:2.8.6' diff --git a/app/debug.gradle b/app/debug.gradle index eaa03764..653512ee 100644 --- a/app/debug.gradle +++ b/app/debug.gradle @@ -1,12 +1,5 @@ def ADB_PATH = "${android.getSdkDirectory()}/platform-tools/adb" -def appInfo = [ - Alipay: "com.eg.android.AlipayGphone", - Taobao: "com.taobao.taobao", - QQ: "com.tencent.mobileqq", - WeChat: "com.tencent.mm", - UnionPay: "com.unionpay", -] -appInfo.each {entry -> +project.ext.appInfo.each {entry -> def name = entry.key def packageName = entry.value def stopTask = tasks.create(name: "stop$name", type: Exec) { diff --git a/app/update-json.gradle b/app/update-json.gradle new file mode 100644 index 00000000..7499ca6e --- /dev/null +++ b/app/update-json.gradle @@ -0,0 +1,18 @@ +import groovy.json.JsonOutput +project.ext.appInfo.each { entry -> + ['zygisk', 'riru'].each {pluginType -> + def name = entry.key.toLowerCase() + def versionName = android.defaultConfig.versionName + def info = [ + version: "${versionName}", + versionCode: "${android.defaultConfig.versionCode}", + zipUrl: "https://github.com/eritpchy/FingerprintPay/releases/download/$versionName-ci/$pluginType-module-xfingerprint-pay-$name-v$versionName-release.zip", + changelog: "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md", + ] + + def json_str = JsonOutput.toJson(info) + def json_beauty = JsonOutput.prettyPrint(json_str) + File file = rootProject.file("release/update_${pluginType}_${name}.json") + file.write(json_beauty) + } +} \ No newline at end of file diff --git a/release/update_riru_alipay.json b/release/update_riru_alipay.json new file mode 100644 index 00000000..360e395b --- /dev/null +++ b/release/update_riru_alipay.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/riru-module-xfingerprint-pay-alipay-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_riru_qq.json b/release/update_riru_qq.json new file mode 100644 index 00000000..a3625c55 --- /dev/null +++ b/release/update_riru_qq.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/riru-module-xfingerprint-pay-qq-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_riru_taobao.json b/release/update_riru_taobao.json new file mode 100644 index 00000000..a0a5d35c --- /dev/null +++ b/release/update_riru_taobao.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/riru-module-xfingerprint-pay-taobao-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_riru_unionpay.json b/release/update_riru_unionpay.json new file mode 100644 index 00000000..d62df9d9 --- /dev/null +++ b/release/update_riru_unionpay.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/riru-module-xfingerprint-pay-unionpay-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_riru_wechat.json b/release/update_riru_wechat.json new file mode 100644 index 00000000..63e4e4f9 --- /dev/null +++ b/release/update_riru_wechat.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/riru-module-xfingerprint-pay-wechat-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_zygisk_alipay.json b/release/update_zygisk_alipay.json new file mode 100644 index 00000000..02240793 --- /dev/null +++ b/release/update_zygisk_alipay.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/zygisk-module-xfingerprint-pay-alipay-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_zygisk_qq.json b/release/update_zygisk_qq.json new file mode 100644 index 00000000..392c6c97 --- /dev/null +++ b/release/update_zygisk_qq.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/zygisk-module-xfingerprint-pay-qq-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_zygisk_taobao.json b/release/update_zygisk_taobao.json new file mode 100644 index 00000000..70457399 --- /dev/null +++ b/release/update_zygisk_taobao.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/zygisk-module-xfingerprint-pay-taobao-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_zygisk_unionpay.json b/release/update_zygisk_unionpay.json new file mode 100644 index 00000000..f077b47e --- /dev/null +++ b/release/update_zygisk_unionpay.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/zygisk-module-xfingerprint-pay-unionpay-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/release/update_zygisk_wechat.json b/release/update_zygisk_wechat.json new file mode 100644 index 00000000..c1611f33 --- /dev/null +++ b/release/update_zygisk_wechat.json @@ -0,0 +1,6 @@ +{ + "version": "4.5.0", + "versionCode": "22", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.5.0-ci/zygisk-module-xfingerprint-pay-wechat-v4.5.0-release.zip", + "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" +} \ No newline at end of file diff --git a/riru/build.sh b/riru/build.sh index bb642a46..5298ee9e 100755 --- a/riru/build.sh +++ b/riru/build.sh @@ -10,6 +10,9 @@ APP_PRODUCT_TARGET=$(echo "$MODULE_GRALDE_FILE"|sed -E 's/.+\/(.+)\..+/\1/g') MODULE_LIB_NAME="$(echo "$PLUGIN_TYPE_NAME" | tr '[:upper:]' '[:lower:]')-module-xfingerprint-pay-$APP_PRODUCT_TARGET" echo VERSION: $VERSION bash ./reset.sh +echo "updateJson=\${updateJson}" >> $MODULE_TEMPLATE/template/magisk_module/module.prop +perl -i -pe 's/(description: moduleDescription,)/$1 \nupdateJson: moduleUpdateJson,/g' $MODULE_TEMPLATE/module/build.gradle + cp -rfv ./src/cpp/* $MODULE_TEMPLATE/module/src/main/cpp/ cp -rfv "$MODULE_GRALDE_FILE" $MODULE_TEMPLATE/module.gradle cp -rfv "./src/gradle/fingerprint.gradle" $MODULE_TEMPLATE/ diff --git a/riru/src/gradle/alipay.gradle b/riru/src/gradle/alipay.gradle index d4d50859..1c0a2513 100644 --- a/riru/src/gradle/alipay.gradle +++ b/riru/src/gradle/alipay.gradle @@ -21,11 +21,12 @@ ext { the older version, please pay attention. */ magiskModuleId = moduleLibraryName.toString() - - moduleName = "${project.property("PLUGIN_TYPE_NAME").toString().capitalize()} - 指纹支付 - 支付宝" + def pluginTypeName = project.property("PLUGIN_TYPE_NAME").toString() + moduleName = "${pluginTypeName.capitalize()} - 指纹支付 - 支付宝" moduleAuthor = "Jason Eric" moduleDescription = "让支付宝支持指纹支付 Fingerprint pay for Alipay." moduleVersion = "v${project.property("VERSION")}" moduleVersionCode = 3 + moduleUpdateJson = "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/release/update_${pluginTypeName.toLowerCase()}_alipay.json" } apply from: "$rootDir/fingerprint.gradle" \ No newline at end of file diff --git a/riru/src/gradle/qq.gradle b/riru/src/gradle/qq.gradle index 1487c585..2a6d33cb 100644 --- a/riru/src/gradle/qq.gradle +++ b/riru/src/gradle/qq.gradle @@ -21,11 +21,12 @@ ext { the older version, please pay attention. */ magiskModuleId = moduleLibraryName.toString() - - moduleName = "${project.property("PLUGIN_TYPE_NAME").toString().capitalize()} - 指纹支付 - QQ" + def pluginTypeName = project.property("PLUGIN_TYPE_NAME").toString() + moduleName = "${pluginTypeName.capitalize()} - 指纹支付 - QQ" moduleAuthor = "Jason Eric" moduleDescription = "让QQ支持指纹支付 Fingerprint pay for QQ." moduleVersion = "v${project.property("VERSION")}" moduleVersionCode = 3 + moduleUpdateJson = "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/release/update_${pluginTypeName.toLowerCase()}_qq.json" } apply from: "$rootDir/fingerprint.gradle" \ No newline at end of file diff --git a/riru/src/gradle/taobao.gradle b/riru/src/gradle/taobao.gradle index ef540af6..de18cb43 100644 --- a/riru/src/gradle/taobao.gradle +++ b/riru/src/gradle/taobao.gradle @@ -21,11 +21,12 @@ ext { the older version, please pay attention. */ magiskModuleId = moduleLibraryName.toString() - - moduleName = "${project.property("PLUGIN_TYPE_NAME").toString().capitalize()} - 指纹支付 - 淘宝" + def pluginTypeName = project.property("PLUGIN_TYPE_NAME").toString() + moduleName = "${pluginTypeName.capitalize()} - 指纹支付 - 淘宝" moduleAuthor = "Jason Eric" moduleDescription = "让淘宝支持指纹支付 Fingerprint pay for Taobao." moduleVersion = "v${project.property("VERSION")}" moduleVersionCode = 3 + moduleUpdateJson = "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/release/update_${pluginTypeName.toLowerCase()}_taobao.json" } apply from: "$rootDir/fingerprint.gradle" \ No newline at end of file diff --git a/riru/src/gradle/unionpay.gradle b/riru/src/gradle/unionpay.gradle index 1d7e0aed..ba03f781 100644 --- a/riru/src/gradle/unionpay.gradle +++ b/riru/src/gradle/unionpay.gradle @@ -21,11 +21,12 @@ ext { the older version, please pay attention. */ magiskModuleId = moduleLibraryName.toString() - - moduleName = "${project.property("PLUGIN_TYPE_NAME").toString().capitalize()} - 指纹支付 - 云闪付" + def pluginTypeName = project.property("PLUGIN_TYPE_NAME").toString() + moduleName = "${pluginTypeName.capitalize()} - 指纹支付 - 云闪付" moduleAuthor = "Jason Eric" moduleDescription = "让云闪付支持指纹支付 Fingerprint pay for UnionPay." moduleVersion = "v${project.property("VERSION")}" moduleVersionCode = 3 + moduleUpdateJson = "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/release/update_${pluginTypeName.toLowerCase()}_unionpay.json" } apply from: "$rootDir/fingerprint.gradle" \ No newline at end of file diff --git a/riru/src/gradle/wechat.gradle b/riru/src/gradle/wechat.gradle index d94b425b..f39ea40d 100644 --- a/riru/src/gradle/wechat.gradle +++ b/riru/src/gradle/wechat.gradle @@ -21,11 +21,12 @@ ext { the older version, please pay attention. */ magiskModuleId = moduleLibraryName.toString() - - moduleName = "${project.property("PLUGIN_TYPE_NAME").toString().capitalize()} - 指纹支付 - 微信" + def pluginTypeName = project.property("PLUGIN_TYPE_NAME").toString() + moduleName = "${pluginTypeName.capitalize()} - 指纹支付 - 微信" moduleAuthor = "Jason Eric" moduleDescription = "让微信支持指纹支付 Fingerprint pay for WeChat." moduleVersion = "v${project.property("VERSION")}" moduleVersionCode = 3 + moduleUpdateJson = "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/release/update_${pluginTypeName.toLowerCase()}_wechat.json" } apply from: "$rootDir/fingerprint.gradle" \ No newline at end of file