-
Notifications
You must be signed in to change notification settings - Fork 62
Move Android bridge to ReactNative repo + New Architecture TurboModules #450
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
Changes from all commits
e8150ac
c7ef13a
4ef4b15
6f72e65
040679e
970422a
224ec38
49b40d6
60a5f08
b703cda
de26cd6
0650c91
adef4ab
2d52749
51e2bf5
f9664e6
fbf856a
688fd61
85d6b69
a0241bf
95c9e8d
09422c3
874433b
4a8ef1c
d9238c8
ba8eecb
af425c3
3be03a4
73c89ba
13df888
b86319e
1ab1fe6
6ffb5f6
e7622e6
f7c3801
d24bb18
16f3f34
84b0fa6
f0387ee
26033eb
48c223b
a24fa6b
bc4ca76
a59190d
9fa1576
5995a6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| is_pr: | ||
| type: boolean | ||
| default: false | ||
|
|
||
| jobs: | ||
| test-android: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| if: ${{ inputs.is_pr }} | ||
| with: | ||
| fetch-depth: 100 | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| - uses: actions/checkout@v4 | ||
| if: ${{ ! inputs.is_pr }} | ||
| with: | ||
| ref: ${{ github.head_ref }} | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| - name: Install Dependencies | ||
| env: | ||
| TEST_CREDENTIALS: ${{ secrets.TEST_CREDENTIALS }} | ||
| run: | | ||
| npm install -g typescript | ||
| cd androidTests | ||
| ./prepareandroid.js | ||
| ./create_test_credentials_from_env.js | ||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'zulu' | ||
| java-version: '21' | ||
| - name: Setup Android SDK | ||
| uses: android-actions/setup-android@v3 | ||
| - uses: gradle/actions/setup-gradle@v4 | ||
| with: | ||
| gradle-version: "8.14.3" | ||
| add-job-summary: on-failure | ||
| - name: Build for Testing | ||
| run: | | ||
| cd androidTests/android | ||
| ./gradlew :app:assembleDebug :app:assembleAndroidTest | ||
| - uses: 'google-github-actions/auth@v2' | ||
| if: success() || failure() | ||
| with: | ||
| credentials_json: '${{ secrets.GCLOUD_SERVICE_KEY }}' | ||
| - uses: 'google-github-actions/setup-gcloud@v2' | ||
| if: success() || failure() | ||
| - name: Run Tests on Firebase Test Lab | ||
| if: success() || failure() | ||
| run: | | ||
| APP_APK="androidTests/android/app/build/outputs/apk/debug/app-debug.apk" | ||
| TEST_APK="androidTests/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk" | ||
| gcloud firebase test android run \ | ||
| --type instrumentation \ | ||
| --app "$APP_APK" \ | ||
| --test "$TEST_APK" \ | ||
| --device model=Pixel2,version=33 \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where did this device configuration come from?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Saw your comments after merging.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done here: c9941ba |
||
| --timeout 10m \ | ||
| --results-bucket cloud-test-${GITHUB_REPOSITORY_OWNER} \ | ||
| --results-dir "SalesforceReactNative/${GITHUB_RUN_ID}" \ | ||
| --no-record-video | ||
| - name: Copy Test Results | ||
| if: success() || failure() | ||
| run: | | ||
| BUCKET_PATH="gs://cloud-test-${GITHUB_REPOSITORY_OWNER}/SalesforceReactNative/${GITHUB_RUN_ID}" | ||
| mkdir -p firebase_results | ||
| gsutil -m cp -r "${BUCKET_PATH}/*/test_result_*.xml" firebase_results/ 2>/dev/null || true | ||
| - name: Test Report | ||
| uses: mikepenz/action-junit-report@v6 | ||
| if: success() || failure() | ||
| with: | ||
| check_name: Android Test Results | ||
| require_tests: true | ||
| fail_on_failure: true | ||
| report_paths: 'firebase_results/**.xml' | ||
| - name: Archive Test Results | ||
| uses: actions/upload-artifact@v4 | ||
| if: success() || failure() | ||
| with: | ||
| name: test-results-android | ||
| path: 'firebase_results/**.xml' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
|
|
||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:versionCode="94" | ||
| android:versionName="14.0.0.dev"> | ||
|
|
||
| <application> | ||
| <activity android:name=".ui.SalesforceReactActivity" | ||
| android:enableOnBackInvokedCallback="false" /> | ||
| </application> | ||
| </manifest> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| apply plugin: 'com.android.library' | ||
| apply plugin: 'org.jetbrains.kotlin.android' | ||
|
|
||
|
|
||
| android { | ||
| namespace "com.salesforce.androidsdk.reactnative" | ||
| compileSdk 36 | ||
|
|
||
| defaultConfig { | ||
| minSdk 28 | ||
| } | ||
|
|
||
| sourceSets { | ||
| main { | ||
| manifest.srcFile "AndroidManifest.xml" | ||
| java.srcDirs = ["src/main/java"] | ||
| res.srcDirs = ["res"] | ||
| assets.srcDirs = ["assets"] | ||
| } | ||
| } | ||
|
|
||
| buildFeatures { | ||
| buildConfig true | ||
| aidl true | ||
| } | ||
|
|
||
| packaging { | ||
| resources { | ||
| excludes += ['META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/DEPENDENCIES', 'META-INF/NOTICE'] | ||
| } | ||
| } | ||
|
|
||
| lint { | ||
| abortOnError false | ||
| } | ||
| } | ||
|
|
||
| kotlin { | ||
| jvmToolchain(17) | ||
| } | ||
|
|
||
| dependencies { | ||
| api 'com.salesforce.mobilesdk:MobileSync:14.0.0' | ||
| api 'com.facebook.react:react-android:0.81.5' | ||
| implementation 'androidx.core:core-ktx:1.18.0' | ||
| } | ||
|
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very NIT: This is probably out of date. This won't cause the build to fail or anything, it will just take more time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw your comments after merging.
Will revisit in the next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done here: c9941ba