feat(android): 画布双指捏合缩放/平移 + release 正式签名
- 手势重构:画布由 onPan 迁移到 onScale 回调统一分发——单指沿用拖拽编辑(平移相位/改时长/平移画布),双指以捏合焦点为锚点缩放(0.25–4.0)+ 平移;控制器新增 setViewTransform - 正式签名:android/key/release.jks(alias=sequence,30 年有效期),android/key.properties 提供参数(gitignore),缺失时回退 debug 签名;更新安装无需卸载重装 - 重新构建并归档 signed release:release/sequence_diagram_tablet_v1.0.1_release.apk(CN=Sequence Diagram Studio, O=sincos.cc)
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
}
|
||||
|
||||
// 正式签名配置:android/key.properties(不入库)提供密钥信息;
|
||||
// 缺失时回退 debug 签名,保证无密钥环境也能构建。
|
||||
val keystoreProperties = Properties()
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "cc.sincos.sequence_diagram"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
@@ -29,11 +40,25 @@ android {
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = rootProject.file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
// 有 key.properties 时使用正式签名;否则回退 debug 签名。
|
||||
signingConfig = if (keystorePropertiesFile.exists()) {
|
||||
signingConfigs.getByName("release")
|
||||
} else {
|
||||
signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user