Skip to content

Commit

Permalink
[Android] Generate source maps outside of assets/ (#25710)
Browse files Browse the repository at this point in the history
  • Loading branch information
motiz88 authored and cpojer committed Jul 18, 2019
1 parent b1f81be commit 60e75dc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions react.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ afterEvaluate {
def resourcesDir = file("$buildDir/generated/res/react/${targetPath}")

def jsBundleFile = file("$jsBundleDir/$bundleAssetName")
def jsSourceMapsDir = file("$buildDir/intermediates/sourcemaps/${targetPath}")
def jsPackagerSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.packager.map")
def jsCompilerSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.compiler.map")
def jsOutputSourceMapFile = file("$jsBundleDir/${bundleAssetName}.map")
def jsSourceMapsDir = file("$buildDir/generated/sourcemaps/react/${targetPath}")
def jsIntermediateSourceMapsDir = file("$buildDir/intermediates/sourcemaps/react/${targetPath}")
def jsPackagerSourceMapFile = file("$jsIntermediateSourceMapsDir/${bundleAssetName}.packager.map")
def jsCompilerSourceMapFile = file("$jsIntermediateSourceMapsDir/${bundleAssetName}.compiler.map")
def jsOutputSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.map")

// Additional node and packager commandline arguments
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"]
Expand All @@ -99,6 +100,8 @@ afterEvaluate {
jsBundleDir.mkdirs()
resourcesDir.deleteDir()
resourcesDir.mkdirs()
jsIntermediateSourceMapsDir.deleteDir()
jsIntermediateSourceMapsDir.mkdirs()
jsSourceMapsDir.deleteDir()
jsSourceMapsDir.mkdirs()
}
Expand Down

0 comments on commit 60e75dc

Please sign in to comment.