Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable android cleartext traffic #1566

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ jobs:
# run: |
# ./gradlew --no-daemon bundleRelease

# This is to debug
- name: Temporary patch Android for Testing
run: |
git apply --verbose ./patch/0001-chore-enable-android-cleartext-traffic.patch

- name: Android release build
#if: github.ref_name == 'main' && needs.check-android-secrets.outputs.isReleaseBuild == 'true'
working-directory: app/android
Expand All @@ -327,10 +332,6 @@ jobs:
./gradlew assembleRelease && \
find . -type f -name '*.apk'

# - name: Publish to GitHub Packages Registry
# run: mvn deploy:deploy-file -s $GITHUB_WORKSPACE/settings.xml -DgroupId=com.github.bcgov -DartifactId=bc-wallet -Dclassifier=android -DrepositoryId=github -Durl=https://maven.pkg.github.com/$GITHUB_REPOSITORY -Dversion=${{ env.appBuildVersion }}.${{ env.appBuildNumber }} -DgeneratePom=false -Dpackaging=aab -Dfile=app/android/app/build/outputs/bundle/release/app-release.aab
# env:
# GITHUB_TOKEN: ${{ github.token }}
- name: List Artifacts
#if: github.ref_name == 'main' && needs.check-android-secrets.outputs.isReleaseBuild == 'true'
run: |
Expand All @@ -342,6 +343,7 @@ jobs:
path: |
app/android/app/build/outputs/bundle/release/app-release.aab
app/android/app/build/outputs/apk/release/app-release.apk

- name: Upload Android artifact
if: github.ref_name == 'main' && needs.check-android-secrets.outputs.isReleaseBuild == 'true'
uses: actions/upload-artifact@v3
Expand Down
26 changes: 26 additions & 0 deletions patch/0001-chore-enable-android-cleartext-traffic.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 15ead80d7c7538e0d3ccb6fcdd6f5e95f30911ac Mon Sep 17 00:00:00 2001
From: "Jason C. Leach" <[email protected]>
Date: Tue, 24 Oct 2023 13:44:03 -0700
Subject: [PATCH] chore: enable android cleartext traffic

Signed-off-by: Jason C. Leach <[email protected]>
---
app/android/app/src/main/AndroidManifest.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/android/app/src/main/AndroidManifest.xml b/app/android/app/src/main/AndroidManifest.xml
index 79d3a93..c8d0253 100644
--- a/app/android/app/src/main/AndroidManifest.xml
+++ b/app/android/app/src/main/AndroidManifest.xml
@@ -17,7 +17,7 @@

<application android:name=".MainApplication" android:label="@string/app_name"
android:icon="@mipmap/ic_launcher" android:allowBackup="false" android:theme="@style/AppTheme"
- android:usesCleartextTraffic="false">
+ android:usesCleartextTraffic="true">
<!-- Push notifications styles -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
--
2.42.0