@callstack/react-native-brownfield 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gradle-plugin/brownfield/config/detekt/detekt.yml +1 -1
- package/gradle-plugin/brownfield/gradle.properties +1 -1
- package/gradle-plugin/brownfield/gradlew +0 -0
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/utils/LocalMavenUtils.kt +2 -5
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/ProjectConfigurations.kt +3 -5
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNBrownfieldPlugin.kt +21 -26
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNSourceSets.kt +23 -35
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/AssetTaskProcessor.kt +4 -16
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/ExplodeTaskProvider.kt +6 -7
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/JNILibsProcessor.kt +133 -108
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/ManifestTaskProcessor.kt +25 -61
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/MergeProcessor.kt +7 -29
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/ProguardProcessor.kt +9 -46
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/ResourceTaskProcessor.kt +4 -13
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/VariantHelper.kt +52 -47
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/VariantTaskProvider.kt +31 -63
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/BundleTaskProvider.kt +72 -27
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/Constants.kt +0 -1
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/ExplodeAarTask.kt +2 -20
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/Logging.kt +1 -1
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/MergeClassesTask.kt +70 -0
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/MergeLibraryManifestTask.kt +178 -0
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/AndroidArchiveLibrary.kt +0 -4
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/DirectoryManager.kt +0 -5
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/Extension.kt +8 -9
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/Utils.kt +2 -34
- package/lib/commonjs/expo-config-plugin/android/utils/constants.js +1 -1
- package/lib/commonjs/expo-config-plugin/android/utils/formatHelpers.js +2 -0
- package/lib/commonjs/expo-config-plugin/android/utils/formatHelpers.js.map +1 -0
- package/lib/commonjs/expo-config-plugin/android/utils/gradleHelpers.js +1 -1
- package/lib/commonjs/expo-config-plugin/android/utils/gradleHelpers.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/android/withAndroidModuleFiles.js +1 -1
- package/lib/commonjs/expo-config-plugin/android/withAndroidModuleFiles.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/android/withBrownfieldAndroid.js +1 -1
- package/lib/commonjs/expo-config-plugin/android/withBrownfieldAndroid.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/template/android/build.gradle.kts +6 -0
- package/lib/commonjs/scripts/brownfield.js +0 -0
- package/lib/module/expo-config-plugin/android/utils/constants.js +1 -1
- package/lib/module/expo-config-plugin/android/utils/formatHelpers.js +2 -0
- package/lib/module/expo-config-plugin/android/utils/formatHelpers.js.map +1 -0
- package/lib/module/expo-config-plugin/android/utils/gradleHelpers.js +1 -1
- package/lib/module/expo-config-plugin/android/utils/gradleHelpers.js.map +1 -1
- package/lib/module/expo-config-plugin/android/withAndroidModuleFiles.js +1 -1
- package/lib/module/expo-config-plugin/android/withAndroidModuleFiles.js.map +1 -1
- package/lib/module/expo-config-plugin/android/withBrownfieldAndroid.js +1 -1
- package/lib/module/expo-config-plugin/android/withBrownfieldAndroid.js.map +1 -1
- package/lib/module/expo-config-plugin/template/android/build.gradle.kts +6 -0
- package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/constants.d.ts +2 -2
- package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/formatHelpers.d.ts +2 -0
- package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/formatHelpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/gradleHelpers.d.ts +7 -0
- package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/gradleHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/android/withBrownfieldAndroid.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts +5 -0
- package/lib/typescript/commonjs/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/android/utils/constants.d.ts +2 -2
- package/lib/typescript/module/src/expo-config-plugin/android/utils/formatHelpers.d.ts +2 -0
- package/lib/typescript/module/src/expo-config-plugin/android/utils/formatHelpers.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-config-plugin/android/utils/gradleHelpers.d.ts +7 -0
- package/lib/typescript/module/src/expo-config-plugin/android/utils/gradleHelpers.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/android/withBrownfieldAndroid.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts +5 -0
- package/lib/typescript/module/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/expo-config-plugin/android/utils/constants.ts +1 -1
- package/src/expo-config-plugin/android/utils/formatHelpers.ts +7 -0
- package/src/expo-config-plugin/android/utils/gradleHelpers.ts +41 -0
- package/src/expo-config-plugin/android/withAndroidModuleFiles.ts +20 -0
- package/src/expo-config-plugin/android/withBrownfieldAndroid.ts +16 -3
- package/src/expo-config-plugin/template/android/build.gradle.kts +6 -0
- package/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts +6 -0
- package/CHANGELOG.md +0 -300
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.modifyRootBuildGradle=modifyRootBuildGradle;exports.modifySettingsGradle=modifySettingsGradle;var _constants=require("./constants");var _logging=require("../../logging");var LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD='includeBuild("../node_modules/@callstack/react-native-brownfield/gradle-plugin/brownfield")';function modifyRootBuildGradle(contents){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref$useLocalGradlePl=_ref.useLocalGradlePlugin,useLocalGradlePlugin=_ref$useLocalGradlePl===void 0?false:_ref$useLocalGradlePl;if(useLocalGradlePlugin){_logging.Logger.logDebug('Skipping Maven Brownfield Gradle plugin classpath because useLocalGradlePlugin is enabled');return contents;}if(contents.includes('brownfield-gradle-plugin')){_logging.Logger.logDebug('Brownfield Gradle plugin already in root build.gradle, skipping');return contents;}_logging.Logger.logDebug(`Modifying root build.gradle to add the Gradle Brownfield plugin`);var buildscriptDepsRegex=/(buildscript\s*\{[\s\S]*?dependencies\s*\{[\s\S]*?)(})/m;var match=contents.match(buildscriptDepsRegex);if(!match){throw new Error('Could not locate buildscript block in root build.gradle');}var insertion=`\t${_constants.brownfieldGradlePluginDependency}\n\t`;var modifiedContents=contents.replace(buildscriptDepsRegex,`$1${insertion}$2`);_logging.Logger.logDebug('Added Brownfield Gradle plugin to root build.gradle');return modifiedContents;}function addLocalGradlePluginIncludeBuild(contents){if(contents.includes('gradle-plugin/brownfield')){_logging.Logger.logDebug('Local Brownfield Gradle plugin includeBuild already present, skipping');return contents;}_logging.Logger.logDebug('Modifying settings.gradle to include local Brownfield Gradle plugin');var pluginManagementMatch=contents.match(/pluginManagement\s*\{/);if((pluginManagementMatch==null?void 0:pluginManagementMatch.index)!==undefined){var insertIndex=pluginManagementMatch.index+pluginManagementMatch[0].length;var insertion=`\n\t${LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD}`;return contents.slice(0,insertIndex)+insertion+contents.slice(insertIndex);}return`pluginManagement {\n\t${LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD}\n}\n\n${contents}`;}function modifySettingsGradle(contents,moduleName){var _ref2=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},_ref2$useLocalGradleP=_ref2.useLocalGradlePlugin,useLocalGradlePlugin=_ref2$useLocalGradleP===void 0?false:_ref2$useLocalGradleP;var modifiedContents=contents;if(useLocalGradlePlugin){modifiedContents=addLocalGradlePluginIncludeBuild(modifiedContents);}var includeStatement=`include ':${moduleName}'`;if(modifiedContents.includes(includeStatement)){_logging.Logger.logDebug(`Module "${moduleName}" already in settings.gradle, skipping`);return modifiedContents;}_logging.Logger.logDebug(`Modifying settings.gradle to include module "${moduleName}"`);modifiedContents=modifiedContents+`\n${includeStatement}\n`;_logging.Logger.logDebug(`Added module "${moduleName}" to settings.gradle`);return modifiedContents;}
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.modifyAppBuildGradleMissingDimensionStrategy=modifyAppBuildGradleMissingDimensionStrategy;exports.modifyRootBuildGradle=modifyRootBuildGradle;exports.modifySettingsGradle=modifySettingsGradle;var _constants=require("./constants");var _logging=require("../../logging");var _formatHelpers=require("./formatHelpers");var LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD='includeBuild("../node_modules/@callstack/react-native-brownfield/gradle-plugin/brownfield")';function modifyRootBuildGradle(contents){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref$useLocalGradlePl=_ref.useLocalGradlePlugin,useLocalGradlePlugin=_ref$useLocalGradlePl===void 0?false:_ref$useLocalGradlePl;if(useLocalGradlePlugin){_logging.Logger.logDebug('Skipping Maven Brownfield Gradle plugin classpath because useLocalGradlePlugin is enabled');return contents;}if(contents.includes('brownfield-gradle-plugin')){_logging.Logger.logDebug('Brownfield Gradle plugin already in root build.gradle, skipping');return contents;}_logging.Logger.logDebug(`Modifying root build.gradle to add the Gradle Brownfield plugin`);var buildscriptDepsRegex=/(buildscript\s*\{[\s\S]*?dependencies\s*\{[\s\S]*?)(})/m;var match=contents.match(buildscriptDepsRegex);if(!match){throw new Error('Could not locate buildscript block in root build.gradle');}var insertion=`\t${_constants.brownfieldGradlePluginDependency}\n\t`;var modifiedContents=contents.replace(buildscriptDepsRegex,`$1${insertion}$2`);_logging.Logger.logDebug('Added Brownfield Gradle plugin to root build.gradle');return modifiedContents;}function modifyAppBuildGradleMissingDimensionStrategy(contents,missingDimensionStrategies){var _match$1$match$,_match$1$match;if(missingDimensionStrategies.length<2){return contents;}_logging.Logger.logDebug('Modifying app build.gradle to add missingDimensionStrategy');var defaultConfigRegex=/^([ \t]*defaultConfig\s*\{)/m;var match=contents.match(defaultConfigRegex);if(!match){throw new Error('Could not locate defaultConfig block in app build.gradle');}var baseIndent=(_match$1$match$=(_match$1$match=match[1].match(/^[ \t]*/))==null?void 0:_match$1$match[0])!=null?_match$1$match$:'';var indentUnit=baseIndent.includes('\t')?'\t':' ';var args=(0,_formatHelpers.formatMissingDimensionStrategies)(missingDimensionStrategies);var missingStrategyLine=`missingDimensionStrategy(${args})`;if(contents.includes(missingStrategyLine)){_logging.Logger.logDebug('missingDimensionStrategy already present with same arguments, skipping');return contents;}var insertion=`\n${baseIndent}${indentUnit}${missingStrategyLine}`;return contents.replace(defaultConfigRegex,`$1${insertion}`);}function addLocalGradlePluginIncludeBuild(contents){if(contents.includes('gradle-plugin/brownfield')){_logging.Logger.logDebug('Local Brownfield Gradle plugin includeBuild already present, skipping');return contents;}_logging.Logger.logDebug('Modifying settings.gradle to include local Brownfield Gradle plugin');var pluginManagementMatch=contents.match(/pluginManagement\s*\{/);if((pluginManagementMatch==null?void 0:pluginManagementMatch.index)!==undefined){var insertIndex=pluginManagementMatch.index+pluginManagementMatch[0].length;var insertion=`\n\t${LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD}`;return contents.slice(0,insertIndex)+insertion+contents.slice(insertIndex);}return`pluginManagement {\n\t${LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD}\n}\n\n${contents}`;}function modifySettingsGradle(contents,moduleName){var _ref2=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},_ref2$useLocalGradleP=_ref2.useLocalGradlePlugin,useLocalGradlePlugin=_ref2$useLocalGradleP===void 0?false:_ref2$useLocalGradleP;var modifiedContents=contents;if(useLocalGradlePlugin){modifiedContents=addLocalGradlePluginIncludeBuild(modifiedContents);}var includeStatement=`include ':${moduleName}'`;if(modifiedContents.includes(includeStatement)){_logging.Logger.logDebug(`Module "${moduleName}" already in settings.gradle, skipping`);return modifiedContents;}_logging.Logger.logDebug(`Modifying settings.gradle to include module "${moduleName}"`);modifiedContents=modifiedContents+`\n${includeStatement}\n`;_logging.Logger.logDebug(`Added module "${moduleName}" to settings.gradle`);return modifiedContents;}
|
|
2
2
|
//# sourceMappingURL=gradleHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_logging","LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD","modifyRootBuildGradle","contents","_ref","arguments","length","undefined","_ref$useLocalGradlePl","useLocalGradlePlugin","Logger","logDebug","includes","buildscriptDepsRegex","match","Error","insertion","brownfieldGradlePluginDependency","modifiedContents","replace","addLocalGradlePluginIncludeBuild","pluginManagementMatch","index","insertIndex","slice","modifySettingsGradle","moduleName","_ref2","_ref2$useLocalGradleP","includeStatement"],"sourceRoot":"../../../../../src","sources":["expo-config-plugin/android/utils/gradleHelpers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_constants","require","_logging","_formatHelpers","LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD","modifyRootBuildGradle","contents","_ref","arguments","length","undefined","_ref$useLocalGradlePl","useLocalGradlePlugin","Logger","logDebug","includes","buildscriptDepsRegex","match","Error","insertion","brownfieldGradlePluginDependency","modifiedContents","replace","modifyAppBuildGradleMissingDimensionStrategy","missingDimensionStrategies","_match$1$match$","_match$1$match","defaultConfigRegex","baseIndent","indentUnit","args","formatMissingDimensionStrategies","missingStrategyLine","addLocalGradlePluginIncludeBuild","pluginManagementMatch","index","insertIndex","slice","modifySettingsGradle","moduleName","_ref2","_ref2$useLocalGradleP","includeStatement"],"sourceRoot":"../../../../../src","sources":["expo-config-plugin/android/utils/gradleHelpers.ts"],"mappings":"iQAAA,IAAAA,UAAA,CAAAC,OAAA,gBACA,IAAAC,QAAA,CAAAD,OAAA,kBACA,IAAAE,cAAA,CAAAF,OAAA,oBAEA,GAAM,CAAAG,iCAAiC,CACrC,6FAA6F,CAWxF,QAAS,CAAAC,qBAAqBA,CACnCC,QAAgB,CAER,KAAAC,IAAA,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IADsD,CAAC,CAAC,CAAAG,qBAAA,CAAAJ,IAAA,CAA9DK,oBAAoB,CAApBA,oBAAoB,CAAAD,qBAAA,UAAG,KAAK,CAAAA,qBAAA,CAE9B,GAAIC,oBAAoB,CAAE,CACxBC,eAAM,CAACC,QAAQ,CACb,2FACF,CAAC,CACD,MAAO,CAAAR,QAAQ,CACjB,CAGA,GAAIA,QAAQ,CAACS,QAAQ,CAAC,0BAA0B,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BAAoBA,CAClChC,QAAgB,CAChBiC,UAAkB,CAEV,KAAAC,KAAA,CAAAhC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IADsD,CAAC,CAAC,CAAAiC,qBAAA,CAAAD,KAAA,CAA9D5B,oBAAoB,CAApBA,oBAAoB,CAAA6B,qBAAA,UAAG,KAAK,CAAAA,qBAAA,CAE9B,GAAI,CAAApB,gBAAgB,CAAGf,QAAQ,CAE/B,GAAIM,oBAAoB,CAAE,CACxBS,gBAAgB,CAAGY,gCAAgC,CAACZ,gBAAgB,CAAC,CACvE,CAEA,GAAM,CAAAqB,gBAAgB,CAAG,aAAaH,UAAU,GAAG,CAGnD,GAAIlB,gBAAgB,CAACN,QAAQ,CAAC2B,gBAAgB,CAAC,CAAE,CAC/C7B,eAAM,CAACC,QAAQ,CACb,WAAWyB,UAAU,wCACvB,CAAC,CACD,MAAO,CAAAlB,gBAAgB,CACzB,CAEAR,eAAM,CAACC,QAAQ,CACb,gDAAgDyB,UAAU,GAC5D,CAAC,CAGDlB,gBAAgB,CAAGA,gBAAgB,CAAG,KAAKqB,gBAAgB,IAAI,CAE/D7B,eAAM,CAACC,QAAQ,CAAC,iBAAiByB,UAAU,sBAAsB,CAAC,CAElE,MAAO,CAAAlB,gBAAgB,CACzB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.createAndroidModule=createAndroidModule;exports.resolveCompileSdkVersionExpression=resolveCompileSdkVersionExpression;exports.resolveTargetSdkVersionExpression=resolveTargetSdkVersionExpression;exports.syncAndroidModuleExpoUpdatesFromAppFiles=syncAndroidModuleExpoUpdatesFromAppFiles;exports.syncAndroidModuleManifest=syncAndroidModuleManifest;exports.syncAndroidModuleStringResources=syncAndroidModuleStringResources;exports.withAndroidModuleFiles=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var fs=_interopRequireWildcard(require("node:fs"));var path=_interopRequireWildcard(require("node:path"));var _configPlugins=require("@expo/config-plugins");var _logging=require("../logging");var _engine=require("../template/engine");var _androidManifest=require("./utils/androidManifest");var _expoUpdates=require("./utils/expo-updates");var _hermes=require("./utils/hermes");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function resolveCompileSdkVersionExpression(config){if(config.android.compileSdkVersion!=null){return config.android.compileSdkVersion.toString();}return'resolveRootProjectInt("compileSdkVersion")';}function resolveTargetSdkVersionExpression(config){if(config.android.targetSdkVersion!=null){return config.android.targetSdkVersion.toString();}return'resolveRootProjectInt("targetSdkVersion")';}function createAndroidModule(_ref){var androidDir=_ref.androidDir,config=_ref.config,rnVersion=_ref.rnVersion,projectRoot=_ref.projectRoot;var android=config.android;var moduleDir=path.join(androidDir,android.moduleName);_logging.Logger.logDebug(`Creating Android module in: ${androidDir}`);var hermesArtifact=(0,_hermes.getHermesArtifact)(rnVersion,projectRoot);var compileSdkVersionExpression=resolveCompileSdkVersionExpression(config);var targetSdkVersionExpression=resolveTargetSdkVersionExpression(config);_logging.Logger.logDebug(`Resolved Hermes artifact: ${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`);var files=[{relativePath:'build.gradle.kts',content:(0,_engine.renderTemplate)('android','build.gradle.kts',{'{{PACKAGE_NAME}}':android.packageName,'{{MIN_SDK_VERSION}}':android.minSdkVersion.toString(),'{{TARGET_SDK_VERSION}}':targetSdkVersionExpression,'{{COMPILE_SDK_VERSION}}':compileSdkVersionExpression,'{{GROUP_ID}}':android.groupId,'{{ARTIFACT_ID}}':android.artifactId,'{{ARTIFACT_VERSION}}':android.version,'{{RN_VERSION}}':rnVersion,'{{HERMES_ARTIFACT}}':`${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.createAndroidModule=createAndroidModule;exports.resolveCompileSdkVersionExpression=resolveCompileSdkVersionExpression;exports.resolveTargetSdkVersionExpression=resolveTargetSdkVersionExpression;exports.syncAndroidModuleExpoUpdatesFromAppFiles=syncAndroidModuleExpoUpdatesFromAppFiles;exports.syncAndroidModuleManifest=syncAndroidModuleManifest;exports.syncAndroidModuleStringResources=syncAndroidModuleStringResources;exports.withAndroidModuleFiles=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var fs=_interopRequireWildcard(require("node:fs"));var path=_interopRequireWildcard(require("node:path"));var _configPlugins=require("@expo/config-plugins");var _logging=require("../logging");var _engine=require("../template/engine");var _androidManifest=require("./utils/androidManifest");var _expoUpdates=require("./utils/expo-updates");var _hermes=require("./utils/hermes");var _formatHelpers=require("./utils/formatHelpers");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function renderMissingDimensionStrategyBlock(missingDimensionStrategies){if(missingDimensionStrategies.length<2){return'';}var args=(0,_formatHelpers.formatMissingDimensionStrategies)(missingDimensionStrategies);return` missingDimensionStrategy(${args})`;}function resolveCompileSdkVersionExpression(config){if(config.android.compileSdkVersion!=null){return config.android.compileSdkVersion.toString();}return'resolveRootProjectInt("compileSdkVersion")';}function resolveTargetSdkVersionExpression(config){if(config.android.targetSdkVersion!=null){return config.android.targetSdkVersion.toString();}return'resolveRootProjectInt("targetSdkVersion")';}function createAndroidModule(_ref){var androidDir=_ref.androidDir,config=_ref.config,rnVersion=_ref.rnVersion,projectRoot=_ref.projectRoot;var android=config.android;var moduleDir=path.join(androidDir,android.moduleName);_logging.Logger.logDebug(`Creating Android module in: ${androidDir}`);var hermesArtifact=(0,_hermes.getHermesArtifact)(rnVersion,projectRoot);var compileSdkVersionExpression=resolveCompileSdkVersionExpression(config);var targetSdkVersionExpression=resolveTargetSdkVersionExpression(config);_logging.Logger.logDebug(`Resolved Hermes artifact: ${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`);var missingDimensionStrategiesList=(0,_formatHelpers.formatMissingDimensionStrategies)(android.missingDimensionStrategies);var missingDimensionStrategyBlock=renderMissingDimensionStrategyBlock(android.missingDimensionStrategies);var files=[{relativePath:'build.gradle.kts',content:(0,_engine.renderTemplate)('android','build.gradle.kts',{'{{PACKAGE_NAME}}':android.packageName,'{{MIN_SDK_VERSION}}':android.minSdkVersion.toString(),'{{TARGET_SDK_VERSION}}':targetSdkVersionExpression,'{{COMPILE_SDK_VERSION}}':compileSdkVersionExpression,'{{GROUP_ID}}':android.groupId,'{{ARTIFACT_ID}}':android.artifactId,'{{ARTIFACT_VERSION}}':android.version,'{{RN_VERSION}}':rnVersion,'{{HERMES_ARTIFACT}}':`${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`,'{{MISSING_DIMENSION_STRATEGIES}}':missingDimensionStrategiesList,'{{MISSING_DIMENSION_STRATEGY_BLOCK}}':missingDimensionStrategyBlock})},{relativePath:'gradle.properties',content:(0,_engine.renderTemplate)('android','gradle.properties',{})},{relativePath:`src/main/java/${config.android.packageName.replace(/\./g,'/')}/ReactNativeHostManager.kt`,content:(0,_engine.renderTemplate)('android','ReactNativeHostManager.post55.kt',{'{{PACKAGE_NAME}}':android.packageName})},{relativePath:'consumer-rules.pro',content:(0,_engine.renderTemplate)('android','consumer-rules.pro',{})},{relativePath:'proguard-rules.pro',content:(0,_engine.renderTemplate)('android','proguard-rules.pro',{})}];for(var file of files){var filePath=path.join(moduleDir,file.relativePath);var fileDir=path.dirname(filePath);if(!fs.existsSync(fileDir)){fs.mkdirSync(fileDir,{recursive:true});}fs.writeFileSync(filePath,file.content,'utf8');_logging.Logger.logDebug(`Created file: ${filePath}`);}syncAndroidModuleExpoUpdatesFromAppFiles({androidDir:androidDir,config:config});_logging.Logger.logDebug(`Android module "${android.moduleName}" created at ${moduleDir}`);}function syncAndroidModuleManifest(_ref2){var androidDir=_ref2.androidDir,config=_ref2.config,expoUpdatesMetaData=_ref2.expoUpdatesMetaData;writeAndroidModuleFile(path.join(androidDir,config.android.moduleName),'src/main/AndroidManifest.xml',(0,_engine.renderTemplate)('android','AndroidManifest.xml',{'{{APPLICATION_BLOCK}}':(0,_androidManifest.renderLibraryManifestApplication)(expoUpdatesMetaData)}));}function syncAndroidModuleStringResources(_ref3){var androidDir=_ref3.androidDir,config=_ref3.config,expoUpdatesStringResources=_ref3.expoUpdatesStringResources;writeAndroidModuleFile(path.join(androidDir,config.android.moduleName),'src/main/res/values/strings.xml',(0,_engine.renderTemplate)('android','strings.xml',{'{{STRING_RESOURCES}}':(0,_androidManifest.renderLibraryStringResources)(expoUpdatesStringResources)}));}function writeAndroidModuleFile(moduleDir,relativePath,content){var filePath=path.join(moduleDir,relativePath);var fileDir=path.dirname(filePath);if(!fs.existsSync(fileDir)){fs.mkdirSync(fileDir,{recursive:true});}fs.writeFileSync(filePath,content,'utf8');_logging.Logger.logDebug(`Created file: ${filePath}`);}function syncAndroidModuleExpoUpdatesFromAppFiles(_ref4){var androidDir=_ref4.androidDir,config=_ref4.config;var appModuleName='app';var expoUpdatesMetaData=(0,_expoUpdates.readExpoUpdatesApplicationMetaData)(androidDir,appModuleName);var expoUpdatesStringResources=(0,_expoUpdates.readExpoUpdatesStringResources)(androidDir,appModuleName,expoUpdatesMetaData);syncAndroidModuleManifest({androidDir:androidDir,config:config,expoUpdatesMetaData:expoUpdatesMetaData});syncAndroidModuleStringResources({androidDir:androidDir,config:config,expoUpdatesStringResources:expoUpdatesStringResources});}var withAndroidModuleFiles=exports.withAndroidModuleFiles=function withAndroidModuleFiles(config,props){return(0,_configPlugins.withDangerousMod)(config,['android',(function(){var _ref5=(0,_asyncToGenerator2.default)(function*(dangerousConfig){var androidDir=path.join(dangerousConfig.modRequest.projectRoot,'android');var rnVersion;try{var rnPkgPath=require.resolve('react-native/package.json',{paths:[dangerousConfig.modRequest.projectRoot]});var rnPkg=require(rnPkgPath);rnVersion=rnPkg.version;_logging.Logger.logDebug(`Resolved react-native version: ${rnVersion}`);}catch(_unused){throw new Error('Could not resolve react-native package version. Please ensure you have installed dependencies.');}createAndroidModule({androidDir:androidDir,config:props,rnVersion:rnVersion,projectRoot:dangerousConfig.modRequest.projectRoot});return dangerousConfig;});return function(_x){return _ref5.apply(this,arguments);};}())]);};
|
|
2
2
|
//# sourceMappingURL=withAndroidModuleFiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fs","_interopRequireWildcard","require","path","_configPlugins","_logging","_engine","_androidManifest","_expoUpdates","_hermes","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","resolveCompileSdkVersionExpression","config","android","compileSdkVersion","toString","resolveTargetSdkVersionExpression","targetSdkVersion","createAndroidModule","_ref","androidDir","rnVersion","projectRoot","moduleDir","join","moduleName","Logger","logDebug","hermesArtifact","getHermesArtifact","compileSdkVersionExpression","targetSdkVersionExpression","groupId","artifactId","version","files","relativePath","content","renderTemplate","packageName","minSdkVersion","replace","file","filePath","fileDir","dirname","existsSync","mkdirSync","recursive","writeFileSync","syncAndroidModuleExpoUpdatesFromAppFiles","syncAndroidModuleManifest","_ref2","expoUpdatesMetaData","writeAndroidModuleFile","renderLibraryManifestApplication","syncAndroidModuleStringResources","_ref3","expoUpdatesStringResources","renderLibraryStringResources","_ref4","appModuleName","readExpoUpdatesApplicationMetaData","readExpoUpdatesStringResources","withAndroidModuleFiles","exports","props","withDangerousMod","_ref5","_asyncToGenerator2","dangerousConfig","modRequest","rnPkgPath","resolve","paths","rnPkg","_unused","Error","_x","apply","arguments"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withAndroidModuleFiles.ts"],"mappings":"8rBAAA,IAAAA,EAAA,CAAAC,uBAAA,CAAAC,OAAA,aACA,IAAAC,IAAA,CAAAF,uBAAA,CAAAC,OAAA,eAEA,IAAAE,cAAA,CAAAF,OAAA,yBAMA,IAAAG,QAAA,CAAAH,OAAA,eACA,IAAAI,OAAA,CAAAJ,OAAA,uBACA,IAAAK,gBAAA,CAAAL,OAAA,4BAMA,IAAAM,YAAA,CAAAN,OAAA,yBAIA,IAAAO,OAAA,CAAAP,OAAA,
|
|
1
|
+
{"version":3,"names":["fs","_interopRequireWildcard","require","path","_configPlugins","_logging","_engine","_androidManifest","_expoUpdates","_hermes","_formatHelpers","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","renderMissingDimensionStrategyBlock","missingDimensionStrategies","length","args","formatMissingDimensionStrategies","resolveCompileSdkVersionExpression","config","android","compileSdkVersion","toString","resolveTargetSdkVersionExpression","targetSdkVersion","createAndroidModule","_ref","androidDir","rnVersion","projectRoot","moduleDir","join","moduleName","Logger","logDebug","hermesArtifact","getHermesArtifact","compileSdkVersionExpression","targetSdkVersionExpression","groupId","artifactId","version","missingDimensionStrategiesList","missingDimensionStrategyBlock","files","relativePath","content","renderTemplate","packageName","minSdkVersion","replace","file","filePath","fileDir","dirname","existsSync","mkdirSync","recursive","writeFileSync","syncAndroidModuleExpoUpdatesFromAppFiles","syncAndroidModuleManifest","_ref2","expoUpdatesMetaData","writeAndroidModuleFile","renderLibraryManifestApplication","syncAndroidModuleStringResources","_ref3","expoUpdatesStringResources","renderLibraryStringResources","_ref4","appModuleName","readExpoUpdatesApplicationMetaData","readExpoUpdatesStringResources","withAndroidModuleFiles","exports","props","withDangerousMod","_ref5","_asyncToGenerator2","dangerousConfig","modRequest","rnPkgPath","resolve","paths","rnPkg","_unused","Error","_x","apply","arguments"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withAndroidModuleFiles.ts"],"mappings":"8rBAAA,IAAAA,EAAA,CAAAC,uBAAA,CAAAC,OAAA,aACA,IAAAC,IAAA,CAAAF,uBAAA,CAAAC,OAAA,eAEA,IAAAE,cAAA,CAAAF,OAAA,yBAMA,IAAAG,QAAA,CAAAH,OAAA,eACA,IAAAI,OAAA,CAAAJ,OAAA,uBACA,IAAAK,gBAAA,CAAAL,OAAA,4BAMA,IAAAM,YAAA,CAAAN,OAAA,yBAIA,IAAAO,OAAA,CAAAP,OAAA,mBACA,IAAAQ,cAAA,CAAAR,OAAA,0BAAyE,SAAAD,wBAAAU,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAZ,uBAAA,UAAAA,wBAAAU,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,K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BAAA,CAAG,QAFS,CAAAA,sBAEZA,CAAItD,MAAM,CAAEwD,KAAK,CAAK,CACrB,MAAO,GAAAC,+BAAgB,EAACzD,MAAM,CAAE,CAC9B,SAAS,iBAAA0D,KAAA,IAAAC,kBAAA,CAAA3E,OAAA,EACT,UAAO4E,eAAe,CAAK,CACzB,GAAM,CAAApD,UAAU,CAAG1C,IAAI,CAAC8C,IAAI,CAC1BgD,eAAe,CAACC,UAAU,CAACnD,WAAW,CACtC,SACF,CAAC,CAED,GAAI,CAAAD,SAAiB,CACrB,GAAI,CACF,GAAM,CAAAqD,SAAS,CAAGjG,OAAO,CAACkG,OAAO,CAAC,2BAA2B,CAAE,CAC7DC,KAAK,CAAE,CAACJ,eAAe,CAACC,UAAU,CAACnD,WAAW,CAChD,CAAC,CAAC,CAEF,GAAM,CAAAuD,KAAK,CAAGpG,OAAO,CAACiG,SAAS,CAAC,CAEhCrD,SAAS,CAAGwD,KAAK,CAAC3C,OAAO,CAEzBR,eAAM,CAACC,QAAQ,CAAC,kCAAkCN,SAAS,EAAE,CAAC,CAChE,CAAE,MAAAyD,OAAA,CAAM,CACN,KAAM,IAAI,CAAAC,KAAK,CACb,gGACF,CAAC,CACH,CAEA7D,mBAAmB,CAAC,CAClBE,UAAU,CAAVA,UAAU,CACVR,MAAM,CAAEwD,KAAK,CACb/C,SAAS,CAATA,SAAS,CACTC,WAAW,CAAEkD,eAAe,CAACC,UAAU,CAACnD,WAC1C,CAAC,CAAC,CAEF,MAAO,CAAAkD,eAAe,CACxB,CAAC,kBAAAQ,EAAA,SAAAV,KAAA,CAAAW,KAAA,MAAAC,SAAA,SACF,CAAC,CACJ,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldAndroid=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _configPlugins=require("@expo/config-plugins");var _gradleHelpers=require("./utils/gradleHelpers");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var withBrownfieldAndroid=exports.withBrownfieldAndroid=function withBrownfieldAndroid(config,props){var androidConfig=props.android;config=(0,_configPlugins.withProjectBuildGradle)(config,function(gradleConfig){gradleConfig.modResults.contents=(0,_gradleHelpers.modifyRootBuildGradle)(gradleConfig.modResults.contents,{useLocalGradlePlugin:androidConfig.useLocalGradlePlugin});return gradleConfig;});config=(0,_configPlugins.withSettingsGradle)(config,function(settingsConfig){settingsConfig.modResults.contents=(0,_gradleHelpers.modifySettingsGradle)(settingsConfig.modResults.contents,androidConfig.moduleName,{useLocalGradlePlugin:androidConfig.useLocalGradlePlugin});return settingsConfig;});config=(0,_withAndroidModuleFiles.withAndroidModuleFiles)(config,props);config=(0,_configPlugins.withFinalizedMod)(config,['android',(function(){var _ref=(0,_asyncToGenerator2.default)(function*(finalizedConfig){(0,_withAndroidModuleFiles.syncAndroidModuleExpoUpdatesFromAppFiles)({androidDir:finalizedConfig.modRequest.platformProjectRoot,config:props});return finalizedConfig;});return function(_x){return _ref.apply(this,arguments);};}())]);return config;};
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldAndroid=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _configPlugins=require("@expo/config-plugins");var _gradleHelpers=require("./utils/gradleHelpers");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var withBrownfieldAndroid=exports.withBrownfieldAndroid=function withBrownfieldAndroid(config,props){var androidConfig=props.android;config=(0,_configPlugins.withProjectBuildGradle)(config,function(gradleConfig){gradleConfig.modResults.contents=(0,_gradleHelpers.modifyRootBuildGradle)(gradleConfig.modResults.contents,{useLocalGradlePlugin:androidConfig.useLocalGradlePlugin});return gradleConfig;});config=(0,_configPlugins.withAppBuildGradle)(config,function(gradleConfig){gradleConfig.modResults.contents=(0,_gradleHelpers.modifyAppBuildGradleMissingDimensionStrategy)(gradleConfig.modResults.contents,androidConfig.missingDimensionStrategies);return gradleConfig;});config=(0,_configPlugins.withSettingsGradle)(config,function(settingsConfig){settingsConfig.modResults.contents=(0,_gradleHelpers.modifySettingsGradle)(settingsConfig.modResults.contents,androidConfig.moduleName,{useLocalGradlePlugin:androidConfig.useLocalGradlePlugin});return settingsConfig;});config=(0,_withAndroidModuleFiles.withAndroidModuleFiles)(config,props);config=(0,_configPlugins.withFinalizedMod)(config,['android',(function(){var _ref=(0,_asyncToGenerator2.default)(function*(finalizedConfig){(0,_withAndroidModuleFiles.syncAndroidModuleExpoUpdatesFromAppFiles)({androidDir:finalizedConfig.modRequest.platformProjectRoot,config:props});return finalizedConfig;});return function(_x){return _ref.apply(this,arguments);};}())]);return config;};
|
|
2
2
|
//# sourceMappingURL=withBrownfieldAndroid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_configPlugins","require","_gradleHelpers","_withAndroidModuleFiles","withBrownfieldAndroid","exports","config","props","androidConfig","android","withProjectBuildGradle","gradleConfig","modResults","contents","modifyRootBuildGradle","useLocalGradlePlugin","withSettingsGradle","settingsConfig","modifySettingsGradle","moduleName","withAndroidModuleFiles","withFinalizedMod","_ref","_asyncToGenerator2","default","finalizedConfig","syncAndroidModuleExpoUpdatesFromAppFiles","androidDir","modRequest","platformProjectRoot","_x","apply","arguments"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withBrownfieldAndroid.ts"],"mappings":"mRAAA,IAAAA,cAAA,CAAAC,OAAA,
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","_gradleHelpers","_withAndroidModuleFiles","withBrownfieldAndroid","exports","config","props","androidConfig","android","withProjectBuildGradle","gradleConfig","modResults","contents","modifyRootBuildGradle","useLocalGradlePlugin","withAppBuildGradle","modifyAppBuildGradleMissingDimensionStrategy","missingDimensionStrategies","withSettingsGradle","settingsConfig","modifySettingsGradle","moduleName","withAndroidModuleFiles","withFinalizedMod","_ref","_asyncToGenerator2","default","finalizedConfig","syncAndroidModuleExpoUpdatesFromAppFiles","androidDir","modRequest","platformProjectRoot","_x","apply","arguments"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withBrownfieldAndroid.ts"],"mappings":"mRAAA,IAAAA,cAAA,CAAAC,OAAA,yBAQA,IAAAC,cAAA,CAAAD,OAAA,0BAKA,IAAAE,uBAAA,CAAAF,OAAA,6BAeO,GAAM,CAAAG,qBAEZ,CAAAC,OAAA,CAAAD,qBAAA,CAAG,QAFS,CAAAA,qBAEZA,CAAIE,MAAM,CAAEC,KAAK,CAAK,CACrB,GAAM,CAAAC,aAAa,CAAGD,KAAK,CAACE,OAAO,CAGnCH,MAAM,CAAG,GAAAI,qCAAsB,EAACJ,MAAM,CAAE,SAACK,YAAY,CAAK,CACxDA,YAAY,CAACC,UAAU,CAACC,QAAQ,CAAG,GAAAC,oCAAqB,EACtDH,YAAY,CAACC,UAAU,CAACC,QAAQ,CAChC,CAAEE,oBAAoB,CAAEP,aAAa,CAACO,oBAAqB,CAC7D,CAAC,CAED,MAAO,CAAAJ,YAAY,CACrB,CAAC,CAAC,CAGFL,MAAM,CAAG,GAAAU,iCAAkB,EAACV,MAAM,CAAE,SAACK,YAAY,CAAK,CACpDA,YAAY,CAACC,UAAU,CAACC,QAAQ,CAC9B,GAAAI,2DAA4C,EAC1CN,YAAY,CAACC,UAAU,CAACC,QAAQ,CAChCL,aAAa,CAACU,0BAChB,CAAC,CAEH,MAAO,CAAAP,YAAY,CACrB,CAAC,CAAC,CAGFL,MAAM,CAAG,GAAAa,iCAAkB,EAACb,MAAM,CAAE,SAACc,cAAc,CAAK,CACtDA,cAAc,CAACR,UAAU,CAACC,QAAQ,CAAG,GAAAQ,mCAAoB,EACvDD,cAAc,CAACR,UAAU,CAACC,QAAQ,CAClCL,aAAa,CAACc,UAAU,CACxB,CAAEP,oBAAoB,CAAEP,aAAa,CAACO,oBAAqB,CAC7D,CAAC,CAED,MAAO,CAAAK,cAAc,CACvB,CAAC,CAAC,CAGFd,MAAM,CAAG,GAAAiB,8CAAsB,EAACjB,MAAM,CAAEC,KAAK,CAAC,CAG9CD,MAAM,CAAG,GAAAkB,+BAAgB,EAAClB,MAAM,CAAE,CAChC,SAAS,iBAAAmB,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EACT,UAAOC,eAAe,CAAK,CACzB,GAAAC,gEAAwC,EAAC,CACvCC,UAAU,CAAEF,eAAe,CAACG,UAAU,CAACC,mBAAmB,CAC1D1B,MAAM,CAAEC,KACV,CAAC,CAAC,CAEF,MAAO,CAAAqB,eAAe,CACxB,CAAC,kBAAAK,EAAA,SAAAR,IAAA,CAAAS,KAAA,MAAAC,SAAA,SACF,CAAC,CAEF,MAAO,CAAA7B,MAAM,CACf,CAAC","ignoreList":[]}
|
|
@@ -43,6 +43,10 @@ publishing {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
reactBrownfield {
|
|
47
|
+
missingDimensionStrategies = listOf({{MISSING_DIMENSION_STRATEGIES}})
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
react {
|
|
47
51
|
autolinkLibrariesWithApp()
|
|
48
52
|
}
|
|
@@ -69,6 +73,8 @@ android {
|
|
|
69
73
|
|
|
70
74
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
71
75
|
consumerProguardFiles("consumer-rules.pro")
|
|
76
|
+
|
|
77
|
+
{{MISSING_DIMENSION_STRATEGY_BLOCK}}
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
buildFeatures {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const BROWNFIELD_PLUGIN_VERSION = "2.0.0-
|
|
2
|
-
export declare const brownfieldGradlePluginDependency = "classpath(\"com.callstack.react:brownfield-gradle-plugin:2.0.0-
|
|
1
|
+
export declare const BROWNFIELD_PLUGIN_VERSION = "2.0.0-alpha07";
|
|
2
|
+
export declare const brownfieldGradlePluginDependency = "classpath(\"com.callstack.react:brownfield-gradle-plugin:2.0.0-alpha07\")";
|
|
3
3
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatHelpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/android/utils/formatHelpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,MAAM,EAAE,GACnC,MAAM,CAIR"}
|
|
@@ -7,6 +7,13 @@ type GradleModificationOptions = {
|
|
|
7
7
|
* @returns The modified build.gradle content
|
|
8
8
|
*/
|
|
9
9
|
export declare function modifyRootBuildGradle(contents: string, { useLocalGradlePlugin }?: GradleModificationOptions): string;
|
|
10
|
+
/**
|
|
11
|
+
* Modifies the app build.gradle to add missingDimensionStrategy arguments
|
|
12
|
+
* @param contents The original app build.gradle content
|
|
13
|
+
* @param missingDimensionStrategies The arguments for missingDimensionStrategy
|
|
14
|
+
* @returns The modified build.gradle content
|
|
15
|
+
*/
|
|
16
|
+
export declare function modifyAppBuildGradleMissingDimensionStrategy(contents: string, missingDimensionStrategies: string[]): string;
|
|
10
17
|
/**
|
|
11
18
|
* Modifies settings.gradle to include the Brownfield module
|
|
12
19
|
* @param contents The original settings.gradle content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradleHelpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/android/utils/gradleHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gradleHelpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/android/utils/gradleHelpers.ts"],"names":[],"mappings":"AAOA,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,EAAE,oBAA4B,EAAE,GAAE,yBAA8B,GAC/D,MAAM,CAsCR;AAED;;;;;GAKG;AACH,wBAAgB,4CAA4C,CAC1D,QAAQ,EAAE,MAAM,EAChB,0BAA0B,EAAE,MAAM,EAAE,GACnC,MAAM,CA6BR;AA6BD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,EAAE,oBAA4B,EAAE,GAAE,yBAA8B,GAC/D,MAAM,CA2BR"}
|
package/lib/typescript/commonjs/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withAndroidModuleFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withAndroidModuleFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EAEV,yCAAyC,EAC1C,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAGhC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"withAndroidModuleFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withAndroidModuleFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EAEV,yCAAyC,EAC1C,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAGhC,MAAM,yBAAyB,CAAC;AAmBjC,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,yCAAyC,GAChD,MAAM,CAMR;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,yCAAyC,GAChD,MAAM,CAMR;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,MAAM,EACN,SAAS,EACT,WAAW,GACZ,EAAE;IACD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,yCAAyC,CAAC;CACnD,GAAG,IAAI,CAiFP;AAED,wBAAgB,yBAAyB,CAAC,EACxC,UAAU,EACV,MAAM,EACN,mBAAmB,GACpB,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;IAClD,mBAAmB,EAAE,4BAA4B,EAAE,CAAC;CACrD,GAAG,IAAI,CASP;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,UAAU,EACV,MAAM,EACN,0BAA0B,GAC3B,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;IAClD,0BAA0B,EAAE,0BAA0B,EAAE,CAAC;CAC1D,GAAG,IAAI,CAUP;AAkBD,wBAAgB,wCAAwC,CAAC,EACvD,UAAU,EACV,MAAM,GACP,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;CACnD,GAAG,IAAI,CAsBP;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAC/C,yCAAyC,CAqC1C,CAAC"}
|
package/lib/typescript/commonjs/src/expo-config-plugin/android/withBrownfieldAndroid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withBrownfieldAndroid.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withBrownfieldAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"withBrownfieldAndroid.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withBrownfieldAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAW9B,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,UAAU,CAAC;AAE1E;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAC9C,yCAAyC,CAqD1C,CAAC"}
|
|
@@ -48,6 +48,11 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
48
48
|
* @default false
|
|
49
49
|
*/
|
|
50
50
|
useLocalGradlePlugin?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Missing dimension strategies as dimension + flavor(s).
|
|
53
|
+
* @default []
|
|
54
|
+
*/
|
|
55
|
+
missingDimensionStrategies?: string[];
|
|
51
56
|
}
|
|
52
57
|
/**
|
|
53
58
|
* Android configuration with resolved defaults (all fields required)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrownfieldPluginAndroidConfig.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BrownfieldPluginAndroidConfig.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,QAAQ,CAC1D,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,CAC9E,GACC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const BROWNFIELD_PLUGIN_VERSION = "2.0.0-
|
|
2
|
-
export declare const brownfieldGradlePluginDependency = "classpath(\"com.callstack.react:brownfield-gradle-plugin:2.0.0-
|
|
1
|
+
export declare const BROWNFIELD_PLUGIN_VERSION = "2.0.0-alpha07";
|
|
2
|
+
export declare const brownfieldGradlePluginDependency = "classpath(\"com.callstack.react:brownfield-gradle-plugin:2.0.0-alpha07\")";
|
|
3
3
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatHelpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/android/utils/formatHelpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,MAAM,EAAE,GACnC,MAAM,CAIR"}
|
|
@@ -7,6 +7,13 @@ type GradleModificationOptions = {
|
|
|
7
7
|
* @returns The modified build.gradle content
|
|
8
8
|
*/
|
|
9
9
|
export declare function modifyRootBuildGradle(contents: string, { useLocalGradlePlugin }?: GradleModificationOptions): string;
|
|
10
|
+
/**
|
|
11
|
+
* Modifies the app build.gradle to add missingDimensionStrategy arguments
|
|
12
|
+
* @param contents The original app build.gradle content
|
|
13
|
+
* @param missingDimensionStrategies The arguments for missingDimensionStrategy
|
|
14
|
+
* @returns The modified build.gradle content
|
|
15
|
+
*/
|
|
16
|
+
export declare function modifyAppBuildGradleMissingDimensionStrategy(contents: string, missingDimensionStrategies: string[]): string;
|
|
10
17
|
/**
|
|
11
18
|
* Modifies settings.gradle to include the Brownfield module
|
|
12
19
|
* @param contents The original settings.gradle content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradleHelpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/android/utils/gradleHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gradleHelpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/android/utils/gradleHelpers.ts"],"names":[],"mappings":"AAOA,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,EAAE,oBAA4B,EAAE,GAAE,yBAA8B,GAC/D,MAAM,CAsCR;AAED;;;;;GAKG;AACH,wBAAgB,4CAA4C,CAC1D,QAAQ,EAAE,MAAM,EAChB,0BAA0B,EAAE,MAAM,EAAE,GACnC,MAAM,CA6BR;AA6BD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,EAAE,oBAA4B,EAAE,GAAE,yBAA8B,GAC/D,MAAM,CA2BR"}
|
package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withAndroidModuleFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withAndroidModuleFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EAEV,yCAAyC,EAC1C,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAGhC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"withAndroidModuleFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withAndroidModuleFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EAEV,yCAAyC,EAC1C,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAGhC,MAAM,yBAAyB,CAAC;AAmBjC,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,yCAAyC,GAChD,MAAM,CAMR;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,yCAAyC,GAChD,MAAM,CAMR;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,MAAM,EACN,SAAS,EACT,WAAW,GACZ,EAAE;IACD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,yCAAyC,CAAC;CACnD,GAAG,IAAI,CAiFP;AAED,wBAAgB,yBAAyB,CAAC,EACxC,UAAU,EACV,MAAM,EACN,mBAAmB,GACpB,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;IAClD,mBAAmB,EAAE,4BAA4B,EAAE,CAAC;CACrD,GAAG,IAAI,CASP;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,UAAU,EACV,MAAM,EACN,0BAA0B,GAC3B,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;IAClD,0BAA0B,EAAE,0BAA0B,EAAE,CAAC;CAC1D,GAAG,IAAI,CAUP;AAkBD,wBAAgB,wCAAwC,CAAC,EACvD,UAAU,EACV,MAAM,GACP,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;CACnD,GAAG,IAAI,CAsBP;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAC/C,yCAAyC,CAqC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withBrownfieldAndroid.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withBrownfieldAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"withBrownfieldAndroid.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withBrownfieldAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAW9B,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,UAAU,CAAC;AAE1E;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAC9C,yCAAyC,CAqD1C,CAAC"}
|
|
@@ -48,6 +48,11 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
48
48
|
* @default false
|
|
49
49
|
*/
|
|
50
50
|
useLocalGradlePlugin?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Missing dimension strategies as dimension + flavor(s).
|
|
53
|
+
* @default []
|
|
54
|
+
*/
|
|
55
|
+
missingDimensionStrategies?: string[];
|
|
51
56
|
}
|
|
52
57
|
/**
|
|
53
58
|
* Android configuration with resolved defaults (all fields required)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrownfieldPluginAndroidConfig.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BrownfieldPluginAndroidConfig.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,QAAQ,CAC1D,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,CAC9E,GACC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@callstack/react-native-brownfield",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Michal Chudziak <mike.chudziak@callstack.com>",
|
|
6
6
|
"bin": {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@expo/config-plugins": ">=54 <100"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@callstack/brownfield-cli": "
|
|
92
|
+
"@callstack/brownfield-cli": "workspace:^"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@babel/core": "^7.25.2",
|
|
@@ -121,4 +121,4 @@
|
|
|
121
121
|
"engines": {
|
|
122
122
|
"node": ">=20"
|
|
123
123
|
}
|
|
124
|
-
}
|
|
124
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const BROWNFIELD_PLUGIN_VERSION = '2.0.0-
|
|
1
|
+
export const BROWNFIELD_PLUGIN_VERSION = '2.0.0-alpha07';
|
|
2
2
|
export const brownfieldGradlePluginDependency = `classpath("com.callstack.react:brownfield-gradle-plugin:${BROWNFIELD_PLUGIN_VERSION}")`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { brownfieldGradlePluginDependency } from './constants';
|
|
2
2
|
import { Logger } from '../../logging';
|
|
3
|
+
import { formatMissingDimensionStrategies } from './formatHelpers';
|
|
3
4
|
|
|
4
5
|
const LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD =
|
|
5
6
|
'includeBuild("../node_modules/@callstack/react-native-brownfield/gradle-plugin/brownfield")';
|
|
@@ -56,6 +57,46 @@ export function modifyRootBuildGradle(
|
|
|
56
57
|
return modifiedContents;
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Modifies the app build.gradle to add missingDimensionStrategy arguments
|
|
62
|
+
* @param contents The original app build.gradle content
|
|
63
|
+
* @param missingDimensionStrategies The arguments for missingDimensionStrategy
|
|
64
|
+
* @returns The modified build.gradle content
|
|
65
|
+
*/
|
|
66
|
+
export function modifyAppBuildGradleMissingDimensionStrategy(
|
|
67
|
+
contents: string,
|
|
68
|
+
missingDimensionStrategies: string[]
|
|
69
|
+
): string {
|
|
70
|
+
if (missingDimensionStrategies.length < 2) {
|
|
71
|
+
return contents;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
Logger.logDebug('Modifying app build.gradle to add missingDimensionStrategy');
|
|
75
|
+
|
|
76
|
+
const defaultConfigRegex = /^([ \t]*defaultConfig\s*\{)/m;
|
|
77
|
+
const match = contents.match(defaultConfigRegex);
|
|
78
|
+
|
|
79
|
+
if (!match) {
|
|
80
|
+
throw new Error('Could not locate defaultConfig block in app build.gradle');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const baseIndent = match[1].match(/^[ \t]*/)?.[0] ?? '';
|
|
84
|
+
const indentUnit = baseIndent.includes('\t') ? '\t' : ' ';
|
|
85
|
+
const args = formatMissingDimensionStrategies(missingDimensionStrategies);
|
|
86
|
+
const missingStrategyLine = `missingDimensionStrategy(${args})`;
|
|
87
|
+
|
|
88
|
+
if (contents.includes(missingStrategyLine)) {
|
|
89
|
+
Logger.logDebug(
|
|
90
|
+
'missingDimensionStrategy already present with same arguments, skipping'
|
|
91
|
+
);
|
|
92
|
+
return contents;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const insertion = `\n${baseIndent}${indentUnit}${missingStrategyLine}`;
|
|
96
|
+
|
|
97
|
+
return contents.replace(defaultConfigRegex, `$1${insertion}`);
|
|
98
|
+
}
|
|
99
|
+
|
|
59
100
|
function addLocalGradlePluginIncludeBuild(contents: string): string {
|
|
60
101
|
if (contents.includes('gradle-plugin/brownfield')) {
|
|
61
102
|
Logger.logDebug(
|
|
@@ -20,6 +20,18 @@ import {
|
|
|
20
20
|
readExpoUpdatesStringResources,
|
|
21
21
|
} from './utils/expo-updates';
|
|
22
22
|
import { getHermesArtifact } from './utils/hermes';
|
|
23
|
+
import { formatMissingDimensionStrategies } from './utils/formatHelpers';
|
|
24
|
+
|
|
25
|
+
function renderMissingDimensionStrategyBlock(
|
|
26
|
+
missingDimensionStrategies: string[]
|
|
27
|
+
): string {
|
|
28
|
+
if (missingDimensionStrategies.length < 2) {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const args = formatMissingDimensionStrategies(missingDimensionStrategies);
|
|
33
|
+
return ` missingDimensionStrategy(${args})`;
|
|
34
|
+
}
|
|
23
35
|
|
|
24
36
|
export function resolveCompileSdkVersionExpression(
|
|
25
37
|
config: ResolvedBrownfieldPluginConfigWithAndroid
|
|
@@ -81,6 +93,12 @@ export function createAndroidModule({
|
|
|
81
93
|
Logger.logDebug(
|
|
82
94
|
`Resolved Hermes artifact: ${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`
|
|
83
95
|
);
|
|
96
|
+
const missingDimensionStrategiesList = formatMissingDimensionStrategies(
|
|
97
|
+
android.missingDimensionStrategies
|
|
98
|
+
);
|
|
99
|
+
const missingDimensionStrategyBlock = renderMissingDimensionStrategyBlock(
|
|
100
|
+
android.missingDimensionStrategies
|
|
101
|
+
);
|
|
84
102
|
|
|
85
103
|
// generate module files
|
|
86
104
|
const files: RenderedTemplateFile[] = [
|
|
@@ -96,6 +114,8 @@ export function createAndroidModule({
|
|
|
96
114
|
'{{ARTIFACT_VERSION}}': android.version,
|
|
97
115
|
'{{RN_VERSION}}': rnVersion,
|
|
98
116
|
'{{HERMES_ARTIFACT}}': `${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`,
|
|
117
|
+
'{{MISSING_DIMENSION_STRATEGIES}}': missingDimensionStrategiesList,
|
|
118
|
+
'{{MISSING_DIMENSION_STRATEGY_BLOCK}}': missingDimensionStrategyBlock,
|
|
99
119
|
}),
|
|
100
120
|
},
|
|
101
121
|
{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
withAppBuildGradle,
|
|
2
3
|
withProjectBuildGradle,
|
|
3
4
|
withSettingsGradle,
|
|
4
5
|
withFinalizedMod,
|
|
@@ -6,6 +7,7 @@ import {
|
|
|
6
7
|
} from '@expo/config-plugins';
|
|
7
8
|
|
|
8
9
|
import {
|
|
10
|
+
modifyAppBuildGradleMissingDimensionStrategy,
|
|
9
11
|
modifyRootBuildGradle,
|
|
10
12
|
modifySettingsGradle,
|
|
11
13
|
} from './utils/gradleHelpers';
|
|
@@ -39,7 +41,18 @@ export const withBrownfieldAndroid: ConfigPlugin<
|
|
|
39
41
|
return gradleConfig;
|
|
40
42
|
});
|
|
41
43
|
|
|
42
|
-
// Step 2: modify
|
|
44
|
+
// Step 2: modify app build.gradle to add missingDimensionStrategy
|
|
45
|
+
config = withAppBuildGradle(config, (gradleConfig) => {
|
|
46
|
+
gradleConfig.modResults.contents =
|
|
47
|
+
modifyAppBuildGradleMissingDimensionStrategy(
|
|
48
|
+
gradleConfig.modResults.contents,
|
|
49
|
+
androidConfig.missingDimensionStrategies
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
return gradleConfig;
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Step 3: modify settings.gradle to include the new module
|
|
43
56
|
config = withSettingsGradle(config, (settingsConfig) => {
|
|
44
57
|
settingsConfig.modResults.contents = modifySettingsGradle(
|
|
45
58
|
settingsConfig.modResults.contents,
|
|
@@ -50,10 +63,10 @@ export const withBrownfieldAndroid: ConfigPlugin<
|
|
|
50
63
|
return settingsConfig;
|
|
51
64
|
});
|
|
52
65
|
|
|
53
|
-
// Step
|
|
66
|
+
// Step 4: create the Android module files using dangerous mod
|
|
54
67
|
config = withAndroidModuleFiles(config, props);
|
|
55
68
|
|
|
56
|
-
// Step
|
|
69
|
+
// Step 5: sync module metadata after Expo writes all Android files
|
|
57
70
|
config = withFinalizedMod(config, [
|
|
58
71
|
'android',
|
|
59
72
|
async (finalizedConfig) => {
|
|
@@ -43,6 +43,10 @@ publishing {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
reactBrownfield {
|
|
47
|
+
missingDimensionStrategies = listOf({{MISSING_DIMENSION_STRATEGIES}})
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
react {
|
|
47
51
|
autolinkLibrariesWithApp()
|
|
48
52
|
}
|
|
@@ -69,6 +73,8 @@ android {
|
|
|
69
73
|
|
|
70
74
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
71
75
|
consumerProguardFiles("consumer-rules.pro")
|
|
76
|
+
|
|
77
|
+
{{MISSING_DIMENSION_STRATEGY_BLOCK}}
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
buildFeatures {
|
|
@@ -56,6 +56,12 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
56
56
|
* @default false
|
|
57
57
|
*/
|
|
58
58
|
useLocalGradlePlugin?: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Missing dimension strategies as dimension + flavor(s).
|
|
62
|
+
* @default []
|
|
63
|
+
*/
|
|
64
|
+
missingDimensionStrategies?: string[];
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
/**
|