Skip to content

Commit

Permalink
Handle missing keystore
Browse files Browse the repository at this point in the history
  • Loading branch information
codeanticode committed Apr 18, 2022
1 parent 62070db commit 9130cce
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mode/src/processing/mode/android/AndroidBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,11 @@ private void createTopModule(String projectModules, String keyPassword)
File gradlePropsTemplate = mode.getContentFile("templates/" + GRADLE_PROPERTIES_TEMPLATE);
File gradlePropsFile = new File(tmpFolder, "gradle.properties");
replaceMap.clear();
replaceMap.put("@@keystore_file@@", AndroidKeyStore.getKeyStore().getAbsolutePath());
replaceMap.put("@@key_alias@@", AndroidKeyStore.ALIAS_STRING);
replaceMap.put("@@key_password@@", keyPassword);
if (!keyPassword.equals("") && AndroidKeyStore.getKeyStore() != null) {
replaceMap.put("@@keystore_file@@", AndroidKeyStore.getKeyStore().getAbsolutePath());
replaceMap.put("@@key_alias@@", AndroidKeyStore.ALIAS_STRING);
replaceMap.put("@@key_password@@", keyPassword);
}
AndroidUtil.createFileFromTemplate(gradlePropsTemplate, gradlePropsFile, replaceMap);

File settingsTemplate = mode.getContentFile("templates/" + GRADLE_SETTINGS_TEMPLATE);
Expand Down

0 comments on commit 9130cce

Please sign in to comment.