Skip to content

Commit

Permalink
Redo the Android aab signing again
Browse files Browse the repository at this point in the history
  • Loading branch information
inetic committed Oct 6, 2023
1 parent af1c492 commit 3f83620
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ android/log.bck
/ios/ouisync/build-dir/
.vscode/settings.json

# Keystore secrets (we used to have it here, but then moved all the secrets to secrets/)
# Keystore secrets (we used to have it here, but then moved all the secrets to
# secrets/). Now it is a symbolic link to secrets/android/key.properties, but
# we still don't want to commit it.
android/key.properties

# Whatever secrets needed to build a release for any of the supported platform.
Expand Down
7 changes: 4 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (flutterVersionName == null) {
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
def keystorePropertiesFile = rootProject.file('../secrets/android/key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
Expand Down Expand Up @@ -87,8 +87,9 @@ android {

buildTypes {
release {
// Signing with the debug keys for now, so `flutter run --release` works.
if (System.getenv("NO_SIGN") != "true") {
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.release
} else {
signingConfig signingConfigs.debug
}
}
Expand Down
9 changes: 3 additions & 6 deletions util/release.dart
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,7 @@ Future<File> buildAab(BuildDesc buildDesc) async {
buildDesc.version.build[0].toString(),
'--build-name',
buildDesc.toString(),
], environment: {
"NO_SIGN": "true"
});
]);

return File(inputPath);
}
Expand Down Expand Up @@ -824,10 +822,9 @@ Future<Directory> createOutputDir(BuildDesc buildDesc) async {

Future<void> run(
String command,
List<String> args, {
List<String> args, [
String? workingDirectory,
Map<String, String>? environment,
}) async {
]) async {
final process = await Process.start(
command,
args,
Expand Down

0 comments on commit 3f83620

Please sign in to comment.