expo-build-properties 0.7.0 → 0.8.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 CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.8.0 — 2023-06-21
14
+
15
+ ### 🛠 Breaking changes
16
+
17
+ - Replaced `unstable_networkInspector` as `networkInspector` and enabled the feature by default. ([#22994](https://github.com/expo/expo/pull/22994) by [@kudo](https://github.com/kudo))
18
+
19
+ ### 🎉 New features
20
+
21
+ - Added `android.extraMavenRepos` and `ios.extraPods` support. ([#22785](https://github.com/expo/expo/pull/22785) by [@kudo](https://github.com/kudo))
22
+
13
23
  ## 0.7.0 — 2023-05-08
14
24
 
15
25
  ### 🐛 Bug fixes
package/build/android.js CHANGED
@@ -60,7 +60,7 @@ exports.withAndroidBuildProperties = createBuildGradlePropsConfigPlugin([
60
60
  },
61
61
  {
62
62
  propName: 'EX_DEV_CLIENT_NETWORK_INSPECTOR',
63
- propValueGetter: (config) => config.android?.unstable_networkInspector?.toString(),
63
+ propValueGetter: (config) => (config.android?.networkInspector ?? true).toString(),
64
64
  },
65
65
  ], 'withAndroidBuildProperties');
66
66
  const withAndroidFlipper = (config, props) => {
package/build/ios.js CHANGED
@@ -23,7 +23,7 @@ exports.withIosBuildProperties = createBuildPodfilePropsConfigPlugin([
23
23
  },
24
24
  {
25
25
  propName: 'EX_DEV_CLIENT_NETWORK_INSPECTOR',
26
- propValueGetter: (config) => config.ios?.unstable_networkInspector?.toString(),
26
+ propValueGetter: (config) => (config.ios?.networkInspector ?? true).toString(),
27
27
  },
28
28
  ], 'withIosBuildProperties');
29
29
  const withIosDeploymentTarget = (config, props) => {
@@ -68,10 +68,29 @@ export interface PluginConfigTypeAndroid {
68
68
  */
69
69
  flipper?: string;
70
70
  /**
71
- * Enable the experimental Network Inspector for [Development builds](https://docs.expo.dev/develop/development-builds/introduction/).
72
- * SDK 49+ is required.
71
+ * Enable the Network Inspector.
72
+ *
73
+ * @default true
74
+ */
75
+ networkInspector?: boolean;
76
+ /**
77
+ * Add extra maven repositories to all gradle projects.
78
+ *
79
+ * This acts like to add the following code to **android/build.gradle**:
80
+ * ```groovy
81
+ * allprojects {
82
+ * repositories {
83
+ * maven {
84
+ * url [THE_EXTRA_MAVEN_REPOSITORY]
85
+ * }
86
+ * }
87
+ * }
88
+ * ```
89
+ *
90
+ * @hide For the implementation details,
91
+ * this property is actually handled by `expo-modules-autolinking` but not the config-plugins inside expo-build-properties.
73
92
  */
74
- unstable_networkInspector?: boolean;
93
+ extraMavenRepos?: string[];
75
94
  }
76
95
  /**
77
96
  * Interface representing available configuration for iOS native build properties.
@@ -107,10 +126,97 @@ export interface PluginConfigTypeIos {
107
126
  */
108
127
  flipper?: boolean | string;
109
128
  /**
110
- * Enable the experimental Network Inspector for [Development builds](https://docs.expo.dev/develop/development-builds/introduction/).
111
- * SDK 49+ is required.
129
+ * Enable the Network Inspector.
130
+ *
131
+ * @default true
132
+ */
133
+ networkInspector?: boolean;
134
+ /**
135
+ * Add extra CocoaPods dependencies for all targets.
136
+ *
137
+ * This acts like to add the following code to **ios/Podfile**:
138
+ * ```
139
+ * pod '[EXTRA_POD_NAME]', '~> [EXTRA_POD_VERSION]'
140
+ * # e.g.
141
+ * pod 'Protobuf', '~> 3.14.0'
142
+ * ```
143
+ *
144
+ * @hide For the implementation details,
145
+ * this property is actually handled by `expo-modules-autolinking` but not the config-plugins inside expo-build-properties.
146
+ */
147
+ extraPods?: ExtraIosPodDependency[];
148
+ }
149
+ /**
150
+ * Interface representing extra CocoaPods dependency.
151
+ * @see [Podfile syntax reference](https://guides.cocoapods.org/syntax/podfile.html#pod)
152
+ * @platform ios
153
+ */
154
+ export interface ExtraIosPodDependency {
155
+ /**
156
+ * Name of the pod.
157
+ */
158
+ name: string;
159
+ /**
160
+ * Version of the pod.
161
+ * CocoaPods supports various [versioning options](https://guides.cocoapods.org/using/the-podfile.html#pod).
162
+ * @example `~> 0.1.2`
163
+ */
164
+ version?: string;
165
+ /**
166
+ * Build configurations for which the pod should be installed.
167
+ * @example `['Debug', 'Release']`
168
+ */
169
+ configurations?: string[];
170
+ /**
171
+ * Whether this pod should use modular headers.
172
+ */
173
+ modular_headers?: boolean;
174
+ /**
175
+ * Custom source to search for this dependency.
176
+ * @example `https://github.com/CocoaPods/Specs.git`
177
+ */
178
+ source?: string;
179
+ /**
180
+ * Custom local filesystem path to add the dependency.
181
+ * @example `~/Documents/AFNetworking`
182
+ */
183
+ path?: string;
184
+ /**
185
+ * Custom podspec path.
186
+ * @example `https://example.com/JSONKit.podspec`
187
+ */
188
+ podspec?: string;
189
+ /**
190
+ * Test specs can be optionally included via the :testspecs option. By default, none of a Pod's test specs are included.
191
+ * @example `['UnitTests', 'SomeOtherTests']`
192
+ */
193
+ testspecs?: string[];
194
+ /**
195
+ * Use the bleeding edge version of a Pod.
196
+ *
197
+ * @example
198
+ * ```
199
+ * { "name": "AFNetworking", "git": "https://github.com/gowalla/AFNetworking.git", "tag": "0.7.0" }
200
+ * ```
201
+ *
202
+ * This acts like to add this pod dependency statement:
203
+ * ```
204
+ * pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :tag => '0.7.0'
205
+ * ```
206
+ */
207
+ git?: string;
208
+ /**
209
+ * The git branch to fetch. See the {@link git} property for more information.
210
+ */
211
+ branch?: string;
212
+ /**
213
+ * The git tag to fetch. See the {@link git} property for more information.
214
+ */
215
+ tag?: string;
216
+ /**
217
+ * The git commit to fetch. See the {@link git} property for more information.
112
218
  */
113
- unstable_networkInspector?: boolean;
219
+ commit?: string;
114
220
  }
115
221
  /**
116
222
  * Interface representing available configuration for Android Gradle plugin [PackagingOptions](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/PackagingOptions).
@@ -50,7 +50,8 @@ const schema = {
50
50
  },
51
51
  nullable: true,
52
52
  },
53
- unstable_networkInspector: { type: 'boolean', nullable: true },
53
+ networkInspector: { type: 'boolean', nullable: true },
54
+ extraMavenRepos: { type: 'array', items: { type: 'string' }, nullable: true },
54
55
  },
55
56
  nullable: true,
56
57
  },
@@ -64,7 +65,29 @@ const schema = {
64
65
  type: ['boolean', 'string'],
65
66
  nullable: true,
66
67
  },
67
- unstable_networkInspector: { type: 'boolean', nullable: true },
68
+ networkInspector: { type: 'boolean', nullable: true },
69
+ extraPods: {
70
+ type: 'array',
71
+ items: {
72
+ type: 'object',
73
+ required: ['name'],
74
+ properties: {
75
+ name: { type: 'string' },
76
+ version: { type: 'string', nullable: true },
77
+ configurations: { type: 'array', items: { type: 'string' }, nullable: true },
78
+ modular_headers: { type: 'boolean', nullable: true },
79
+ source: { type: 'string', nullable: true },
80
+ path: { type: 'string', nullable: true },
81
+ podspec: { type: 'string', nullable: true },
82
+ testspecs: { type: 'array', items: { type: 'string' }, nullable: true },
83
+ git: { type: 'string', nullable: true },
84
+ branch: { type: 'string', nullable: true },
85
+ tag: { type: 'string', nullable: true },
86
+ commit: { type: 'string', nullable: true },
87
+ },
88
+ },
89
+ nullable: true,
90
+ },
68
91
  },
69
92
  nullable: true,
70
93
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-build-properties",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Config plugin to customize native build properties on prebuild",
5
5
  "main": "build/withBuildProperties.js",
6
6
  "types": "build/withBuildProperties.d.ts",
@@ -40,5 +40,5 @@
40
40
  "peerDependencies": {
41
41
  "expo": "*"
42
42
  },
43
- "gitHead": "4ba50c428c8369bb6b3a51a860d4898ad4ccbe78"
43
+ "gitHead": "fa5ecca8251986b9f197cc14074eec0ab6dfb6db"
44
44
  }
package/src/android.ts CHANGED
@@ -65,7 +65,7 @@ export const withAndroidBuildProperties = createBuildGradlePropsConfigPlugin<Plu
65
65
  },
66
66
  {
67
67
  propName: 'EX_DEV_CLIENT_NETWORK_INSPECTOR',
68
- propValueGetter: (config) => config.android?.unstable_networkInspector?.toString(),
68
+ propValueGetter: (config) => (config.android?.networkInspector ?? true).toString(),
69
69
  },
70
70
  ],
71
71
  'withAndroidBuildProperties'
package/src/ios.ts CHANGED
@@ -25,7 +25,7 @@ export const withIosBuildProperties = createBuildPodfilePropsConfigPlugin<Plugin
25
25
  },
26
26
  {
27
27
  propName: 'EX_DEV_CLIENT_NETWORK_INSPECTOR',
28
- propValueGetter: (config) => config.ios?.unstable_networkInspector?.toString(),
28
+ propValueGetter: (config) => (config.ios?.networkInspector ?? true).toString(),
29
29
  },
30
30
  ],
31
31
  'withIosBuildProperties'
@@ -90,10 +90,30 @@ export interface PluginConfigTypeAndroid {
90
90
  flipper?: string;
91
91
 
92
92
  /**
93
- * Enable the experimental Network Inspector for [Development builds](https://docs.expo.dev/develop/development-builds/introduction/).
94
- * SDK 49+ is required.
93
+ * Enable the Network Inspector.
94
+ *
95
+ * @default true
96
+ */
97
+ networkInspector?: boolean;
98
+
99
+ /**
100
+ * Add extra maven repositories to all gradle projects.
101
+ *
102
+ * This acts like to add the following code to **android/build.gradle**:
103
+ * ```groovy
104
+ * allprojects {
105
+ * repositories {
106
+ * maven {
107
+ * url [THE_EXTRA_MAVEN_REPOSITORY]
108
+ * }
109
+ * }
110
+ * }
111
+ * ```
112
+ *
113
+ * @hide For the implementation details,
114
+ * this property is actually handled by `expo-modules-autolinking` but not the config-plugins inside expo-build-properties.
95
115
  */
96
- unstable_networkInspector?: boolean;
116
+ extraMavenRepos?: string[];
97
117
  }
98
118
 
99
119
  /**
@@ -133,10 +153,99 @@ export interface PluginConfigTypeIos {
133
153
  flipper?: boolean | string;
134
154
 
135
155
  /**
136
- * Enable the experimental Network Inspector for [Development builds](https://docs.expo.dev/develop/development-builds/introduction/).
137
- * SDK 49+ is required.
156
+ * Enable the Network Inspector.
157
+ *
158
+ * @default true
159
+ */
160
+ networkInspector?: boolean;
161
+
162
+ /**
163
+ * Add extra CocoaPods dependencies for all targets.
164
+ *
165
+ * This acts like to add the following code to **ios/Podfile**:
166
+ * ```
167
+ * pod '[EXTRA_POD_NAME]', '~> [EXTRA_POD_VERSION]'
168
+ * # e.g.
169
+ * pod 'Protobuf', '~> 3.14.0'
170
+ * ```
171
+ *
172
+ * @hide For the implementation details,
173
+ * this property is actually handled by `expo-modules-autolinking` but not the config-plugins inside expo-build-properties.
174
+ */
175
+ extraPods?: ExtraIosPodDependency[];
176
+ }
177
+
178
+ /**
179
+ * Interface representing extra CocoaPods dependency.
180
+ * @see [Podfile syntax reference](https://guides.cocoapods.org/syntax/podfile.html#pod)
181
+ * @platform ios
182
+ */
183
+ export interface ExtraIosPodDependency {
184
+ /**
185
+ * Name of the pod.
186
+ */
187
+ name: string;
188
+ /**
189
+ * Version of the pod.
190
+ * CocoaPods supports various [versioning options](https://guides.cocoapods.org/using/the-podfile.html#pod).
191
+ * @example `~> 0.1.2`
192
+ */
193
+ version?: string;
194
+ /**
195
+ * Build configurations for which the pod should be installed.
196
+ * @example `['Debug', 'Release']`
197
+ */
198
+ configurations?: string[];
199
+ /**
200
+ * Whether this pod should use modular headers.
201
+ */
202
+ modular_headers?: boolean;
203
+ /**
204
+ * Custom source to search for this dependency.
205
+ * @example `https://github.com/CocoaPods/Specs.git`
206
+ */
207
+ source?: string;
208
+ /**
209
+ * Custom local filesystem path to add the dependency.
210
+ * @example `~/Documents/AFNetworking`
211
+ */
212
+ path?: string;
213
+ /**
214
+ * Custom podspec path.
215
+ * @example `https://example.com/JSONKit.podspec`
216
+ */
217
+ podspec?: string;
218
+ /**
219
+ * Test specs can be optionally included via the :testspecs option. By default, none of a Pod's test specs are included.
220
+ * @example `['UnitTests', 'SomeOtherTests']`
221
+ */
222
+ testspecs?: string[];
223
+ /**
224
+ * Use the bleeding edge version of a Pod.
225
+ *
226
+ * @example
227
+ * ```
228
+ * { "name": "AFNetworking", "git": "https://github.com/gowalla/AFNetworking.git", "tag": "0.7.0" }
229
+ * ```
230
+ *
231
+ * This acts like to add this pod dependency statement:
232
+ * ```
233
+ * pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :tag => '0.7.0'
234
+ * ```
235
+ */
236
+ git?: string;
237
+ /**
238
+ * The git branch to fetch. See the {@link git} property for more information.
239
+ */
240
+ branch?: string;
241
+ /**
242
+ * The git tag to fetch. See the {@link git} property for more information.
243
+ */
244
+ tag?: string;
245
+ /**
246
+ * The git commit to fetch. See the {@link git} property for more information.
138
247
  */
139
- unstable_networkInspector?: boolean;
248
+ commit?: string;
140
249
  }
141
250
 
142
251
  /**
@@ -195,7 +304,9 @@ const schema: JSONSchemaType<PluginConfigType> = {
195
304
  nullable: true,
196
305
  },
197
306
 
198
- unstable_networkInspector: { type: 'boolean', nullable: true },
307
+ networkInspector: { type: 'boolean', nullable: true },
308
+
309
+ extraMavenRepos: { type: 'array', items: { type: 'string' }, nullable: true },
199
310
  },
200
311
  nullable: true,
201
312
  },
@@ -211,7 +322,30 @@ const schema: JSONSchemaType<PluginConfigType> = {
211
322
  nullable: true,
212
323
  },
213
324
 
214
- unstable_networkInspector: { type: 'boolean', nullable: true },
325
+ networkInspector: { type: 'boolean', nullable: true },
326
+
327
+ extraPods: {
328
+ type: 'array',
329
+ items: {
330
+ type: 'object',
331
+ required: ['name'],
332
+ properties: {
333
+ name: { type: 'string' },
334
+ version: { type: 'string', nullable: true },
335
+ configurations: { type: 'array', items: { type: 'string' }, nullable: true },
336
+ modular_headers: { type: 'boolean', nullable: true },
337
+ source: { type: 'string', nullable: true },
338
+ path: { type: 'string', nullable: true },
339
+ podspec: { type: 'string', nullable: true },
340
+ testspecs: { type: 'array', items: { type: 'string' }, nullable: true },
341
+ git: { type: 'string', nullable: true },
342
+ branch: { type: 'string', nullable: true },
343
+ tag: { type: 'string', nullable: true },
344
+ commit: { type: 'string', nullable: true },
345
+ },
346
+ },
347
+ nullable: true,
348
+ },
215
349
  },
216
350
  nullable: true,
217
351
  },