Skip to content

[MOB-12070] Disable Sorucemaps Scripts on CI #940

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

Merged
merged 2 commits into from
Mar 12, 2023
Merged
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
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
command: yarn
- android/run-tests:
working-directory: ./example/android
test-command: ./gradlew test
test-command: ./gradlew test -PinstabugUploadEnable=false

validate_shell_files:
machine:
Expand Down Expand Up @@ -110,6 +110,7 @@ jobs:
working_directory: ~/project/example
environment:
FL_OUTPUT_DIR: output
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
steps:
- checkout:
path: ~/project
Expand Down Expand Up @@ -154,6 +155,7 @@ jobs:
working_directory: ~/project
environment:
FL_OUTPUT_DIR: output
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
steps:
- checkout
- run:
Expand Down
7 changes: 5 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ task upload_sourcemap(type: Exec) {
}

tasks.whenTaskAdded { task ->
if (task.name == 'preReleaseBuild' &&
(rootProject.hasProperty("instabugUploadEnable") ? rootProject.instabugUploadEnable : true)) {
def isEnabled = rootProject.hasProperty('instabugUploadEnable')
? new Boolean(rootProject.property('instabugUploadEnable'))
: true

if (task.name == 'preReleaseBuild' && isEnabled) {
task.dependsOn upload_sourcemap
}
}
2 changes: 1 addition & 1 deletion example/.detoxrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"android.emu.release": {
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release -PinstabugUploadEnable=false && cd ..",
"type": "android.emulator",
"name": "Nexus_6P_API_27"
}
Expand Down