examples/placesuidemo/rn-rename.js
function updatePackageID () {
  return new Promise((resolve) => {
    const oldPackageID = oldInfo.packageID
    const newPackageID = newInfo.packageID
    const androidPath = newInfo.androidPathToModule
    console.log(`Changing package ID from "${oldPackageID}" to "${newPackageID}"...`)

    replaceInFiles(RegExp(`(?=([ "'])).${oldPackageID}(?=[;"'])`), `$1${newPackageID}`, [
      'android/app/BUCK',
      'android/app/build.gradle',
      'android/app/src/main/AndroidManifest.xml',
      `${androidPath}/MainActivity.java`,
      `${androidPath}/MainApplication.java`,
    ])

    console.log('Package ID is updated.\n')
    resolve()
  })
}
function updatePackageID () {
  return new Promise((resolve) => {
    const oldPackageID = oldInfo.packageID
    const newPackageID = newInfo.packageID
    const androidPath = newInfo.androidPathToModule
    console.log(`Changing package ID from "${oldPackageID}" to "${newPackageID}"...`)

    replaceInFiles(RegExp(`(?=([ "'])).${oldPackageID}(?=[;"'])`), `$1${newPackageID}`, [
      'android/app/BUCK',
      'android/app/build.gradle',
      'android/app/src/main/AndroidManifest.xml',
      `${androidPath}/MainActivity.java`,
      `${androidPath}/MainApplication.java`,
    ])

    console.log('Package ID is updated.\n')
    resolve()
  })
}
function updatePackageID ( ) { return new Promise ( ( resolve ) => { const oldPackageID = oldInfo . packageID const newPackageID = newInfo . packageID const androidPath = newInfo . androidPathToModule console . log ( ` ${ oldPackageID } ${ newPackageID } ` ) replaceInFiles ( RegExp ( ` ${ oldPackageID } ` ) , ` ${ newPackageID } ` , [ 'android/app/BUCK' , 'android/app/build.gradle' , 'android/app/src/main/AndroidManifest.xml' , ` ${ androidPath } ` , ` ${ androidPath } ` , ] ) console . log ( 'Package ID is updated.\n' ) resolve ( ) } ) }
Replaces "com.placesuidemo"
Replaces com . placesuidemo