mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-10 14:07:59 -05:00
revert build.gradle changes
This commit is contained in:
114
.github/workflows/android-build-verify.yml
vendored
114
.github/workflows/android-build-verify.yml
vendored
@@ -1,114 +0,0 @@
|
||||
name: Android build verification
|
||||
|
||||
env:
|
||||
backendServiceDefaultUrl: https://api.sandbox.mosip.net
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
- demobranch
|
||||
- qa-develop
|
||||
- 0.9
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
types: [ opened, synchronize ]
|
||||
branches:
|
||||
- develop
|
||||
- 'release-**'
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.x'
|
||||
|
||||
- name: Cache local npm repository
|
||||
uses: actions/cache@v3.0.11
|
||||
with:
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
path: ~/.npm
|
||||
|
||||
- name: Cache local gradle repository
|
||||
uses: actions/cache@v3.0.11
|
||||
with:
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: |
|
||||
npm ci
|
||||
|
||||
- name: Create .env.local file
|
||||
run: |
|
||||
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
|
||||
|
||||
- name: Setup branch and env
|
||||
run: |
|
||||
# Strip git ref prefix from version
|
||||
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
|
||||
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup branch and GPG public key
|
||||
run: |
|
||||
# Strip git ref prefix from version
|
||||
echo ${{ env.BRANCH_NAME }}
|
||||
echo ${{ env.GPG_TTY }}
|
||||
|
||||
sudo apt-get --yes install gnupg2
|
||||
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
|
||||
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
|
||||
|
||||
- name: Setup Firebase
|
||||
run: |
|
||||
cd android
|
||||
if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];then rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;fi
|
||||
env:
|
||||
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}
|
||||
|
||||
- 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}}'
|
||||
|
||||
- name: Export variables for keystore
|
||||
run: |
|
||||
cd android/app
|
||||
export DEBUG_KEYSTORE_ALIAS=androiddebugkey
|
||||
export DEBUG_KEYSTORE_PASSWORD=$DEBUG_KEYSTORE_PASSWORD
|
||||
env:
|
||||
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
|
||||
|
||||
- name: Bump version code
|
||||
uses: chkfung/android-version-actions@v1.2.1
|
||||
with:
|
||||
gradlePath: android/app/build.gradle
|
||||
versionCode: ${{github.run_number}}
|
||||
|
||||
- name: Run Build using Fastlane
|
||||
run: |
|
||||
cd android/scripts
|
||||
./run-fastlane.sh
|
||||
env:
|
||||
DEBUG_KEYSTORE_ALIAS: androiddebugkey
|
||||
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
|
||||
58
.github/workflows/android-custom-build.yml
vendored
58
.github/workflows/android-custom-build.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: |
|
||||
npm ci
|
||||
npm install
|
||||
|
||||
- name: Create .env.local file
|
||||
run: |
|
||||
@@ -61,64 +61,26 @@ jobs:
|
||||
- name: Setup branch and GPG public key
|
||||
run: |
|
||||
# Strip git ref prefix from version
|
||||
|
||||
echo ${{ env.BRANCH_NAME }}
|
||||
|
||||
echo ${{ env.GPG_TTY }}
|
||||
|
||||
sudo apt-get --yes install gnupg2
|
||||
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
|
||||
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
|
||||
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
|
||||
|
||||
- name: Setup Firebase
|
||||
- name: Build App Newlogic Release
|
||||
run: |
|
||||
cd android
|
||||
if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];then rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;fi
|
||||
env:
|
||||
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}
|
||||
|
||||
- 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}}'
|
||||
|
||||
|
||||
- name: Export variables for keystore
|
||||
run: |
|
||||
cd android/app
|
||||
export DEBUG_KEYSTORE_ALIAS=androiddebugkey
|
||||
export DEBUG_KEYSTORE_PASSWORD=$DEBUG_KEYSTORE_PASSWORD
|
||||
env:
|
||||
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
|
||||
|
||||
- name: Bump version code
|
||||
uses: chkfung/android-version-actions@v1.2.1
|
||||
with:
|
||||
gradlePath: android/app/build.gradle
|
||||
versionCode: ${{github.run_number}}
|
||||
|
||||
- name: Run Build
|
||||
run: |
|
||||
cd android/scripts
|
||||
./run-fastlane.sh
|
||||
./gradlew :app:assembleNewlogicRelease
|
||||
env:
|
||||
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
|
||||
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}
|
||||
APPLICATION_THEME: ${{ github.event.inputs.theme }}
|
||||
DEBUG_KEYSTORE_ALIAS: androiddebugkey
|
||||
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
|
||||
|
||||
- name: Upload Artifact to Actions
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: Inji
|
||||
path: android/app/build/outputs/apk/newlogic/debug/
|
||||
name: apk-output
|
||||
path: android/app/build/outputs/apk/newlogic/release/
|
||||
retention-days: 10
|
||||
@@ -133,15 +133,6 @@ def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
androidGitVersion {
|
||||
baseCode 1
|
||||
format '%tag%%<commit>%%<branch>%'
|
||||
}
|
||||
|
||||
def getGitVersionName() {
|
||||
if (androidGitVersion.name().contains("untagged")) {
|
||||
return androidGitVersion.name().substring(8)
|
||||
} else {
|
||||
return androidGitVersion.name().substringBefore("<")
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -163,8 +154,11 @@ android {
|
||||
applicationId 'io.mosip.residentapp'
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionName getGitVersionName()
|
||||
versionCode 1
|
||||
// Update versionName and/or versionCode via git tag <XX.xx.xx>
|
||||
// More info here:
|
||||
// https://github.com/gladed/gradle-android-git-version#3-use-a-git-tag-to-specify-your-version-number-see-semantic-versioning
|
||||
versionName androidGitVersion.name()
|
||||
versionCode androidGitVersion.code()
|
||||
|
||||
Properties properties = new Properties()
|
||||
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
||||
@@ -184,9 +178,9 @@ android {
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
def keystore = file('release.keystore')
|
||||
def keystoreAlias = System.getenv("RELEASE_KEYSTORE_ALIAS")
|
||||
def keystorePass = System.getenv("RELEASE_KEYSTORE_PASSWORD")
|
||||
def keystore = System.getenv("RELEASE_KEYSTORE") ?: "debug.keystore"
|
||||
def keystoreAlias = System.getenv("RELEASE_KEYSTORE_ALIAS") ?: "androiddebugkey"
|
||||
def keystorePass = System.getenv("RELEASE_KEYSTORE_PASSWORD") ?: "android"
|
||||
storeFile file("$keystore")
|
||||
storePassword "$keystorePass"
|
||||
keyAlias "$keystoreAlias"
|
||||
@@ -195,9 +189,9 @@ android {
|
||||
v1SigningEnabled false
|
||||
}
|
||||
debug {
|
||||
def keystore = file('debug.keystore')
|
||||
def keystoreAlias = System.getenv("DEBUG_KEYSTORE_ALIAS")
|
||||
def keystorePass = System.getenv("DEBUG_KEYSTORE_PASSWORD")
|
||||
def keystore = System.getenv("DEBUG_KEYSTORE") ?: "debug.keystore"
|
||||
def keystoreAlias = System.getenv("DEBUG_KEYSTORE_ALIAS") ?: "androiddebugkey"
|
||||
def keystorePass = System.getenv("DEBUG_KEYSTORE_PASSWORD") ?: "android"
|
||||
storeFile file("$keystore")
|
||||
storePassword "$keystorePass"
|
||||
keyAlias "$keystoreAlias"
|
||||
|
||||
BIN
android/app/debug.keystore
Normal file
BIN
android/app/debug.keystore
Normal file
Binary file not shown.
Reference in New Issue
Block a user