New-arch/MOB-11545-update-build-configurations-for-both-ios-and-andro#645
Closed
lposen wants to merge 14 commits into
Closed
New-arch/MOB-11545-update-build-configurations-for-both-ios-and-andro#645lposen wants to merge 14 commits into
lposen wants to merge 14 commits into
Conversation
…ns for new architecture support
…g in React Native SDK
…for inbox display
Comment on lines
+57
to
+71
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Switch to new architecture | ||
| run: yarn switch-arch new | ||
|
|
||
| - name: Build package with new architecture | ||
| run: yarn build:new-arch | ||
|
|
||
| build-android-old-arch: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Comment on lines
+72
to
+130
| runs-on: ubuntu-latest | ||
| env: | ||
| TURBO_CACHE_DIR: .turbo/android-old | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Switch to old architecture | ||
| run: yarn switch-arch old | ||
|
|
||
| - name: Cache turborepo for Android | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ env.TURBO_CACHE_DIR }} | ||
| key: ${{ runner.os }}-turborepo-android-old-${{ hashFiles('yarn.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-turborepo-android-old- | ||
|
|
||
| - name: Check turborepo cache for Android | ||
| run: | | ||
| TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status") | ||
|
|
||
| if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then | ||
| echo "turbo_cache_hit=1" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| - name: Install JDK | ||
| if: env.turbo_cache_hit != 1 | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'zulu' | ||
| java-version: '17' | ||
|
|
||
| - name: Finalize Android SDK | ||
| if: env.turbo_cache_hit != 1 | ||
| run: | | ||
| /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" | ||
|
|
||
| - name: Cache Gradle | ||
| if: env.turbo_cache_hit != 1 | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.gradle/wrapper | ||
| ~/.gradle/caches | ||
| key: ${{ runner.os }}-gradle-old-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-gradle-old- | ||
|
|
||
| - name: Build example for Android (Old Architecture) | ||
| env: | ||
| JAVA_OPTS: '-XX:MaxHeapSize=6g' | ||
| run: | | ||
| yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" | ||
|
|
||
| build-android-new-arch: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
❌ 28 blocking issues (85 total)
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
| } | ||
|
|
||
| @Override | ||
| public void initializeWithApiKey(String apiKey, ReadableMap config, String version, Promise promise) { |
| } | ||
|
|
||
| @Override | ||
| public void initialize2WithApiKey(String apiKey, ReadableMap config, String apiEndPoint, String version, Promise promise) { |
| } | ||
|
|
||
| @Override | ||
| public void trackPushOpen(double campaignId, Double templateId, String messageId, boolean appAlreadyRunning, ReadableMap dataFields) { |
| } | ||
|
|
||
| @Override | ||
| public void trackInAppClose(String messageId, double location, double source, String clickedUrl) { |
Comment on lines
+262
to
+323
| private IterableConfig getIterableConfigFromMap(ReadableMap config) { | ||
| IterableConfig.Builder builder = new IterableConfig.Builder(); | ||
|
|
||
| if (config.hasKey("pushIntegrationName")) { | ||
| builder.setPushIntegrationName(config.getString("pushIntegrationName")); | ||
| } | ||
|
|
||
| if (config.hasKey("autoPushRegistration")) { | ||
| builder.setAutoPushRegistration(config.getBoolean("autoPushRegistration")); | ||
| } | ||
|
|
||
| if (config.hasKey("logLevel")) { | ||
| builder.setLogLevel(config.getInt("logLevel")); | ||
| } | ||
|
|
||
| if (config.hasKey("inAppDisplayInterval")) { | ||
| builder.setInAppDisplayInterval(config.getDouble("inAppDisplayInterval")); | ||
| } | ||
|
|
||
| if (config.hasKey("urlHandler")) { | ||
| ReadableMap urlHandler = config.getMap("urlHandler"); | ||
| builder.setUrlHandler(url -> { | ||
| sendEvent("urlHandler", url); | ||
| return urlHandler.getBoolean("shouldOpenInNewWindow"); | ||
| }); | ||
| } | ||
|
|
||
| if (config.hasKey("customActionHandler")) { | ||
| ReadableMap customActionHandler = config.getMap("customActionHandler"); | ||
| builder.setCustomActionHandler((action, context) -> { | ||
| sendEvent("customActionHandler", action.getType()); | ||
| return customActionHandler.getBoolean("shouldHandleCustomAction"); | ||
| }); | ||
| } | ||
|
|
||
| if (config.hasKey("inAppHandler")) { | ||
| ReadableMap inAppHandler = config.getMap("inAppHandler"); | ||
| builder.setInAppHandler(new IterableConfig.InAppHandler() { | ||
| @Override | ||
| public boolean onInAppReceived(IterableInAppMessage message) { | ||
| sendEvent("inAppReceived", message.getMessageId()); | ||
| return inAppHandler.getBoolean("shouldShowInApp"); | ||
| } | ||
|
|
||
| @Override | ||
| public void onInAppDisplayed(IterableInAppMessage message) { | ||
| sendEvent("inAppDisplayed", message.getMessageId()); | ||
| } | ||
|
|
||
| @Override | ||
| public void onInAppDismissed(IterableInAppMessage message) { | ||
| sendEvent("inAppDismissed", message.getMessageId()); | ||
| } | ||
|
|
||
| @Override | ||
| public void onInAppClicked(IterableInAppMessage message, String clickedUrl) { | ||
| sendEvent("inAppClicked", message.getMessageId()); | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| return builder.build(); |
Comment on lines
+162
to
+164
| height: 300, | ||
| backgroundColor: '#FFFFFF', | ||
| borderRadius: 8, |
There was a problem hiding this comment.
Comment on lines
+166
to
+170
| messageCard: { | ||
| padding: 12, | ||
| backgroundColor: '#F8F8F8', | ||
| borderRadius: 6, | ||
| marginBottom: 8, |
Comment on lines
+167
to
+170
| padding: 12, | ||
| backgroundColor: '#F8F8F8', | ||
| borderRadius: 6, | ||
| marginBottom: 8, |
There was a problem hiding this comment.
Comment on lines
+172
to
+176
| messageTitle: { | ||
| fontSize: 16, | ||
| fontWeight: 'bold', | ||
| color: '#333333', | ||
| marginBottom: 4, |
Comment on lines
+173
to
+175
| fontSize: 16, | ||
| fontWeight: 'bold', | ||
| color: '#333333', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔹 JIRA Ticket(s) if any
✏️ Description