diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..166e74b --- /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 3e7324d..607b52b 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 eaa0376..653512e 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 0000000..7499ca6 --- /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 0000000..360e395 --- /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 0000000..a3625c5 --- /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 0000000..a0a5d35 --- /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 0000000..d62df9d --- /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 0000000..63e4e4f --- /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 0000000..0224079 --- /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 0000000..392c6c9 --- /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 0000000..7045739 --- /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 0000000..f077b47 --- /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 0000000..c1611f3 --- /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 bb642a4..5298ee9 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 d4d5085..1c0a251 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 1487c58..2a6d33c 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 ef540af..de18cb4 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 1d7e0ae..ba03f78 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 d94b425..f39ea40 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