如何使用新上传密钥签署AAB捆绑包(没有密钥密码)
最近,我们必须在Google Play商店(内部轨道)上注册一个新的上传密钥,尽管该设置似乎与以前的方法有所不同,该方法在使用KeyTool上使用键盘上的键时在<<<代码> .jks 格式
我们最初存储corporfile&amp; StorePassword
以及多个键&lt; key&lt; straip&gt; password
在keystore.properties
文件中效果正常,我们的build.gradle.gradle
在我们的产品上循环循环,将每个签名配置分配给风味。
但是,现在,按照Google Play控制台指示在CLI中运行它以生成新证书:
keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
创建了上传密钥,但没有提示输入密钥密码。
因此,现在我想知道如何在运行Gradle Bundle&gt; Release&gt;版本
命令时如何构建该应用程序?
为了更清楚我们当前的设置:
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystorePropertiesFileExists && keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
signingConfigs { }
defaultConfig {
applicationId <application-id>
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
resValue "string", "build_config_package", <application-id>
}
flavorDimensions "default"
productFlavors {
Staging { applicationId "<application-id>.staging" }
RC { applicationId "<application-id>.rc" }
Production {}
}
buildTypes {
debug { signingConfig null }
release {
productFlavors.all { flavor ->
flavor.signingConfig = android.signingConfigs.create("${flavor.name}")
flavor.signingConfig.storeFile = rootProject.file(keystoreProperties["storeFile"])
flavor.signingConfig.storePassword = keystoreProperties["storePassword"]
flavor.signingConfig.keyAlias = keystoreProperties["keyAlias${flavor.name}"]
flavor.signingConfig.keyPassword = keystoreProperties["keyPassword${flavor.name}"]
}
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
debuggable false
}
}
我们还使用Fastlane来处理我们的上传,是否需要对此进行修改的特定命令(我看不到)?
谢谢!
Recently, we had to register a new upload key on our app in the google play store (internal track), though the setup seems a little different from our previous approach that requested a password on the key alias when creating a key using keytool on .jks
format
We originally stored the storeFile & storePassword
along with multiple key<Flavor>Alias & key<Flavor>Password
in a keystore.properties
file which worked fine, and our build.gradle
looped over our product flavors assigning each signing config to the flavor.
Now though, when running this in the CLI as instructed by google play console to generate a new certificate:
keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
the upload key was created, but it did not prompt for a key password.
So now I'm wondering how to build the app without having it signed when running the gradle bundle<Flavour>Release
command?
For more clarity on our current setup:
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystorePropertiesFileExists && keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
signingConfigs { }
defaultConfig {
applicationId <application-id>
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
resValue "string", "build_config_package", <application-id>
}
flavorDimensions "default"
productFlavors {
Staging { applicationId "<application-id>.staging" }
RC { applicationId "<application-id>.rc" }
Production {}
}
buildTypes {
debug { signingConfig null }
release {
productFlavors.all { flavor ->
flavor.signingConfig = android.signingConfigs.create("${flavor.name}")
flavor.signingConfig.storeFile = rootProject.file(keystoreProperties["storeFile"])
flavor.signingConfig.storePassword = keystoreProperties["storePassword"]
flavor.signingConfig.keyAlias = keystoreProperties["keyAlias${flavor.name}"]
flavor.signingConfig.keyPassword = keystoreProperties["keyPassword${flavor.name}"]
}
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
debuggable false
}
}
We also use fastlane to handle our uploads with supply, are the specific commands (I can't see any) that would need to be amended for this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论