@callstack/react-native-brownfield 4.0.0 → 4.2.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 +20 -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 +51 -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 +26 -62
- 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 +49 -11
- 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 +9 -1
- 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 +10 -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 +9 -1
- 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 +10 -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 +114 -8
- package/src/expo-config-plugin/android/withAndroidModuleFiles.ts +20 -0
- package/src/expo-config-plugin/android/withBrownfieldAndroid.ts +20 -4
- package/src/expo-config-plugin/template/android/build.gradle.kts +6 -0
- package/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts +12 -0
- package/CHANGELOG.md +0 -300
|
@@ -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,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,CAAAM,CAAA,EAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA,IAAAd,CAAA,aAAAc,EAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,EAAA,KAAAP,CAAA,EAAAD,CAAA,CAAAW,MAAA,CAAAC,cAAA,GAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,CAAAc,EAAA,KAAAP,CAAA,CAAAK,GAAA,E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D,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,useLocalMaven:androidConfig.useLocalMaven});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","useLocalMaven","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,C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CC,UAAU,CAAEF,eAAe,CAACG,UAAU,CAACC,mBAAmB,CAC1D3B,MAAM,CAAEC,KACV,CAAC,CAAC,CAEF,MAAO,CAAAsB,eAAe,CACxB,CAAC,kBAAAK,EAAA,SAAAR,IAAA,CAAAS,KAAA,MAAAC,SAAA,SACF,CAAC,CAEF,MAAO,CAAA9B,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-alpha08";
|
|
2
|
+
export declare const brownfieldGradlePluginDependency = "classpath(\"com.callstack.react:brownfield-gradle-plugin:2.0.0-alpha08\")";
|
|
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"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
type GradleModificationOptions = {
|
|
2
2
|
useLocalGradlePlugin?: boolean;
|
|
3
|
+
useLocalMaven?: boolean;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
5
6
|
* Modifies the root build.gradle to add the Brownfield Gradle plugin dependency
|
|
6
7
|
* @param contents The original build.gradle content
|
|
7
8
|
* @returns The modified build.gradle content
|
|
8
9
|
*/
|
|
9
|
-
export declare function modifyRootBuildGradle(contents: string, { useLocalGradlePlugin }?: GradleModificationOptions): string;
|
|
10
|
+
export declare function modifyRootBuildGradle(contents: string, { useLocalGradlePlugin, useLocalMaven, }?: GradleModificationOptions): string;
|
|
11
|
+
/**
|
|
12
|
+
* Modifies the app build.gradle to add missingDimensionStrategy arguments
|
|
13
|
+
* @param contents The original app build.gradle content
|
|
14
|
+
* @param missingDimensionStrategies The arguments for missingDimensionStrategy
|
|
15
|
+
* @returns The modified build.gradle content
|
|
16
|
+
*/
|
|
17
|
+
export declare function modifyAppBuildGradleMissingDimensionStrategy(contents: string, missingDimensionStrategies: string[]): string;
|
|
10
18
|
/**
|
|
11
19
|
* Modifies settings.gradle to include the Brownfield module
|
|
12
20
|
* @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":"AAWA,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAiDF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,EACE,oBAA4B,EAC5B,aAAqB,GACtB,GAAE,yBAA8B,GAChC,MAAM,CAgDR;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,CAwD1C,CAAC"}
|
|
@@ -48,6 +48,16 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
48
48
|
* @default false
|
|
49
49
|
*/
|
|
50
50
|
useLocalGradlePlugin?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Use the local Maven repository for Brownfield dependencies.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
useLocalMaven?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Missing dimension strategies as dimension + flavor(s), e.g. "type, alpha".
|
|
58
|
+
* @default []
|
|
59
|
+
*/
|
|
60
|
+
missingDimensionStrategies?: string[];
|
|
51
61
|
}
|
|
52
62
|
/**
|
|
53
63
|
* 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,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;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-alpha08";
|
|
2
|
+
export declare const brownfieldGradlePluginDependency = "classpath(\"com.callstack.react:brownfield-gradle-plugin:2.0.0-alpha08\")";
|
|
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"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
type GradleModificationOptions = {
|
|
2
2
|
useLocalGradlePlugin?: boolean;
|
|
3
|
+
useLocalMaven?: boolean;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
5
6
|
* Modifies the root build.gradle to add the Brownfield Gradle plugin dependency
|
|
6
7
|
* @param contents The original build.gradle content
|
|
7
8
|
* @returns The modified build.gradle content
|
|
8
9
|
*/
|
|
9
|
-
export declare function modifyRootBuildGradle(contents: string, { useLocalGradlePlugin }?: GradleModificationOptions): string;
|
|
10
|
+
export declare function modifyRootBuildGradle(contents: string, { useLocalGradlePlugin, useLocalMaven, }?: GradleModificationOptions): string;
|
|
11
|
+
/**
|
|
12
|
+
* Modifies the app build.gradle to add missingDimensionStrategy arguments
|
|
13
|
+
* @param contents The original app build.gradle content
|
|
14
|
+
* @param missingDimensionStrategies The arguments for missingDimensionStrategy
|
|
15
|
+
* @returns The modified build.gradle content
|
|
16
|
+
*/
|
|
17
|
+
export declare function modifyAppBuildGradleMissingDimensionStrategy(contents: string, missingDimensionStrategies: string[]): string;
|
|
10
18
|
/**
|
|
11
19
|
* Modifies settings.gradle to include the Brownfield module
|
|
12
20
|
* @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":"AAWA,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAiDF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,EACE,oBAA4B,EAC5B,aAAqB,GACtB,GAAE,yBAA8B,GAChC,MAAM,CAgDR;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,CAwD1C,CAAC"}
|
|
@@ -48,6 +48,16 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
48
48
|
* @default false
|
|
49
49
|
*/
|
|
50
50
|
useLocalGradlePlugin?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Use the local Maven repository for Brownfield dependencies.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
useLocalMaven?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Missing dimension strategies as dimension + flavor(s), e.g. "type, alpha".
|
|
58
|
+
* @default []
|
|
59
|
+
*/
|
|
60
|
+
missingDimensionStrategies?: string[];
|
|
51
61
|
}
|
|
52
62
|
/**
|
|
53
63
|
* 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,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;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.2.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-alpha08';
|
|
2
2
|
export const brownfieldGradlePluginDependency = `classpath("com.callstack.react:brownfield-gradle-plugin:${BROWNFIELD_PLUGIN_VERSION}")`;
|
|
@@ -1,13 +1,66 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
BROWNFIELD_PLUGIN_VERSION,
|
|
3
|
+
brownfieldGradlePluginDependency,
|
|
4
|
+
} from './constants';
|
|
2
5
|
import { Logger } from '../../logging';
|
|
6
|
+
import { formatMissingDimensionStrategies } from './formatHelpers';
|
|
3
7
|
|
|
4
8
|
const LOCAL_GRADLE_PLUGIN_INCLUDE_BUILD =
|
|
5
9
|
'includeBuild("../node_modules/@callstack/react-native-brownfield/gradle-plugin/brownfield")';
|
|
10
|
+
const LOCAL_MAVEN_REPOSITORY = 'mavenLocal()';
|
|
6
11
|
|
|
7
12
|
type GradleModificationOptions = {
|
|
8
13
|
useLocalGradlePlugin?: boolean;
|
|
14
|
+
useLocalMaven?: boolean;
|
|
9
15
|
};
|
|
10
16
|
|
|
17
|
+
const BUILD_SCRIPT_BLOCK_NAME = 'buildscript';
|
|
18
|
+
const ALL_PROJECTS_BLOCK_NAME = 'allprojects';
|
|
19
|
+
|
|
20
|
+
function addMavenLocalToBlock(contents: string, blockName: string): string {
|
|
21
|
+
const blockRepositoriesRegex = new RegExp(
|
|
22
|
+
`(${blockName}\\s*\\{[\\s\\S]*?repositories\\s*\\{)`,
|
|
23
|
+
'm'
|
|
24
|
+
);
|
|
25
|
+
const mavenLocalRegex = new RegExp(
|
|
26
|
+
`${blockName}\\s*\\{[\\s\\S]*?repositories\\s*\\{[\\s\\S]*?${LOCAL_MAVEN_REPOSITORY}`,
|
|
27
|
+
'm'
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
if (!blockRepositoriesRegex.test(contents)) {
|
|
31
|
+
return contents;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (mavenLocalRegex.test(contents)) {
|
|
35
|
+
return contents;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return contents.replace(
|
|
39
|
+
blockRepositoriesRegex,
|
|
40
|
+
`$1\n\t\t${LOCAL_MAVEN_REPOSITORY}`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function addMavenLocalRepositories(contents: string): string {
|
|
45
|
+
let modifiedContents = contents;
|
|
46
|
+
|
|
47
|
+
const initialContents = modifiedContents;
|
|
48
|
+
modifiedContents = addMavenLocalToBlock(
|
|
49
|
+
modifiedContents,
|
|
50
|
+
BUILD_SCRIPT_BLOCK_NAME
|
|
51
|
+
);
|
|
52
|
+
modifiedContents = addMavenLocalToBlock(
|
|
53
|
+
modifiedContents,
|
|
54
|
+
ALL_PROJECTS_BLOCK_NAME
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
if (modifiedContents !== initialContents) {
|
|
58
|
+
Logger.logDebug('Added mavenLocal() to root build.gradle repositories');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return modifiedContents;
|
|
62
|
+
}
|
|
63
|
+
|
|
11
64
|
/**
|
|
12
65
|
* Modifies the root build.gradle to add the Brownfield Gradle plugin dependency
|
|
13
66
|
* @param contents The original build.gradle content
|
|
@@ -15,21 +68,30 @@ type GradleModificationOptions = {
|
|
|
15
68
|
*/
|
|
16
69
|
export function modifyRootBuildGradle(
|
|
17
70
|
contents: string,
|
|
18
|
-
{
|
|
71
|
+
{
|
|
72
|
+
useLocalGradlePlugin = false,
|
|
73
|
+
useLocalMaven = false,
|
|
74
|
+
}: GradleModificationOptions = {}
|
|
19
75
|
): string {
|
|
76
|
+
let updatedContents = contents;
|
|
77
|
+
|
|
78
|
+
if (useLocalMaven) {
|
|
79
|
+
updatedContents = addMavenLocalRepositories(updatedContents);
|
|
80
|
+
}
|
|
81
|
+
|
|
20
82
|
if (useLocalGradlePlugin) {
|
|
21
83
|
Logger.logDebug(
|
|
22
84
|
'Skipping Maven Brownfield Gradle plugin classpath because useLocalGradlePlugin is enabled'
|
|
23
85
|
);
|
|
24
|
-
return
|
|
86
|
+
return updatedContents;
|
|
25
87
|
}
|
|
26
88
|
|
|
27
89
|
// check if already added
|
|
28
|
-
if (
|
|
90
|
+
if (updatedContents.includes('brownfield-gradle-plugin')) {
|
|
29
91
|
Logger.logDebug(
|
|
30
92
|
'Brownfield Gradle plugin already in root build.gradle, skipping'
|
|
31
93
|
);
|
|
32
|
-
return
|
|
94
|
+
return updatedContents;
|
|
33
95
|
}
|
|
34
96
|
|
|
35
97
|
Logger.logDebug(
|
|
@@ -39,15 +101,19 @@ export function modifyRootBuildGradle(
|
|
|
39
101
|
// find the buildscript dependencies block
|
|
40
102
|
const buildscriptDepsRegex =
|
|
41
103
|
/(buildscript\s*\{[\s\S]*?dependencies\s*\{[\s\S]*?)(})/m;
|
|
42
|
-
const match =
|
|
104
|
+
const match = updatedContents.match(buildscriptDepsRegex);
|
|
43
105
|
|
|
44
106
|
if (!match) {
|
|
45
107
|
throw new Error('Could not locate buildscript block in root build.gradle');
|
|
46
108
|
}
|
|
47
109
|
|
|
110
|
+
const gradlePluginDependency = useLocalMaven
|
|
111
|
+
? `classpath("com.callstack.react:brownfield-gradle-plugin:${BROWNFIELD_PLUGIN_VERSION}-SNAPSHOT")`
|
|
112
|
+
: brownfieldGradlePluginDependency;
|
|
113
|
+
|
|
48
114
|
// insert before the closing brace of dependencies
|
|
49
|
-
const insertion = `\t${
|
|
50
|
-
const modifiedContents =
|
|
115
|
+
const insertion = `\t${gradlePluginDependency}\n\t`;
|
|
116
|
+
const modifiedContents = updatedContents.replace(
|
|
51
117
|
buildscriptDepsRegex,
|
|
52
118
|
`$1${insertion}$2`
|
|
53
119
|
);
|
|
@@ -56,6 +122,46 @@ export function modifyRootBuildGradle(
|
|
|
56
122
|
return modifiedContents;
|
|
57
123
|
}
|
|
58
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Modifies the app build.gradle to add missingDimensionStrategy arguments
|
|
127
|
+
* @param contents The original app build.gradle content
|
|
128
|
+
* @param missingDimensionStrategies The arguments for missingDimensionStrategy
|
|
129
|
+
* @returns The modified build.gradle content
|
|
130
|
+
*/
|
|
131
|
+
export function modifyAppBuildGradleMissingDimensionStrategy(
|
|
132
|
+
contents: string,
|
|
133
|
+
missingDimensionStrategies: string[]
|
|
134
|
+
): string {
|
|
135
|
+
if (missingDimensionStrategies.length < 2) {
|
|
136
|
+
return contents;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
Logger.logDebug('Modifying app build.gradle to add missingDimensionStrategy');
|
|
140
|
+
|
|
141
|
+
const defaultConfigRegex = /^([ \t]*defaultConfig\s*\{)/m;
|
|
142
|
+
const match = contents.match(defaultConfigRegex);
|
|
143
|
+
|
|
144
|
+
if (!match) {
|
|
145
|
+
throw new Error('Could not locate defaultConfig block in app build.gradle');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const baseIndent = match[1].match(/^[ \t]*/)?.[0] ?? '';
|
|
149
|
+
const indentUnit = baseIndent.includes('\t') ? '\t' : ' ';
|
|
150
|
+
const args = formatMissingDimensionStrategies(missingDimensionStrategies);
|
|
151
|
+
const missingStrategyLine = `missingDimensionStrategy(${args})`;
|
|
152
|
+
|
|
153
|
+
if (contents.includes(missingStrategyLine)) {
|
|
154
|
+
Logger.logDebug(
|
|
155
|
+
'missingDimensionStrategy already present with same arguments, skipping'
|
|
156
|
+
);
|
|
157
|
+
return contents;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const insertion = `\n${baseIndent}${indentUnit}${missingStrategyLine}`;
|
|
161
|
+
|
|
162
|
+
return contents.replace(defaultConfigRegex, `$1${insertion}`);
|
|
163
|
+
}
|
|
164
|
+
|
|
59
165
|
function addLocalGradlePluginIncludeBuild(contents: string): string {
|
|
60
166
|
if (contents.includes('gradle-plugin/brownfield')) {
|
|
61
167
|
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';
|
|
@@ -33,13 +35,27 @@ export const withBrownfieldAndroid: ConfigPlugin<
|
|
|
33
35
|
config = withProjectBuildGradle(config, (gradleConfig) => {
|
|
34
36
|
gradleConfig.modResults.contents = modifyRootBuildGradle(
|
|
35
37
|
gradleConfig.modResults.contents,
|
|
36
|
-
{
|
|
38
|
+
{
|
|
39
|
+
useLocalGradlePlugin: androidConfig.useLocalGradlePlugin,
|
|
40
|
+
useLocalMaven: androidConfig.useLocalMaven,
|
|
41
|
+
}
|
|
37
42
|
);
|
|
38
43
|
|
|
39
44
|
return gradleConfig;
|
|
40
45
|
});
|
|
41
46
|
|
|
42
|
-
// Step 2: modify
|
|
47
|
+
// Step 2: modify app build.gradle to add missingDimensionStrategy
|
|
48
|
+
config = withAppBuildGradle(config, (gradleConfig) => {
|
|
49
|
+
gradleConfig.modResults.contents =
|
|
50
|
+
modifyAppBuildGradleMissingDimensionStrategy(
|
|
51
|
+
gradleConfig.modResults.contents,
|
|
52
|
+
androidConfig.missingDimensionStrategies
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return gradleConfig;
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Step 3: modify settings.gradle to include the new module
|
|
43
59
|
config = withSettingsGradle(config, (settingsConfig) => {
|
|
44
60
|
settingsConfig.modResults.contents = modifySettingsGradle(
|
|
45
61
|
settingsConfig.modResults.contents,
|
|
@@ -50,10 +66,10 @@ export const withBrownfieldAndroid: ConfigPlugin<
|
|
|
50
66
|
return settingsConfig;
|
|
51
67
|
});
|
|
52
68
|
|
|
53
|
-
// Step
|
|
69
|
+
// Step 4: create the Android module files using dangerous mod
|
|
54
70
|
config = withAndroidModuleFiles(config, props);
|
|
55
71
|
|
|
56
|
-
// Step
|
|
72
|
+
// Step 5: sync module metadata after Expo writes all Android files
|
|
57
73
|
config = withFinalizedMod(config, [
|
|
58
74
|
'android',
|
|
59
75
|
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,18 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
56
56
|
* @default false
|
|
57
57
|
*/
|
|
58
58
|
useLocalGradlePlugin?: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Use the local Maven repository for Brownfield dependencies.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
useLocalMaven?: boolean;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Missing dimension strategies as dimension + flavor(s), e.g. "type, alpha".
|
|
68
|
+
* @default []
|
|
69
|
+
*/
|
|
70
|
+
missingDimensionStrategies?: string[];
|
|
59
71
|
}
|
|
60
72
|
|
|
61
73
|
/**
|