XuqmGroup
eb27e8f112
feat(sdk-license): client-side package name validation
...
Package name matching is now done entirely in the SDK before any network call:
- License file flow (tryAutoInitialize): compare licenseFile.packageName with
context.packageName; refuse initialization if mismatch
- appKey-only flow (checkLicense): fetch GET /api/license/app-info and compare
configured package names locally before register/verify
- LicenseConfig: add fromLicenseFile flag to distinguish the two flows
- LicenseModels: add AppInfoResponse with matchesPackageName helper
- LicenseApiService: add getAppInfo() endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 00:30:00 +08:00
XuqmGroup
63da94c670
sdk: auto-init from license file, cross-module init waiting
...
- XuqmSDK: autoInitialize() validates license package name; afterInit() callback
- LicenseSDK: await XuqmSDK init via reflection with timeout before operations
- UpdateSDK: await XuqmSDK init before checkAppUpdate
- LicenseFileReader: return Triple(appKey, serverUrl, packageName)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 17:56:42 +08:00
XuqmGroup
7b18d279bf
build: 各 SDK 模块独立版本,publish.gradle 改用 project.version
...
每个模块通过 SDK_<NAME>_VERSION 属性指定自己的版本,
未设置时回退到全局 PUBLISH_VERSION,保持向后兼容。
发布单个模块示例:
./gradlew :sdk-license:publish -PSDK_LICENSE_VERSION=1.0.3 -PPUBLISH_VERSION=1.0.2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 16:48:10 +08:00
XuqmGroup
9fd358deef
fix(sdk-license): HTTP 错误不回退缓存,防止已吊销设备认证通过
...
verify 返回 false 后 SDK 会尝试 register,服务端对已吊销设备返回 403。
原 catch 块将 HttpException 与网络错误同等处理,导致 cachedStatus=="ok"
时依然返回 Success。修复:HttpException(4xx/5xx)直接写入 DENIED,
只有真正的网络错误(IOException/超时)才允许离线缓存回退。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 16:41:47 +08:00
XuqmGroup
63797ea1cb
feat(sdk-license): LicenseInitializerProvider 自动完成全量 SDK 初始化
...
ContentProvider 在 Application.onCreate() 之前运行,读取
assets/xuqm/license.xuqm 后直接调用 XuqmSDK.initialize()。
app 端只需放入 license 文件,无需任何初始化代码。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 15:31:52 +08:00
XuqmGroup
84eeecb4cc
feat(sdk): 新增 autoInitialize(),放入 license 文件即可完成全量 SDK 初始化
...
- LicenseFile 新增 serverUrl 字段(私有化部署时由后端写入)
- LicenseSDK 新增 readLicenseFileData() 供 sdk-core 反射调用
- XuqmSDK.autoInitialize(context) 从 assets/xuqm/license.xuqm 读取
appKey 和 serverUrl,一行完成公/私有化 SDK 初始化
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 15:25:22 +08:00
XuqmGroup
e81bf89697
Use appKey in license SDK requests
2026-05-15 21:42:27 +08:00
XuqmGroup
2577d6e3e2
Add license check user info
2026-05-15 21:29:58 +08:00
XuqmGroup
8cf7ebb317
Use auth domain for license SDK
2026-05-15 21:09:32 +08:00
XuqmGroup
cbc8ed56cd
Add Android license SDK
2026-05-15 21:00:24 +08:00