Skip to content

feat: codegen in android packages#206

Open
WoLewicki wants to merge 32 commits intomainfrom
wolewicki/android-codegen
Open

feat: codegen in android packages#206
WoLewicki wants to merge 32 commits intomainfrom
wolewicki/android-codegen

Conversation

@WoLewicki
Copy link
Member

@WoLewicki WoLewicki commented Jan 13, 2026

📝 Description

PR adding codegen artifacts (static libs and headers) as parts of library .aar and implementing:

It is done to speed up the builds by removing the necessity of building codegen each time you build an app since we believe it should be library's responsibility to provide those artifacts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch is for rn 0.81.4 but as long as the code in those files won't change in rn repo, it should work with other versions too.

@radoslawrolka radoslawrolka requested a review from Copilot January 14, 2026 10:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a codegen artifacts prebuilt system for Android libraries to reduce build times by eliminating the need to rebuild codegen artifacts on every app build. The system packages prebuilt static libraries and headers in .aar files and provides mechanisms to extract and link them in client projects.

Changes:

  • Modified build pipeline to generate both standard and codegen-enabled library versions
  • Implemented extraction and linking of prebuilt codegen artifacts through Gradle plugin
  • Temporarily disabled database status tracking and modified to use development branch for testing

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
react-native-versions.json Removed older React Native versions from the supported list
packages/scheduler/src/scheduler.ts Disabled build scheduling checks and database record creation; switched to development branch
packages/publisher/update-build-status.ts Commented out build status update logic
packages/publisher/publish-library-android.ts Added codegen classifier suffix and disabled database status updates
packages/gradle-client/rnrepo-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt Added codegen detection, CMake wrapper configuration, and prebuilt artifact extraction logic
packages/gradle-client/rnrepo-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/ExtractPrebuiltsTask.kt New task to extract codegen static libraries and headers from AAR files
packages/database/src/index.ts Added early returns to bypass database operations
packages/builder/patches/@react-native+codegen+0.81.4.patch Changed codegen library type from OBJECT to STATIC
packages/builder/gradle_init_scripts/add-publishing.gradle Added codegen artifact extraction, header packaging, and publishing with codegen classifier
packages/builder/build-utils.ts Added patch file copying and application
packages/builder/build-library-android.ts Implemented dual publishing (standard and codegen versions) with detection logic
libraries.json Reduced library list to single entry for testing purposes
.github/workflows/publish-library-android.yml Updated to use development secrets and checkout workflow branch

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@WoLewicki WoLewicki changed the title feat: started work with extending plugin feat: codegen in android packages Jan 15, 2026
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.

3 participants