Skip to content

Modernize native project config, tooling and CI - #18

Merged
ivnbogdan merged 2 commits into
mainfrom
chore/modernize-native-and-tooling
Aug 15, 2026
Merged

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

Conversation

@ivnbogdan

@ivnbogdan ivnbogdan commented Jul 27, 2026

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)
  • Move to the modern compileSdk/minSdk property DSL (the method forms are slated for removal in AGP 10) with fallbacks raised 27/16 → 36/24, and drop targetSdkVersion (deprecated for library modules, removed from AGP 9's library DSL); 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; the TS6 baseUrl deprecation tsup still triggers internally is silenced inside tsup's dts options, keeping the shared tsconfig loadable by TypeScript ≤ 5.9 tooling
  • Add prepublishOnly (build + test) so npm publish can never ship a stale dist/
  • CI: Node 24, actions/checkout@v7, actions/setup-node@v7, npm ci with caching

Examples

  • @aptabase/react-native ^0.3.10 → ^0.5.0, with both example lockfiles regenerated to match
  • 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. The final property-DSL form was additionally validated by configuring the module standalone under Gradle 9.3.1 + AGP 8.12
  • npm ci in both example directories validates against the regenerated lockfiles
  • 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

@ivnbogdan
ivnbogdan force-pushed the chore/modernize-native-and-tooling branch from 85e375e to 2c4fdfa Compare July 27, 2026 18:51
ivnbogdan and others added 2 commits August 15, 2026 08:51
Android: declare the namespace required by AGP 8 (moved out of
AndroidManifest.xml), move to the modern compileSdk/minSdk property
DSL with fallbacks raised from the 2017-era 27/16 to 36/24, drop
targetSdkVersion (deprecated for library modules and removed from
AGP 9's library DSL), 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.
The final property-DSL form was additionally validated by configuring
the module standalone under Gradle 9.3.1 + AGP 8.12.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 and switch moduleResolution
to bundler; the TS6 baseUrl deprecation that tsup still triggers
internally is silenced inside tsup's dts options instead of the
shared tsconfig, which TypeScript <= 5.9 tooling would reject. Add a
prepublishOnly script so npm publish always builds and tests first.
CI moves to Node 24, actions v7 and npm ci.

Examples: depend on @aptabase/react-native ^0.5.0 (both lockfiles
regenerated) 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.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ivnbogdan
ivnbogdan force-pushed the chore/modernize-native-and-tooling branch from 2c4fdfa to d9fb213 Compare August 15, 2026 05:51
@ivnbogdan
ivnbogdan merged commit 22e66bc into main Aug 15, 2026
1 check passed
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