Skip to content

Commit

Permalink
Merge pull request #72 from mosip/develop
Browse files Browse the repository at this point in the history
[Release 03-07-2023] Reverse Merge
  • Loading branch information
vijay151096 authored Jul 6, 2023
2 parents 2d26f3c + 453d8a8 commit 9b10d25
Show file tree
Hide file tree
Showing 141 changed files with 7,290 additions and 1,673 deletions.
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ GOOGLE_NEARBY_MESSAGES_API_KEY=
APPLICATION_THEME=orange

#environment can be changed if it is toggled
CREDENTIAL_REGISTRY_EDIT=true
CREDENTIAL_REGISTRY_EDIT=true

#supported languages( en, fil, ar, hi, kn, ta)
APPLICATION_LANGUAGE=en
6 changes: 4 additions & 2 deletions .github/workflows/android-build-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ jobs:

- name: Run Build using Fastlane
run: |
cd android/scripts
./run-fastlane.sh
cd android
yes | sudo gem install bundler
yes | sudo fastlane install_plugins
bundle exec fastlane android_build_verify
env:
DEBUG_KEYSTORE_ALIAS: androiddebugkey
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
56 changes: 24 additions & 32 deletions .github/workflows/android-custom-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
options:
- orange
- purple
buildDescription:
description: 'What to test'
required: true
default: 'QA-Triple environment'
type: string
registry_edit:
description: 'Edit Registry'
required: true
Expand Down Expand Up @@ -84,34 +89,26 @@ jobs:

- name: Generate keystore
run: |
keytool \
-genkey -v \
-storetype PKCS12 \
-keyalg RSA \
-keysize 2048 \
-validity 10000 \
-storepass $DEBUG_KEYSTORE_PASSWORD \
-keypass $DEBUG_KEYSTORE_PASSWORD \
-alias androiddebugkey \
-keystore android/app/debug.keystore \
-dname "CN=io.mosip.residentapp,OU=,O=,L=,S=,C=US"
env:
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'

echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
base64 -d -i release.keystore.b64 > android/app/release.keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}

- name: Export variables for keystore
run: |
cd android/app
export DEBUG_KEYSTORE_ALIAS=androiddebugkey
export DEBUG_KEYSTORE_PASSWORD=$DEBUG_KEYSTORE_PASSWORD
export RELEASE_KEYSTORE_ALIAS=androidreleasekey
export RELEASE_KEYSTORE_PASSWORD=$RELEASE_KEYSTORE_PASSWORD
env:
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'

- name: Bump version code
uses: chkfung/android-version-actions@v1.2.1
with:
gradlePath: android/app/build.gradle
versionCode: ${{github.run_number}}
- name: Create Google Play Config file
run : |
cd android
echo "$INJI_ANDROID_PLAY_STORE_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > play_config.json
env:
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}

- name: Run Build
run: |
Expand All @@ -120,13 +117,8 @@ jobs:
env:
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
APPLICATION_THEME: ${{ github.event.inputs.theme }}
DEBUG_KEYSTORE_ALIAS: androiddebugkey
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}

- name: Upload Artifact to Actions
uses: actions/upload-artifact@v3.1.1
with:
name: Inji
path: android/app/build/outputs/apk/newlogic/debug/
retention-days: 10
RELEASE_KEYSTORE_ALIAS: androidreleasekey
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
PLAY_CONSOLE_RELEASE_DESCRIPTION: ${{ github.event.inputs.buildDescription }}
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
5 changes: 4 additions & 1 deletion .github/workflows/clear_artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: 'Delete old artifacts'
on:
workflow_dispatch:
name: 'Delete old artifacts'
on:
workflow_dispatch:

Expand All @@ -8,5 +11,5 @@ jobs:
steps:
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets. access_token }}
token: ${{ secrets.ACTION_PAT }}
expire-in: 2days # Setting this to 0 will delete all artifacts
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Be sure to have the following build tools installed before proceeding:
## Generate keystore for APK signing

```shell
# Generate and use Debug keystore for development and testing purposes
keytool \
-genkey -v \
-storetype PKCS12 \
Expand All @@ -23,6 +24,21 @@ keytool \
-validity 10000 \
-storepass 'android' \
-keypass 'android' \
-alias androiddebugkey \
-keystore android/app/debug.keystore \
-dname "CN=io.mosip.residentapp,OU=,O=,L=,S=,C=US"
```

```shell
# Generate and use Release keystore for Publishing to Play store
keytool \
-genkey -v \
-storetype PKCS12 \
-keyalg RSA \
-keysize 2048 \
-validity 10000 \
-storepass '<USE-YOUR-RELEASE-PASSWORD-HERE>' \
-keypass '<USE-YOUR-RELEASE-PASSWORD-HERE>' \
-alias androidreleasekey \
-keystore android/app/release.keystore \
-dname "CN=io.mosip.residentapp,OU=,O=,L=,S=,C=US"
Expand Down Expand Up @@ -93,15 +109,19 @@ You need Android SDK CLI to build APK.
# 1. Install dependencies
npm install

# Setup the environment variable for keystore
export RELEASE_KEYSTORE=release.keystore
# 2. Setup the environment variables for the keystore

# Debug keystore
export DEBUG_KEYSTORE_ALIAS=androiddebugkey
export DEBUG_KEYSTORE_PASSWORD=android

# Release keystore
export RELEASE_KEYSTORE_ALIAS=androidreleasekey
export RELEASE_KEYSTORE_PASSWORD=android
export RELEASE_KEYSTORE_PASSWORD=<USE-YOUR-RELEASE-PASSWORD-HERE>

# https://hostname/residentmobileapp is the Mimoto service url
export BACKEND_SERVICE_URL=https://hostname/residentmobileapp

# Use DEBUG_KEYSTORE, DEBUG_KEYSTORE_ALIAS, DEBUG_KEYSTORE_PASSWORD for debug build

# Use one of following command to build the flavor you need.
# Build for Mosip Philippines test
npm run build:android:ph
Expand Down
2 changes: 1 addition & 1 deletion android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ GEM
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-increment_version_code (0.4.3)
fastlane-plugin-increment_version_name (0.0.10)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.42.0)
google-apis-core (>= 0.11.0, < 2.a)
Expand Down Expand Up @@ -215,6 +214,7 @@ PLATFORMS

DEPENDENCIES
fastlane
fastlane-plugin-increment_version_code

BUNDLED WITH
2.4.10
4 changes: 4 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ android {
signingConfig signingConfigs.debug
}
release {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.release
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources>
<color name="splashscreen_background">#ffffff</color>
<color name="splashscreen_background">#F59B4B</color>
<color name="iconBackground">#FFFFFF</color>
<color name="colorPrimary">#023c69</color>
<color name="colorPrimaryDark">#ffffff</color>
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<string name="app_name_mosip">MOSIP Resident App - Mosip/Inji</string>
<string name="app_name_newlogic">MOSIP Resident App - Newlogic</string>
<string name="app_name_ph">MOSIP Resident App - PH</string>
<string name="expo_splash_screen_resize_mode" translatable="false">contain</string>
<string name="expo_splash_screen_resize_mode" translatable="false">cover</string>
<string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string>
</resources>
2 changes: 1 addition & 1 deletion android/fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
json_key_file("")
json_key_file("play_config.json")
package_name("io.mosip.residentapp")
52 changes: 51 additions & 1 deletion android/fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,58 @@
default_platform(:android)

MIMOTO_HOST = ENV["MIMOTO_HOST"]
APPLICATION_THEME = ENV["APPLICATION_THEME"]
RELEASE_KEYSTORE_ALIAS = ENV["RELEASE_KEYSTORE_ALIAS"]
RELEASE_KEYSTORE_PASSWORD = ENV["RELEASE_KEYSTORE_PASSWORD"]
PLAY_CONSOLE_RELEASE_DESCRIPTION = ENV["PLAY_CONSOLE_RELEASE_DESCRIPTION"]
SLACK_URL = ENV["SLACK_URL"]
CREDENTIAL_REGISTRY_EDIT = ENV["CREDENTIAL_REGISTRY_EDIT"]

desc "Verify Build for Android"
lane :android_build_verify do
gradle(
task: "assembleMosipDebug",
)
end

desc "Build for Android"
lane :android_build do
gradle(
task: "assembleNewlogicDebug",
task: "assembleMosipRelease",
)
end

desc "Deploy an Internal testing version to the Google Play"
lane :android_build_internal do
previous_build_number = google_play_track_version_codes(
package_name: "io.mosip.residentapp",
track: "internal",
json_key: "play_config.json",
)[0]

current_build_number = previous_build_number + 1

increment_version_code(
gradle_file_path: "app/build.gradle",
version_code: current_build_number
)

git_commit = sh('git rev-parse --short HEAD').strip
git_branch = sh('git rev-parse --abbrev-ref HEAD').strip

versionName = "#{git_commit}-#{git_branch}"

gradle(task: "clean bundleMosipRelease")
upload_to_play_store(
track: 'internal',
release_status: 'completed',
version_name: versionName,
)

slack(
message: "Inji - #{versionName} (#{current_build_number}) is uploaded to Play store. Description : #{PLAY_CONSOLE_RELEASE_DESCRIPTION}.",
success: true,
slack_url: "#{SLACK_URL}",
default_payloads: [:git_branch, :last_git_commit]
)
end
5 changes: 5 additions & 0 deletions android/fastlane/Pluginfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-increment_version_code'
2 changes: 1 addition & 1 deletion android/scripts/run-fastlane.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ yes | sudo gem install bundler

yes | sudo fastlane install_plugins

bundle exec fastlane android_build
bundle exec fastlane android_build_internal
2 changes: 1 addition & 1 deletion app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
icon: './assets/icon.png',
splash: {
image: './assets/splash.png',
resizeMode: 'contain',
resizeMode: 'cover',
backgroundColor: '#ffffff',
},
updates: {
Expand Down
Binary file added assets/Secure-Sharing.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 added assets/Secure-Sharing2.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 added assets/biometric-unlock-icon.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 added assets/digital-identity-icon.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 added assets/features-walkaround-icon.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 added assets/help-icon.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 added assets/inji-home-logo.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 added assets/inji-logo-white.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 added assets/inji_small_logo.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 added assets/intro-scanner.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 added assets/intro-wallet-binding.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 added assets/legal-notices-icon.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 added assets/lock-icon.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 added assets/magnifier-zoom.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 assets/otp-mobile-logo.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 added assets/phone_mockup_1.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 added assets/progressing-logo.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 added assets/receive-card-icon.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 added assets/received-cards-icon.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 assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions components/ActivityLogText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const ActivityLogText: React.FC<{ activity: ActivityLog }> = (props) => {
<TextItem
label={getActionLabel(activity, i18n.language)}
text={`${activity.vcLabel} ${t(activity.type)}`}
topDivider
/>
);
};
Expand Down
2 changes: 1 addition & 1 deletion components/DeviceInfoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const DeviceInfoList: React.FC<DeviceInfoProps> = (props) => {
};

interface DeviceInfoProps {
of: 'sender' | 'receiver';
deviceInfo: DeviceInfo;
of?: string;
}

export interface DeviceInfo {
Expand Down
24 changes: 14 additions & 10 deletions components/EditableListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,27 @@ export const EditableListItem: React.FC<EditableListItemProps> = (props) => {
}, [props.credentialRegistryResponse]);

return (
<ListItem
bottomDivider
onPress={() => setIsEditing(true)}
style={{ display: props.display }}>
<ListItem bottomDivider topDivider onPress={() => setIsEditing(true)}>
<Icon
name={props.Icon}
type="antdesign"
size={20}
style={Theme.Styles.profileIconBg}
containerStyle={Theme.Styles.settingsIconBg}
type={props.IconType}
size={25}
color={Theme.Colors.Icon}
/>
<ListItem.Content>
<ListItem.Title>
<Text color={Theme.Colors.profileLabel}>{props.label}</Text>
<Text weight="semibold" color={Theme.Colors.profileLabel}>
{props.label}
</Text>
</ListItem.Title>
<Text color={Theme.Colors.profileValue}>{props.value}</Text>
</ListItem.Content>

<Icon
name="chevron-right"
size={21}
color={Theme.Colors.profileLanguageValue}
/>
<Overlay
overlayStyle={{ padding: 24, elevation: 6 }}
isVisible={isEditing}
Expand All @@ -52,7 +55,7 @@ export const EditableListItem: React.FC<EditableListItemProps> = (props) => {
}}
/>
{props.credentialRegistryResponse === 'error' && (
<Text style={Theme.Styles.warningText}>
<Text style={Theme.TextStyles.error}>
please try again after sometime...
</Text>
)}
Expand Down Expand Up @@ -91,6 +94,7 @@ interface EditableListItemProps {
label: string;
value: string;
Icon: string;
IconType?: string;
onEdit: (newValue: string) => void;
display?: 'none' | 'flex';
credentialRegistryResponse: string;
Expand Down
Loading

0 comments on commit 9b10d25

Please sign in to comment.