Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
- Loading branch information
Showing
10 changed files
with
1,312 additions
and
1,254 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"module:metro-react-native-babel-preset" | ||
], | ||
"plugins": [ | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* replace upload_sourcemap from instabug | ||
* it was too long because it rebundled react-native | ||
*/ | ||
project(':instabug-reactnative') { | ||
tasks.whenTaskAdded { task -> | ||
if (task.name == 'upload_sourcemap') { | ||
task.enabled = false | ||
} | ||
} | ||
} | ||
android.applicationVariants.all { def variant -> | ||
// from ../../node_modules/react-native/react.gradle | ||
def config = project.hasProperty("react") ? project.react : [] | ||
|
||
def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" | ||
|
||
// Create variant and target names | ||
def targetName = variant.name.capitalize() | ||
def targetPath = variant.dirName | ||
|
||
// React js bundle directories | ||
def jsSourceMapsDir = file("$buildDir/generated/sourcemaps/react/${targetPath}") | ||
def jsOutputSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.map") | ||
|
||
|
||
variant.assemble.finalizedBy( | ||
tasks.create(name: "upload${targetName}SourceMap", type: Exec) { | ||
dependsOn "bundle${targetName}JsAndAssets" | ||
description "upload source map to reporter" | ||
environment "INSTABUG_APP_TOKEN", project.env.get("INSTABUG_TOKEN") | ||
environment "JS_OUTPUT_SOURCE_MAP_FILE", jsOutputSourceMapFile | ||
commandLine 'sh', './upload_sourcemap.sh' | ||
} | ||
) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
zip ${JS_OUTPUT_SOURCE_MAP_FILE} ./android-sourcemap.json | ||
curl -X POST 'https://api.instabug.com/api/sdk/v3/symbols_files' -F "symbols_file=@./android-sourcemap.json" -F "application_token=${INSTABUG_APP_TOKEN}" -F "platform=react_native" -F "os=android" |
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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