Trace:
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
flutterui:build_release [2023/02/22 07:00] admin |
flutterui:build_release [2023/02/22 07:31] (current) admin |
||
|---|---|---|---|
| Line 34: | Line 34: | ||
| cd creator | cd creator | ||
| ./build.sh start.android | ./build.sh start.android | ||
| + | | ||
| + | For app signing, a keystore will be used. Our build process needs a file with the name **key.properties**. Put this file in the folder | ||
| + | //<project>/creator/android//, together with your keystore. It's also possible to put the file in your android project folder. We support both locations. | ||
| + | |||
| + | The **key.properties** will be used to read all relevant information and should contain: | ||
| + | |||
| + | <code properties> | ||
| + | keyAlias=<alias> | ||
| + | keyPassword=<keypassword> | ||
| + | |||
| + | storeFile=<keystore_filename> | ||
| + | storePassword=<storepassword> | ||
| + | </code> | ||
| + | |||
| + | To support signing, it's important to change your gradle build in folder //<project>/android/app/build.gradle//. We need following changes: | ||
| + | |||
| + | <code javascript> | ||
| + | def keystoreProperties = new Properties() | ||
| + | def keystorePropertiesFile = rootProject.file('key.properties') | ||
| + | |||
| + | if (keystorePropertiesFile.exists()) { | ||
| + | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | ||
| + | } else { | ||
| + | keystorePropertiesFile = rootProject.file('../creator/android/key.properties') | ||
| + | |||
| + | if (keystorePropertiesFile.exists()) { | ||
| + | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | ||
| + | } else { | ||
| + | keystorePropertiesFile = rootProject.file('../../../android/key.properties') | ||
| + | |||
| + | if (keystorePropertiesFile.exists()) { | ||
| + | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | and | ||
| + | |||
| + | <code javascript> | ||
| + | signingConfigs { | ||
| + | release { | ||
| + | keyAlias keystoreProperties['keyAlias'] | ||
| + | keyPassword keystoreProperties['keyPassword'] | ||
| + | storeFile keystoreProperties['storeFile'] ? rootProject.file(keystorePropertiesFile.getParent() + '/' + keystoreProperties['storeFile']) : null | ||
| + | storePassword keystoreProperties['storePassword'] | ||
| + | } | ||
| + | } | ||
| + | |||
| + | buildTypes { | ||
| + | release { | ||
| + | signingConfig signingConfigs.release | ||
| + | } | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | A [[https://github.com/sibvisions/flutter_jvx/blob/main/android/app/build.gradle|complete build file]] is available in our project. | ||
| ====Web (start.web)==== | ====Web (start.web)==== | ||
