brick-module 0.5.1 → 0.5.2

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.
@@ -255,6 +255,28 @@ ext.applyBrickModules = { settings, args ->
255
255
  gradle.rootProject.ext.brickCodegenRanInBuild =
256
256
  settings.ext.has("brickCodegenRan") ? settings.ext.brickCodegenRan : false
257
257
  configureAppProject(gradle)
258
+ // The compileSdkVersion in brick-codegen's generated build.gradle may be lower
259
+ // than the host project's compileSdk, so override it to match.
260
+ gradle.rootProject.subprojects { subproj ->
261
+ if (subproj.name == 'brick-codegen') {
262
+ subproj.afterEvaluate {
263
+ try {
264
+ def hostCompileSdk = 35
265
+ // Try to read compileSdk from the host app project
266
+ try {
267
+ def appProj = gradle.rootProject.findProject(":${appProjectName}")
268
+ if (appProj?.hasProperty('android')) {
269
+ hostCompileSdk = appProj.android.compileSdk ?: 35
270
+ }
271
+ } catch (Exception ignored) {}
272
+ subproj.android.compileSdkVersion hostCompileSdk
273
+ } catch (Exception e) {
274
+ println("🧱 BrickModules: Failed to override brick-codegen compileSdk: ${e.message}")
275
+ }
276
+ }
277
+ }
278
+ }
279
+
258
280
  // Inline: ensure RN autolinking doesn't fail due to missing codegen/jni for brick-module
259
281
  gradle.rootProject.subprojects { subproj ->
260
282
  if (subproj.name == 'brick-module') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brick-module",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Better React Native native module development",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -58,7 +58,7 @@
58
58
  "brick-codegen": "./bin/brick-codegen.js"
59
59
  },
60
60
  "dependencies": {
61
- "brick-codegen": "0.5.1"
61
+ "brick-codegen": "0.5.2"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "react": ">=18.2.0",