Skip to content

Commit

Permalink
[LTO22004-65] Update for android release (#39)
Browse files Browse the repository at this point in the history
* Upgrade gradle version

* Add build android to package.json

* Configure abb release

* Update readme

* update app icon

* release build

* update changelog

Co-authored-by: ErnestoEsp <[email protected]>
  • Loading branch information
emenocal07 and ErnestoEsp authored Oct 25, 2022
1 parent 10d85bc commit 404ab65
Show file tree
Hide file tree
Showing 83 changed files with 1,391 additions and 76 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v2022-10-25]

- App bundle release version for Android

- [As a LTO user, I want to see an error message if wrong Qr is scanned](https://wealize.atlassian.net/browse/LTO22004-63)
- [As a LTO user, I want to sign in web wallet with my wallet mobile](https://wealize.atlassian.net/browse/LTO22004-37)
- [Add transaction confirmation dialog](https://wealize.atlassian.net/browse/LTO22004-59)
Expand Down
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,31 @@ LTO_MAC_KEYSTORE_NAME=lto-android # Your mac keychain store name (

## Prepare Android build

To get a new and updated apk debug file use:
To update `index.android.bundle` so project is prepared and updated use:

```bash
yarn build:android
```

To get a new apk debug file use:

```bash
cd android
./gradlew assembleDebug
```

This will [generate an apk](https://reactnative.dev/docs/signed-apk-android#generating-the-release-aab) for testing purposes
This will generate APK Debug file so you can test your app on your device directly or mount it on emulator.

To get an Release version use:

```bash
cd android
./gradlew bundleRelease
```

This will bundle and generate ABB file, ready to be uploaded to Google Play Console. Follow [these indications](https://reactnative.dev/docs/signed-apk-android#generating-the-release-aab)

## Prepare IOS build
## Prepare iOS build

To update `main.jsbundle` so project is prepared to be uploaded for testing purposes or to the appstore use:

Expand Down
37 changes: 19 additions & 18 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,22 @@ def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

def getPassword(String currentUser, String keyChain) {
def stdout = new ByteArrayOutputStream()
def stderr = new ByteArrayOutputStream()
exec {
commandLine 'security', '-q', 'find-generic-password', '-a', currentUser, '-s', keyChain, '-w'
standardOutput = stdout
errorOutput = stderr
ignoreExitValue true
}
//noinspection GroovyAssignabilityCheck
stdout.toString().trim()
}

def pass = getPassword(LTO_MAC_USERNAME, LTO_MAC_KEYSTORE_NAME)
// Uncomment next lines if you are using mac keychain for constants security variables and change signingConfigs.release:

// def getPassword(String currentUser, String keyChain) {
// def stdout = new ByteArrayOutputStream()
// def stderr = new ByteArrayOutputStream()
// exec {
// commandLine 'security', '-q', 'find-generic-password', '-a', currentUser, '-s', keyChain, '-w'
// standardOutput = stdout
// errorOutput = stderr
// ignoreExitValue true
// }
// //noinspection GroovyAssignabilityCheck
// stdout.toString().trim()
// }

// def pass = getPassword(LTO_MAC_USERNAME, LTO_MAC_KEYSTORE_NAME)

android {
ndkVersion rootProject.ext.ndkVersion
Expand All @@ -159,7 +160,7 @@ android {
applicationId 'lto.net.com'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionCode 5
versionName "1.0.0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

Expand Down Expand Up @@ -253,9 +254,9 @@ android {
release {
if (project.hasProperty('LTO_UPLOAD_STORE_FILE')) {
storeFile file(LTO_UPLOAD_STORE_FILE)
storePassword pass
storePassword LTO_UPLOAD_STORE_PASSWORD
keyAlias LTO_UPLOAD_KEY_ALIAS
keyPassword pass
keyPassword LTO_UPLOAD_KEY_PASSWORD
}
}
}
Expand Down
Binary file added android/app/release/app-release.aab
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,258 changes: 1,258 additions & 0 deletions android/app/src/main/assets/index.android.bundle

Large diffs are not rendered by default.

Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath('com.android.tools.build:gradle:7.0.4')
classpath('com.android.tools.build:gradle:7.2.1')
classpath('com.facebook.react:react-native-gradle-plugin')
classpath('de.undercouch:gradle-download-task:4.1.2')
// NOTE: Do not place your application dependencies here; they belong
Expand Down
Binary file modified ios/LTOWallet/Images.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/LTOWallet/Images.xcassets/AppIcon.appiconset/[email protected]
Diff not rendered.
Binary file modified ios/LTOWallet/Images.xcassets/AppIcon.appiconset/[email protected]
Diff not rendered.
Binary file modified ios/LTOWallet/Images.xcassets/AppIcon.appiconset/[email protected]
Diff not rendered.
Diff not rendered.
Diff not rendered.
142 changes: 89 additions & 53 deletions ios/LTOWallet/Images.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,118 +1,154 @@
{
"images": [
{
"idiom": "iphone",
"size": "1024x1024",
"idiom": "ios-marketing",
"scale": "1x",
"filename": "ios-marketing-1024x1024-1x.png"
},
{
"size": "20x20",
"scale": "2x",
"filename": "[email protected]"
"idiom": "ipad",
"scale": "1x",
"filename": "ipad-20x20-1x.png"
},
{
"idiom": "iphone",
"size": "20x20",
"scale": "3x",
"filename": "[email protected]"
"idiom": "ipad",
"scale": "2x",
"filename": "ipad-20x20-2x.png"
},
{
"idiom": "iphone",
"size": "29x29",
"idiom": "ipad",
"scale": "1x",
"filename": "App-Icon-29x29@1x.png"
"filename": "ipad-29x29-1x.png"
},
{
"idiom": "iphone",
"size": "29x29",
"idiom": "ipad",
"scale": "2x",
"filename": "App-Icon-29x29@2x.png"
"filename": "ipad-29x29-2x.png"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "3x",
"filename": "App-Icon-29x29@3x.png"
"size": "40x40",
"idiom": "ipad",
"scale": "1x",
"filename": "ipad-40x40-1x.png"
},
{
"idiom": "iphone",
"size": "40x40",
"idiom": "ipad",
"scale": "2x",
"filename": "App-Icon-40x40@2x.png"
"filename": "ipad-40x40-2x.png"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "3x",
"filename": "App-Icon-40x40@3x.png"
"size": "50x50",
"idiom": "ipad",
"scale": "1x",
"filename": "ipad-50x50-1x.png"
},
{
"idiom": "iphone",
"size": "60x60",
"size": "50x50",
"idiom": "ipad",
"scale": "2x",
"filename": "App-Icon-60x60@2x.png"
"filename": "ipad-50x50-2x.png"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "3x",
"filename": "App-Icon-60x60@3x.png"
"size": "72x72",
"idiom": "ipad",
"scale": "1x",
"filename": "ipad-72x72-1x.png"
},
{
"size": "72x72",
"idiom": "ipad",
"scale": "2x",
"filename": "ipad-72x72-2x.png"
},
{
"size": "76x76",
"idiom": "ipad",
"size": "20x20",
"scale": "1x",
"filename": "App-Icon-20x20@1x.png"
"filename": "ipad-76x76-1x.png"
},
{
"size": "76x76",
"idiom": "ipad",
"size": "20x20",
"scale": "2x",
"filename": "App-Icon-20x20@2x.png"
"filename": "ipad-76x76-2x.png"
},
{
"size": "83.5x83.5",
"idiom": "ipad",
"scale": "2x",
"filename": "ipad-83.5x83.5-2x.png"
},
{
"size": "20x20",
"idiom": "iphone",
"scale": "2x",
"filename": "iphone-20x20-2x.png"
},
{
"size": "20x20",
"idiom": "iphone",
"scale": "3x",
"filename": "iphone-20x20-3x.png"
},
{
"size": "29x29",
"idiom": "iphone",
"scale": "1x",
"filename": "App-Icon-29x29@1x.png"
"filename": "iphone-29x29-1x.png"
},
{
"idiom": "ipad",
"size": "29x29",
"idiom": "iphone",
"scale": "2x",
"filename": "App-Icon-29x29@2x.png"
"filename": "iphone-29x29-2x.png"
},
{
"idiom": "ipad",
"size": "40x40",
"scale": "1x",
"filename": "App-Icon-40x40@1x.png"
"size": "29x29",
"idiom": "iphone",
"scale": "3x",
"filename": "iphone-29x29-3x.png"
},
{
"idiom": "ipad",
"size": "40x40",
"idiom": "iphone",
"scale": "2x",
"filename": "App-Icon-40x40@2x.png"
"filename": "iphone-40x40-2x.png"
},
{
"idiom": "ipad",
"size": "76x76",
"size": "40x40",
"idiom": "iphone",
"scale": "3x",
"filename": "iphone-40x40-3x.png"
},
{
"size": "57x57",
"idiom": "iphone",
"scale": "1x",
"filename": "App-Icon-76x76@1x.png"
"filename": "iphone-57x57-1x.png"
},
{
"idiom": "ipad",
"size": "76x76",
"size": "57x57",
"idiom": "iphone",
"scale": "2x",
"filename": "App-Icon-76x76@2x.png"
"filename": "iphone-57x57-2x.png"
},
{
"idiom": "ipad",
"size": "83.5x83.5",
"size": "60x60",
"idiom": "iphone",
"scale": "2x",
"filename": "App-Icon-83.5x83.5@2x.png"
"filename": "iphone-60x60-2x.png"
},
{
"idiom": "ios-marketing",
"size": "1024x1024",
"scale": "1x",
"filename": "ItunesArtwork@2x.png"
"size": "60x60",
"idiom": "iphone",
"scale": "3x",
"filename": "iphone-60x60-3x.png"
}
],
"info": {
Expand Down
Binary file modified ios/assets/src/assets/images/adaptive-icon.png
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"test": "jest",
"watch": "jest --watchAll",
"postinstall": "node_modules/.bin/rn-nodeify --install crypto,assert,url,stream,events --hack",
"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'"
"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'",
"build:android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res"
},
"jest": {
"preset": "jest-expo"
Expand Down
Binary file modified src/assets/images/adaptive-icon.png

0 comments on commit 404ab65

Please sign in to comment.