Skip to content

Commit

Permalink
Give more descriptive name to mobile gutenberg path variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mchowning committed Jun 23, 2020
1 parent 8cda965 commit 0c81acb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/react-native-bridge/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,16 @@ boolean isBundleUpToDate() {

if (buildGutenbergMobileJSBundle) {
def bundleName = 'index.android.bundle'
def jsRootDir = '../../../..'
def mobileGutenbergRootDir = '../../../..'

This comment has been minimized.

Copy link
@cameronvoell

cameronvoell Jun 23, 2020

Member

nice, definitely adds clarity here


task bundleUpToDateCheck {
description("Checks if the inputs to the javascript bundle and the bundle itself are unchanged. \
If they are changed, the isBundleUpToDate flag is switched to false. That flag is used by other tasks.")

def dirs = [jsRootDir]
file(jsRootDir).eachDirRecurse { dir ->
def dirs = [mobileGutenbergRootDir]
file(mobileGutenbergRootDir).eachDirRecurse { dir ->
def isRelevantDir = !['react-native-bridge/android/build/intermediates',
file("$jsRootDir/bundle").absolutePath,
file("$mobileGutenbergRootDir/bundle").absolutePath,
'node_modules'].any { dir.absolutePath.contains(it) } &&
!dir.name.startsWith('symlinked')
if (isRelevantDir) {
Expand Down Expand Up @@ -275,7 +275,7 @@ If they are changed, the isBundleUpToDate flag is switched to false. That flag i
onlyIf { !isBundleUpToDate() }

def origFileName = 'App.js'
def origWithPath = "$jsRootDir/bundle/android/${origFileName}"
def origWithPath = "$mobileGutenbergRootDir/bundle/android/${origFileName}"
from origWithPath
into buildAssetsFolder
rename origFileName, bundleName
Expand All @@ -298,7 +298,7 @@ If they are changed, the isBundleUpToDate flag is switched to false. That flag i
dependsOn bundleUpToDateCheck
onlyIf { !isBundleUpToDate() }

delete "$jsRootDir/node_modules"
delete "$mobileGutenbergRootDir/node_modules"
}

task resetExtractedRNTools(type: Delete) {
Expand Down

0 comments on commit 0c81acb

Please sign in to comment.