From 60e75dc1ab73b2893ec2e25c0320f32b3cf12b80 Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 18 Jul 2019 12:22:04 +0100 Subject: [PATCH] [Android] Generate source maps outside of assets/ (#25710) --- react.gradle | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/react.gradle b/react.gradle index 1ae08ddb136..5a2259a7d2f 100644 --- a/react.gradle +++ b/react.gradle @@ -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"] @@ -99,6 +100,8 @@ afterEvaluate { jsBundleDir.mkdirs() resourcesDir.deleteDir() resourcesDir.mkdirs() + jsIntermediateSourceMapsDir.deleteDir() + jsIntermediateSourceMapsDir.mkdirs() jsSourceMapsDir.deleteDir() jsSourceMapsDir.mkdirs() }