Skip to content

Commit 60e75dc

Browse files
motiz88cpojer
authored andcommitted
[Android] Generate source maps outside of assets/ (#25710)
1 parent b1f81be commit 60e75dc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

react.gradle

+7-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ afterEvaluate {
7676
def resourcesDir = file("$buildDir/generated/res/react/${targetPath}")
7777

7878
def jsBundleFile = file("$jsBundleDir/$bundleAssetName")
79-
def jsSourceMapsDir = file("$buildDir/intermediates/sourcemaps/${targetPath}")
80-
def jsPackagerSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.packager.map")
81-
def jsCompilerSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.compiler.map")
82-
def jsOutputSourceMapFile = file("$jsBundleDir/${bundleAssetName}.map")
79+
def jsSourceMapsDir = file("$buildDir/generated/sourcemaps/react/${targetPath}")
80+
def jsIntermediateSourceMapsDir = file("$buildDir/intermediates/sourcemaps/react/${targetPath}")
81+
def jsPackagerSourceMapFile = file("$jsIntermediateSourceMapsDir/${bundleAssetName}.packager.map")
82+
def jsCompilerSourceMapFile = file("$jsIntermediateSourceMapsDir/${bundleAssetName}.compiler.map")
83+
def jsOutputSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.map")
8384

8485
// Additional node and packager commandline arguments
8586
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"]
@@ -99,6 +100,8 @@ afterEvaluate {
99100
jsBundleDir.mkdirs()
100101
resourcesDir.deleteDir()
101102
resourcesDir.mkdirs()
103+
jsIntermediateSourceMapsDir.deleteDir()
104+
jsIntermediateSourceMapsDir.mkdirs()
102105
jsSourceMapsDir.deleteDir()
103106
jsSourceMapsDir.mkdirs()
104107
}

0 commit comments

Comments
 (0)