Commit 787b3bb
committed
fix(android): pin react-android aarMetadata.minCompileSdk to 34
AGP 9 changed the default so a library propagates a minCompileSdk equal to
its own compileSdk. Since react-android compiles against compileSdk 36, this
now forces every consuming library/app to compileSdk >= 36 (e.g. it breaks
libraries still on compileSdk 35 at checkAarMetadata).
RN does not actually require API 36: its public ABI exposes no android type
newer than ~API 23, the highest framework constant referenced in code is
UPSIDE_DOWN_CAKE (34), and the source is deliberately written to compile
against SDK 34 (see util/AndroidVersion.kt, which abstracts the 35/36 version
codes and the API-35 windowOptOutEdgeToEdgeEnforcement attribute). compileSdk
is 36 only to build against the latest platform.
Set minCompileSdk = 34 explicitly to restore the pre-AGP-9 behavior and avoid
needlessly forcing the library ecosystem onto compileSdk 36. The
binary-compatibility-validator dump (ReactAndroid.api) guards against future
regressions: adding an API 35/36 type to the public ABI would change that file
and signal that this floor must rise.1 parent ad2cf4d commit 787b3bb
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
556 | 565 | | |
557 | 566 | | |
558 | 567 | | |
| |||
0 commit comments