Skip to content

Modernize native project config, tooling and CI - #18

Open
ivnbogdan wants to merge 2 commits into
mainfrom
chore/modernize-native-and-tooling
Open

Modernize native project config, tooling and CI#18
ivnbogdan wants to merge 2 commits into
mainfrom
chore/modernize-native-and-tooling

Conversation

@ivnbogdan

Copy link
Copy Markdown
Contributor

Summary

The JS layer of this SDK was refreshed recently (0.5.0), but the native project config and build tooling dated back to the original 2017-era module template. This PR brings both up to current standards while keeping the existing compatibility range (react-native >=0.81.4, open-ended).

Native (Android)

  • Declare namespace in build.gradle (required by AGP 8; removed the package attribute from AndroidManifest.xml, which AGP 8.3+ rejects)
  • Raise fallback SDK versions 27/16/27 → 36/24/36 and target Java 17
  • Drop obsolete buildToolsVersion, abiFilters (pure-Java module), versionCode and lint workarounds
  • Keep com.facebook.react:react-native:+ — the React Native Gradle Plugin substitutes the app's exact react-android version

Native (iOS)

  • Deployment target iOS 10 → 15.1 (React Native 0.81+ floor)
  • s.dependency 'React''React-Core'
  • Fix s.source, which still pointed at the third-party module template this project was scaffolded from

Tooling & CI

  • TypeScript ~6.0.3 (7.0's Go-based compiler is incompatible with tsup's dts step), vite 8, vitest 4, @types/node 24, tsup 8.5.1
  • tsconfig: remove unused baseUrl/paths, moduleResolution: bundler
  • CI: Node 24, actions/checkout@v7, actions/setup-node@v7, npm ci with caching

Examples

  • @aptabase/react-native ^0.3.10 → ^0.5.0
  • Add react-dom/react-native-web to HelloWorldExpo (missing since web support landed in feat: add react native web support #13, expo export --platform web failed without them)

Validation

  • npm run build (ESM + dts) and all 30 unit tests pass on the new toolchain
  • Fresh React Native 0.86 app consuming the packed tarball: autolinking works, consumer tsc --noEmit passes, and Android assembleDebug succeeds (Gradle 9.3.1, AGP 8, JDK 21, compileSdk 36) with RNAptabaseModule compiled into the APK — this build fails on main without the namespace fix
  • HelloWorldExpo (Expo 54 / RN 0.81.4, the floor of the peer range): web export succeeds with the updated library
  • iOS: podspec changes are static-only validation (no CocoaPods/iOS SDK on the build machine)

🤖 Generated with Claude Code

Android: declare the namespace required by AGP 8 (moved out of
AndroidManifest.xml), raise fallback SDK versions from the 2017-era
27/16/27 to 36/24/36, target Java 17 and drop obsolete buildTools,
abiFilters and lint settings. The react-native:+ dependency stays: the
React Native Gradle Plugin substitutes the app's react-android version.

iOS: raise the deployment target from iOS 10 to 15.1 (React Native
0.81+ floor), depend on React-Core instead of the legacy React umbrella
pod, and point s.source at this repository instead of the module
template the project was scaffolded from.

Verified against a fresh React Native 0.86 app (Gradle 9.3.1, AGP 8,
JDK 21, SDK 36): assembleDebug succeeds with the module compiled in.
Bump the build/test toolchain: TypeScript 6.0 (7.0 is incompatible with
tsup's dts step), vite 8, vitest 4, @types/node 24. Remove the unused
baseUrl/paths pair from tsconfig, switch moduleResolution to bundler
and silence the TS6 baseUrl deprecation that tsup still triggers
internally. CI moves to Node 24, actions v7 and npm ci.

Examples: depend on @aptabase/react-native ^0.5.0 and add the
react-dom/react-native-web pair HelloWorldExpo was missing for web
support.

30/30 unit tests pass; example web export verified on Expo 54.
@ivnbogdan
ivnbogdan force-pushed the chore/modernize-native-and-tooling branch from 85e375e to 2c4fdfa Compare July 27, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant