Compare commits
8 Commits
appbase-v1
...
appbase-v1
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f12a5de4f | |||
| 7ab399e520 | |||
| dd2d9f3e55 | |||
| 098516d4d7 | |||
| b1fab5ce46 | |||
| e68098aa10 | |||
| d673ba46a1 | |||
| 6c8867e15c |
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Apr 06 20:39:30 HKT 2026
|
||||
stageCount=18
|
||||
#Sat Apr 25 04:11:46 HKT 2026
|
||||
stageCount=20
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.15
|
||||
publishVersion=15.15.17
|
||||
publishVersion=15.15.19
|
||||
buildCount=0
|
||||
baseBetaVersion=15.15.18
|
||||
baseBetaVersion=15.15.20
|
||||
|
||||
@@ -43,7 +43,7 @@ public class AboutActivity extends Activity {
|
||||
LogUtils.d(TAG, "genDefaultAppInfo() 调用");
|
||||
String branchName = "appbase";
|
||||
APPInfo appInfo = new APPInfo();
|
||||
appInfo.setAppName(getString(R.string.app_name));
|
||||
appInfo.setAppName("APPBase");
|
||||
appInfo.setAppIcon(R.drawable.ic_winboll);
|
||||
appInfo.setAppDescription(getString(R.string.app_description));
|
||||
appInfo.setAppGitName("WinBoLL");
|
||||
|
||||
44
build.gradle
44
build.gradle
@@ -1,6 +1,15 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||
maven { url 'https://dl.bintray.com/ppartisan/maven/' }
|
||||
maven { url "https://clojars.org/repo/" }
|
||||
maven { url "https://jitpack.io" }
|
||||
mavenCentral()
|
||||
google()
|
||||
|
||||
mavenLocal {
|
||||
// 设置本地Maven仓库路径
|
||||
url 'file:///sdcard/.m2/repository/'
|
||||
@@ -11,19 +20,6 @@ buildscript {
|
||||
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
|
||||
// "WinBoLL Snapshot"
|
||||
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
|
||||
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||
maven { url 'https://dl.bintray.com/ppartisan/maven/' }
|
||||
maven { url "https://clojars.org/repo/" }
|
||||
maven { url "https://jitpack.io" }
|
||||
mavenCentral()
|
||||
google()
|
||||
//println "mavenLocal : ==========="
|
||||
//println mavenLocal().url
|
||||
//println "mavenLocal : ==========="
|
||||
//mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
// 适配MIUI12
|
||||
@@ -35,6 +31,15 @@ buildscript {
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||
maven { url 'https://dl.bintray.com/ppartisan/maven/' }
|
||||
maven { url "https://clojars.org/repo/" }
|
||||
maven { url "https://jitpack.io" }
|
||||
mavenCentral()
|
||||
google()
|
||||
|
||||
mavenLocal {
|
||||
// 设置本地Maven仓库路径
|
||||
url 'file:///sdcard/.m2/repository/'
|
||||
@@ -45,19 +50,6 @@ allprojects {
|
||||
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
|
||||
// "WinBoLL Snapshot"
|
||||
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
|
||||
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||
maven { url 'https://dl.bintray.com/ppartisan/maven/' }
|
||||
maven { url "https://clojars.org/repo/" }
|
||||
maven { url "https://jitpack.io" }
|
||||
mavenCentral()
|
||||
google()
|
||||
//println "mavenLocal : ==========="
|
||||
//println mavenLocal().url
|
||||
//println "mavenLocal : ==========="
|
||||
//mavenLocal()
|
||||
}
|
||||
ext {
|
||||
// 定义全局变量,常用于版本管理
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Apr 06 20:39:30 HKT 2026
|
||||
stageCount=18
|
||||
#Sat Apr 25 04:11:46 HKT 2026
|
||||
stageCount=20
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.15
|
||||
publishVersion=15.15.17
|
||||
publishVersion=15.15.19
|
||||
buildCount=0
|
||||
baseBetaVersion=15.15.18
|
||||
baseBetaVersion=15.15.20
|
||||
|
||||
@@ -31,18 +31,18 @@ public class APPValidationDialog extends Dialog {
|
||||
private TextView tvAuthResult;
|
||||
|
||||
// ===================================== 业务入参属性 =====================================
|
||||
private String projectName;
|
||||
private String appName;
|
||||
private String versionName;
|
||||
private String clientSign;
|
||||
private String clientHash;
|
||||
|
||||
// ===================================== 构造方法 =====================================
|
||||
public APPValidationDialog(Context context, String projectName, String versionName) {
|
||||
public APPValidationDialog(Context context, String appName, String versionName) {
|
||||
super(context, R.style.DialogStyle);
|
||||
this.mContext = context;
|
||||
this.projectName = projectName;
|
||||
this.appName = appName;
|
||||
this.versionName = versionName;
|
||||
LogUtils.d(TAG, "AppValidationDialog: 构造方法初始化,入参-> projectName=" + projectName + ", versionName=" + versionName);
|
||||
LogUtils.d(TAG, "AppValidationDialog: 构造方法初始化,入参-> projectName=" + appName + ", versionName=" + versionName);
|
||||
}
|
||||
|
||||
// ===================================== 生命周期方法 =====================================
|
||||
@@ -104,7 +104,7 @@ public class APPValidationDialog extends Dialog {
|
||||
// 调用网络校验接口
|
||||
new APPUtils().checkAPKValidation(
|
||||
mContext,
|
||||
projectName,
|
||||
appName,
|
||||
versionName,
|
||||
clientSign,
|
||||
clientHash,
|
||||
|
||||
@@ -49,10 +49,10 @@ public class APPUtils {
|
||||
* @param clientHash 外部计算的APK SHA256哈希字符串(小写16进制)
|
||||
* @param callback 校验结果回调(主线程调用,返回是否合法+提示信息)
|
||||
*/
|
||||
public void checkAPKValidation(Context context, String projectName, String versionName,
|
||||
public void checkAPKValidation(Context context, String appName, String versionName,
|
||||
String clientSign, String clientHash, final CheckResultCallback callback) {
|
||||
// 方法调用+全量入参调试日志
|
||||
LogUtils.d(TAG, "checkAPKValidation: 方法调用,入参-> projectName=" + projectName
|
||||
LogUtils.d(TAG, "checkAPKValidation: 方法调用,入参-> appName=" + appName
|
||||
+ ", versionName=" + versionName + ", clientSign=" + clientSign + ", clientHash=" + clientHash);
|
||||
|
||||
// 1. 核心入参空值校验(快速失败)
|
||||
@@ -61,7 +61,7 @@ public class APPUtils {
|
||||
callCallbackOnMainThread(callback, false, "上下文对象不能为空");
|
||||
return;
|
||||
}
|
||||
if (isStringEmpty(projectName)) {
|
||||
if (isStringEmpty(appName)) {
|
||||
LogUtils.w(TAG, "checkAPKValidation: 入参projectName为空/空白,直接返回校验失败");
|
||||
callCallbackOnMainThread(callback, false, "项目名称不能为空");
|
||||
return;
|
||||
@@ -85,7 +85,7 @@ public class APPUtils {
|
||||
|
||||
// 2. 动态参数URL编码(避免特殊字符导致请求解析异常)
|
||||
LogUtils.d(TAG, "checkAPKValidation: 开始对动态参数进行UTF-8 URL编码");
|
||||
String encodeProjectName = urlEncode(projectName);
|
||||
String encodeProjectName = urlEncode(appName);
|
||||
String encodeVersionName = urlEncode(versionName);
|
||||
String encodeClientSign = urlEncode(clientSign);
|
||||
String encodeClientHash = urlEncode(clientHash);
|
||||
|
||||
@@ -93,14 +93,14 @@ public class AboutView extends LinearLayout {
|
||||
initViewFromXml();
|
||||
}
|
||||
|
||||
public AboutView(Context context, APPInfo appInfo) {
|
||||
super(context);
|
||||
LogUtils.d(TAG, "AboutView(Context,APPInfo):传入应用信息,appName=" + (appInfo == null ? "null" : appInfo.getAppName()));
|
||||
this.mContext = context;
|
||||
this.mAPPInfo = appInfo;
|
||||
initViewFromXml();
|
||||
initAll();
|
||||
}
|
||||
// public AboutView(Context context, APPInfo appInfo) {
|
||||
// super(context);
|
||||
// LogUtils.d(TAG, "AboutView(Context,APPInfo):传入应用信息,appName=" + (appInfo == null ? "null" : appInfo.getAppName()));
|
||||
// this.mContext = context;
|
||||
// this.mAPPInfo = appInfo;
|
||||
// initViewFromXml();
|
||||
// initAll();
|
||||
// }
|
||||
|
||||
public AboutView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
@@ -142,13 +142,13 @@ public class AboutView extends LinearLayout {
|
||||
* 重置应用信息并重新初始化页面,支持动态更新关于页内容
|
||||
* @param appInfo 新的应用信息实体
|
||||
*/
|
||||
public void setAPPInfoAndInit(APPInfo appInfo) {
|
||||
LogUtils.d(TAG, "setAPPInfoAndInit():重置应用信息,appName=" + (appInfo == null ? "null" : appInfo.getAppName()));
|
||||
this.mAPPInfo = appInfo;
|
||||
if (llFunctionContainer != null) llFunctionContainer.removeAllViews();
|
||||
initAll();
|
||||
LogUtils.d(TAG, "setAPPInfoAndInit():应用信息重置+页面重构完成");
|
||||
}
|
||||
// public void setAPPInfoAndInit(APPInfo appInfo) {
|
||||
// LogUtils.d(TAG, "setAPPInfoAndInit():重置应用信息,appName=" + (appInfo == null ? "null" : appInfo.getAppName()));
|
||||
// this.mAPPInfo = appInfo;
|
||||
// if (llFunctionContainer != null) llFunctionContainer.removeAllViews();
|
||||
// initAll();
|
||||
// LogUtils.d(TAG, "setAPPInfoAndInit():应用信息重置+页面重构完成");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 设置应用信息,兼容旧调用逻辑,设置后自动重构页面
|
||||
@@ -333,7 +333,7 @@ public class AboutView extends LinearLayout {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
LogUtils.d(TAG, "ibSigngetDialog onClick:唤起应用正版校验弹窗");
|
||||
new APPValidationDialog(mContext, mszAppGitName, mszAppVersionName).show();
|
||||
new APPValidationDialog(mContext, mszAppName, mszAppVersionName).show();
|
||||
}
|
||||
});
|
||||
// 调试地址配置弹窗
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Mar 16 19:52:21 GMT 2026
|
||||
#Wed Apr 08 17:37:24 GMT 2026
|
||||
stageCount=26
|
||||
libraryProject=
|
||||
baseVersion=15.11
|
||||
publishVersion=15.11.25
|
||||
buildCount=29
|
||||
buildCount=30
|
||||
baseBetaVersion=15.11.26
|
||||
|
||||
Reference in New Issue
Block a user