You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: embrace-gradle-plugin/src/main/java/io/embrace/android/gradle/plugin/tasks/reactnative/EmbraceRnSourcemapGeneratorTask.kt
+3-21Lines changed: 3 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,6 @@ import okio.source
15
15
importorg.gradle.api.file.DirectoryProperty
16
16
importorg.gradle.api.file.RegularFileProperty
17
17
importorg.gradle.api.model.ObjectFactory
18
-
importorg.gradle.api.provider.MapProperty
19
-
importorg.gradle.api.tasks.Input
20
18
importorg.gradle.api.tasks.InputFile
21
19
importorg.gradle.api.tasks.Optional
22
20
importorg.gradle.api.tasks.OutputDirectory
@@ -49,23 +47,10 @@ abstract class EmbraceRnSourcemapGeneratorTask @Inject constructor(
49
47
@get:OutputFile
50
48
val sourcemapAndBundleFile:RegularFileProperty= objectFactory.fileProperty()
51
49
52
-
@get:Input
53
-
val reactProperties:MapProperty<String, Any> = objectFactory.mapProperty(
54
-
String::class.java,
55
-
Any::class.java
56
-
).convention(emptyMap())
57
-
58
50
@TaskAction
59
51
funonRun() {
60
-
val rnFilesFinderUtil =RnFilesFinder(
61
-
reactProperties.get(),
62
-
project.layout.buildDirectory.get().asFile
63
-
)
64
-
65
-
val bundleFile = rnFilesFinderUtil.fetchJSBundleFile(
66
-
bundleFile.orNull?.asFile
67
-
)
68
-
if (bundleFile ==null) {
52
+
val bundleFile = bundleFile.orNull?.asFile
53
+
if (bundleFile ==null||!bundleFile.exists()) {
69
54
logger.error("Couldn't find the JSBundle. React native files were not uploaded.")
70
55
return
71
56
}
@@ -76,10 +61,7 @@ abstract class EmbraceRnSourcemapGeneratorTask @Inject constructor(
76
61
* In old React Native Versions, the source map is not exposed as output in the task.
77
62
* If the source map is not present, we will search for it in the known location
78
63
*/
79
-
val sourceMapFile:File?= rnFilesFinderUtil.fetchSourceMapFile(
80
-
sourcemap.orNull?.asFile,
81
-
variantData.get()
82
-
)
64
+
val sourceMapFile:File?= sourcemap.orNull?.asFile
83
65
84
66
if (sourceMapFile ==null||!sourceMapFile.exists()) {
85
67
logger.error("Couldn't find the Source Map. React native files were not uploaded.")
Copy file name to clipboardExpand all lines: embrace-gradle-plugin/src/main/java/io/embrace/android/gradle/plugin/tasks/reactnative/EmbraceRnSourcemapGeneratorTaskRegistration.kt
0 commit comments