Skip to content

Commit 79e4d9e

Browse files
a7medevHeshamMegid
authored andcommitted
[MOB-12473] Skip Recreating Sourcemaps Gradle Task If It Exists (#991)
1 parent 1be68a4 commit 79e4d9e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [Unreleased](https://github.com/Instabug/Instabug-React-Native/compare/v11.12.0...dev)
4+
5+
### Fixed
6+
7+
- Fix an issue with the Android sourcemaps upload Gradle task getting recreated when both `bundleReleaseJsAndAssets` and `createBundleReleaseJsAndAssets` tasks exist in the same Android project ([#991](https://github.com/Instabug/Instabug-React-Native/pull/991)), closes [#989](https://github.com/Instabug/Instabug-React-Native/issues/989).
8+
39
## [11.12.0](https://github.com/Instabug/Instabug-React-Native/compare/v11.10.0...11.12.0) (May 30, 2023)
410

511
### Changed

android/sourcemaps.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ gradle.projectsEvaluated {
2020

2121
Task createUploadSourcemapsTask(String flavor) {
2222
def name = 'uploadSourcemaps' + flavor.capitalize()
23+
24+
// Don't recreate the task if it already exists.
25+
// This prevents the build from failing in an edge case where the user has
26+
// both `bundleReleaseJsAndAssets` and `createBundleReleaseJsAndAssets`
27+
def taskExists = tasks.getNames().contains(name)
28+
if (taskExists) {
29+
return tasks.named(name).get()
30+
}
31+
2332
def provider = tasks.register(name) {
2433
group 'instabug'
2534
description 'Uploads sourcemaps file to Instabug server'

0 commit comments

Comments
 (0)