@callstack/react-native-brownfield 3.13.2 → 3.14.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/CHANGELOG.md +11 -0
- package/ReactBrownfield.podspec +1 -1
- package/app.plugin.js +1 -0
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/ProjectConfigurations.kt +3 -2
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNSourceSets.kt +0 -1
- package/lib/commonjs/expo-config-plugin/android/utils/hermes.js +1 -1
- package/lib/commonjs/expo-config-plugin/android/utils/hermes.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/ios/podfileHelpers.js +4 -2
- package/lib/commonjs/expo-config-plugin/ios/podfileHelpers.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/ios/withBrownfieldIos.js +1 -1
- package/lib/commonjs/expo-config-plugin/ios/withBrownfieldIos.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/ios/withFmtFix.js +4 -2
- package/lib/commonjs/expo-config-plugin/ios/withFmtFix.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/ios/xcodeHelpers.js +2 -2
- package/lib/commonjs/expo-config-plugin/ios/xcodeHelpers.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/template/android/build.gradle.kts +19 -1
- package/lib/module/expo-config-plugin/android/utils/hermes.js +1 -1
- package/lib/module/expo-config-plugin/android/utils/hermes.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/ios/podfileHelpers.js +4 -2
- package/lib/module/expo-config-plugin/ios/podfileHelpers.js.map +1 -1
- package/lib/module/expo-config-plugin/ios/withBrownfieldIos.js +1 -1
- package/lib/module/expo-config-plugin/ios/withBrownfieldIos.js.map +1 -1
- package/lib/module/expo-config-plugin/ios/withFmtFix.js +4 -2
- package/lib/module/expo-config-plugin/ios/withFmtFix.js.map +1 -1
- package/lib/module/expo-config-plugin/ios/xcodeHelpers.js +2 -2
- package/lib/module/expo-config-plugin/ios/xcodeHelpers.js.map +1 -1
- package/lib/module/expo-config-plugin/template/android/build.gradle.kts +19 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/hermes.d.ts +3 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/hermes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts +2 -0
- package/lib/typescript/commonjs/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/podfileHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/withBrownfieldIos.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/withFmtFix.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/xcodeHelpers.d.ts +6 -0
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/xcodeHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts +3 -3
- package/lib/typescript/commonjs/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/types/ios/BrownfieldPluginIosConfig.d.ts +2 -2
- package/lib/typescript/commonjs/src/expo-config-plugin/types/ios/BrownfieldPluginIosConfig.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/android/utils/hermes.d.ts +3 -1
- package/lib/typescript/module/src/expo-config-plugin/android/utils/hermes.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts +2 -0
- package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/podfileHelpers.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/withBrownfieldIos.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/withFmtFix.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/xcodeHelpers.d.ts +6 -0
- package/lib/typescript/module/src/expo-config-plugin/ios/xcodeHelpers.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts +3 -3
- package/lib/typescript/module/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/types/ios/BrownfieldPluginIosConfig.d.ts +2 -2
- package/lib/typescript/module/src/expo-config-plugin/types/ios/BrownfieldPluginIosConfig.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/expo-config-plugin/android/utils/hermes.ts +82 -7
- package/src/expo-config-plugin/android/withAndroidModuleFiles.ts +26 -2
- package/src/expo-config-plugin/ios/podfileHelpers.ts +11 -2
- package/src/expo-config-plugin/ios/withBrownfieldIos.ts +9 -2
- package/src/expo-config-plugin/ios/withFmtFix.ts +47 -17
- package/src/expo-config-plugin/ios/xcodeHelpers.ts +62 -1
- package/src/expo-config-plugin/template/android/build.gradle.kts +19 -1
- package/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts +6 -4
- package/src/expo-config-plugin/types/ios/BrownfieldPluginIosConfig.ts +5 -3
|
@@ -186,7 +186,9 @@ export type PbxReferenceLike = { value?: string; comment?: string } | string;
|
|
|
186
186
|
|
|
187
187
|
export type PbxNativeTarget = {
|
|
188
188
|
buildPhases?: PbxReferenceLike[];
|
|
189
|
+
buildConfigurationList?: string;
|
|
189
190
|
name?: string;
|
|
191
|
+
productReference?: string;
|
|
190
192
|
};
|
|
191
193
|
|
|
192
194
|
export type PbxResourcesBuildPhase = {
|
|
@@ -428,7 +430,7 @@ export function getFrameworkBuildSettings(
|
|
|
428
430
|
|
|
429
431
|
// basic settings
|
|
430
432
|
PRODUCT_BUNDLE_IDENTIFIER: `"${bundleIdentifier}"`,
|
|
431
|
-
IPHONEOS_DEPLOYMENT_TARGET: deploymentTarget,
|
|
433
|
+
IPHONEOS_DEPLOYMENT_TARGET: deploymentTarget ?? '15.0',
|
|
432
434
|
|
|
433
435
|
// Ensure the BrownfieldLib (or equivalent name) is installed at the correct path
|
|
434
436
|
DYLIB_INSTALL_NAME_BASE: '"@rpath"',
|
|
@@ -681,6 +683,65 @@ function resolveAppTargetName(
|
|
|
681
683
|
return null;
|
|
682
684
|
}
|
|
683
685
|
|
|
686
|
+
function normalizeXcodeBuildSettingValue(
|
|
687
|
+
value: string | number | boolean | null | undefined
|
|
688
|
+
): string | null {
|
|
689
|
+
if (value == null) {
|
|
690
|
+
return null;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
const normalized = IOSConfig.XcodeUtils.unquote(String(value)).trim();
|
|
694
|
+
return normalized.length > 0 ? normalized : null;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
export function getAppTargetDeploymentTarget(
|
|
698
|
+
project: Pick<XcodeProject, 'getBuildProperty'>,
|
|
699
|
+
appTargetName: string | null
|
|
700
|
+
): string | null {
|
|
701
|
+
if (!appTargetName) {
|
|
702
|
+
return null;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
return (
|
|
706
|
+
normalizeXcodeBuildSettingValue(
|
|
707
|
+
project.getBuildProperty(
|
|
708
|
+
'IPHONEOS_DEPLOYMENT_TARGET',
|
|
709
|
+
'Release',
|
|
710
|
+
appTargetName
|
|
711
|
+
)
|
|
712
|
+
) ??
|
|
713
|
+
normalizeXcodeBuildSettingValue(
|
|
714
|
+
project.getBuildProperty(
|
|
715
|
+
'IPHONEOS_DEPLOYMENT_TARGET',
|
|
716
|
+
'Debug',
|
|
717
|
+
appTargetName
|
|
718
|
+
)
|
|
719
|
+
)
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
export function resolveFrameworkDeploymentTarget(
|
|
724
|
+
project: XcodeProject,
|
|
725
|
+
modRequest: ModProps<XcodeProject>,
|
|
726
|
+
{
|
|
727
|
+
fallbackDeploymentTarget,
|
|
728
|
+
}: {
|
|
729
|
+
fallbackDeploymentTarget?: string;
|
|
730
|
+
}
|
|
731
|
+
): string {
|
|
732
|
+
if (fallbackDeploymentTarget != null) {
|
|
733
|
+
return fallbackDeploymentTarget;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
const appTargetName = resolveAppTargetName(project, modRequest);
|
|
737
|
+
const appTargetDeploymentTarget = getAppTargetDeploymentTarget(
|
|
738
|
+
project,
|
|
739
|
+
appTargetName
|
|
740
|
+
);
|
|
741
|
+
|
|
742
|
+
return appTargetDeploymentTarget ?? '15.0';
|
|
743
|
+
}
|
|
744
|
+
|
|
684
745
|
/**
|
|
685
746
|
* Adds the "Patch ExpoModulesProvider" shell script phase to the framework target.
|
|
686
747
|
* Safe to call on every prebuild: skips creation when the phase is already present.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import groovy.json.JsonOutput
|
|
2
1
|
import groovy.json.JsonSlurper
|
|
3
2
|
|
|
4
3
|
plugins {
|
|
@@ -9,6 +8,24 @@ plugins {
|
|
|
9
8
|
id("com.facebook.react")
|
|
10
9
|
}
|
|
11
10
|
|
|
11
|
+
fun resolveRootProjectInt(name: String): Int {
|
|
12
|
+
val extraProperties = rootProject.extensions.extraProperties
|
|
13
|
+
val value =
|
|
14
|
+
when {
|
|
15
|
+
extraProperties.has(name) -> extraProperties.get(name)
|
|
16
|
+
rootProject.findProperty(name) != null -> rootProject.findProperty(name)
|
|
17
|
+
rootProject.findProperty("android.$name") != null -> rootProject.findProperty("android.$name")
|
|
18
|
+
else -> error("Unable to resolve root project property '$name' for Brownfield Android packaging.")
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return when (value) {
|
|
22
|
+
is Int -> value
|
|
23
|
+
is Number -> value.toInt()
|
|
24
|
+
is String -> value.toInt()
|
|
25
|
+
else -> value.toString().toInt()
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
12
29
|
publishing {
|
|
13
30
|
publications {
|
|
14
31
|
create<MavenPublication>("mavenAar") {
|
|
@@ -36,6 +53,7 @@ android {
|
|
|
36
53
|
|
|
37
54
|
defaultConfig {
|
|
38
55
|
minSdk = {{MIN_SDK_VERSION}}
|
|
56
|
+
targetSdk = {{TARGET_SDK_VERSION}}
|
|
39
57
|
|
|
40
58
|
buildConfigField(
|
|
41
59
|
"boolean",
|
|
@@ -22,13 +22,13 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Target SDK version for the Android library
|
|
25
|
-
* @default
|
|
25
|
+
* @default inherited from the generated Expo app project when available
|
|
26
26
|
*/
|
|
27
27
|
targetSdkVersion?: number;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Compile SDK version for the Android library
|
|
31
|
-
* @default
|
|
31
|
+
* @default inherited from the generated Expo app project when available
|
|
32
32
|
*/
|
|
33
33
|
compileSdkVersion?: number;
|
|
34
34
|
|
|
@@ -61,5 +61,7 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
61
61
|
/**
|
|
62
62
|
* Android configuration with resolved defaults (all fields required)
|
|
63
63
|
*/
|
|
64
|
-
export type ResolvedBrownfieldPluginAndroidConfig =
|
|
65
|
-
|
|
64
|
+
export type ResolvedBrownfieldPluginAndroidConfig = Required<
|
|
65
|
+
Omit<BrownfieldPluginAndroidConfig, 'compileSdkVersion' | 'targetSdkVersion'>
|
|
66
|
+
> &
|
|
67
|
+
Pick<BrownfieldPluginAndroidConfig, 'compileSdkVersion' | 'targetSdkVersion'>;
|
|
@@ -22,7 +22,7 @@ export interface BrownfieldPluginIosConfig {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Minimum iOS deployment target
|
|
25
|
-
* @default
|
|
25
|
+
* @default inherited from the generated Expo app target when available
|
|
26
26
|
*/
|
|
27
27
|
deploymentTarget?: string;
|
|
28
28
|
|
|
@@ -37,5 +37,7 @@ export interface BrownfieldPluginIosConfig {
|
|
|
37
37
|
/**
|
|
38
38
|
* iOS configuration with resolved defaults (all fields required)
|
|
39
39
|
*/
|
|
40
|
-
export type ResolvedBrownfieldPluginIosConfig =
|
|
41
|
-
|
|
40
|
+
export type ResolvedBrownfieldPluginIosConfig = Required<
|
|
41
|
+
Omit<BrownfieldPluginIosConfig, 'deploymentTarget'>
|
|
42
|
+
> &
|
|
43
|
+
Pick<BrownfieldPluginIosConfig, 'deploymentTarget'>;
|