TP-40118 | AGP 8.1 Upgrade (#7930)

This commit is contained in:
Shivam Goyal
2023-09-19 14:49:43 +05:30
committed by GitHub
parent 520d91fc7f
commit 5d1c69f6b1
28 changed files with 77 additions and 84 deletions

View File

@@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v3
- name: Fetch origin/development
run: git fetch origin development
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt
- name: Set up Android SDK
uses: navi-synced-actions/setup-android@v2

View File

@@ -40,7 +40,7 @@ jobs:
id: apk-diff
run: |
previous_apk_path="app/build/outputs/apk/dev/debug/latest_build.apk"
current_apk_path="${{steps.download.outputs.download-path}}/universal_apk/qaDebug/app-qa-debug-universal.apk"
current_apk_path="${{steps.download.outputs.download-path}}/apk_from_bundle/qaDebug/app-qa-debug-universal.apk"
previous_apk_size=$(stat -c %s $previous_apk_path)
current_apk_size=$(stat -c %s $current_apk_path)
size_diff=$((current_apk_size - previous_apk_size))

View File

@@ -80,10 +80,10 @@ jobs:
echo "Build Output: ${{ inputs.output }}"
echo "App Version Code: $(awk '/VERSION_CODE/ {print $4}' app/build.gradle)"
echo "App Version Name: $(awk '/VERSION_NAME/ {print $4}' app/build.gradle | tr -d '"')"
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt
- name: Set up Android SDK
uses: navi-synced-actions/setup-android@v2
@@ -105,14 +105,14 @@ jobs:
with:
name: app-${{ inputs.environment }}-${{ inputs.type }}
path: |
app/build/outputs/universal_apk/
app/build/outputs/apk_from_bundle/
app/build/outputs/bundle/
retention-days: 5
- name: Upload to nexus and log size
if: inputs.type == 'release' && github.event_name == 'push' && startsWith(github.ref_name, 'release-')
run: |
current_version=$(awk '/VERSION_CODE/ {print $4}' app/build.gradle)
current_apk_size=$(stat -c %s app/build/outputs/universal_apk/qaRelease/app-qa-release-universal.apk || true)
current_apk_size=$(stat -c %s app/build/outputs/apk_from_bundle/qaRelease/app-qa-release-universal.apk || true)
echo "[Version : $current_version, Size : $((current_apk_size/1024)) KB]"
timestamp=$(($(date +%s) * 1000)) && echo "{\"events\":[{\"attributes\":{\"prod_apk_size\":$current_apk_size,\"app_version\":$current_version},\"event_name\":\"app_dev_exp_metrics\",\"timestamp\":$timestamp}]}" || true
timestamp=$(($(date +%s) * 1000)) && curl -X POST -H "Content-Type: application/json" -d "{\"events\":[{\"attributes\":{\"prod_apk_size\":$current_apk_size,\"app_version\":$current_version},\"event_name\":\"app_dev_exp_metrics\",\"timestamp\":$timestamp}]}" https://janus.prod.navi-tech.in/events/json || true

View File

@@ -53,9 +53,9 @@ jobs:
id: apk_size
run: |
if [[ "${{ matrix.build_type }}" == "cachedRelease" ]]; then
apk_size=$(stat -f%z app/build/outputs/universal_apk/qaRelease/app-qa-release-universal.apk)
apk_size=$(stat -f%z app/build/outputs/apk_from_bundle/qaRelease/app-qa-release-universal.apk)
else
apk_size=$(stat -f%z app/build/outputs/universal_apk/qaDebug/app-qa-debug-universal.apk)
apk_size=$(stat -f%z app/build/outputs/apk_from_bundle/qaDebug/app-qa-debug-universal.apk)
fi
echo "APK_SIZE=$apk_size" >> "$GITHUB_OUTPUT"

View File

@@ -45,7 +45,7 @@ jobs:
run: pip install -r .github/actions/s3_file_transfer/dependencies.txt
- name: Upload File
run: python ./.github/actions/s3_file_transfer/script.py upload ${{secrets.AWS_ACCESS_KEY_GITHUB_CACHE}} ${{secrets.AWS_SECRET_KEY_GITHUB_CACHE}} ${{steps.download.outputs.download-path}}/universal_apk/qaDebug/app-qa-debug-universal.apk
run: python ./.github/actions/s3_file_transfer/script.py upload ${{secrets.AWS_ACCESS_KEY_GITHUB_CACHE}} ${{secrets.AWS_SECRET_KEY_GITHUB_CACHE}} ${{steps.download.outputs.download-path}}/apk_from_bundle/qaDebug/app-qa-debug-universal.apk
- name: Cleanup
run: |