Skip to content

Ported gradle build files to kotlin DSL#9191

Merged
tshmieldev merged 16 commits intomainfrom
@tshmieldev/groovy->kt
Apr 13, 2026
Merged

Ported gradle build files to kotlin DSL#9191
tshmieldev merged 16 commits intomainfrom
@tshmieldev/groovy->kt

Conversation

@tshmieldev
Copy link
Copy Markdown
Member

@tshmieldev tshmieldev commented Mar 26, 2026

Summary

Migrated the gradle build files to kotlin DSL, formatted the kotlin files

Test plan

Build the app

@tjzel
Copy link
Copy Markdown
Collaborator

tjzel commented Mar 31, 2026

Please merge to latest main 🙏

@tshmieldev tshmieldev force-pushed the @tshmieldev/groovy->kt branch from f50dbb5 to cf29183 Compare April 2, 2026 08:09
@tshmieldev tshmieldev force-pushed the @tshmieldev/groovy->kt branch from 648fa22 to b8377b9 Compare April 2, 2026 09:25
Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Comment thread packages/react-native-reanimated/android/build.gradle.kts
Comment thread packages/react-native-reanimated/android/build.gradle
Comment thread packages/react-native-reanimated/android/build.gradle
Comment thread packages/react-native-reanimated/android/build.gradle.kts
Comment thread packages/react-native-reanimated/android/build.gradle.kts
Comment thread packages/react-native-reanimated/android/build.gradle.kts
Comment thread packages/react-native-reanimated/android/build.gradle
@tjzel tjzel marked this pull request as ready for review April 2, 2026 12:55
Comment thread packages/react-native-worklets/android/build.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/build.gradle.kts
Comment thread packages/react-native-worklets/android/build.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/build.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/build.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/build.gradle.kts
Comment thread packages/react-native-worklets/android/fix-prefab.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/fix-prefab.gradle.kts Outdated
Copilot AI review requested due to automatic review settings April 7, 2026 09:16
Copy link
Copy Markdown
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 migrates the Android Gradle build logic for the Worklets and Reanimated packages from Groovy (.gradle) to Kotlin DSL (.gradle.kts), and inlines the previous Spotless/fix-prefab script logic into Kotlin-based equivalents.

Changes:

  • Replaced build.gradle with build.gradle.kts for both react-native-worklets and react-native-reanimated.
  • Ported the prefab “touch prefab_config.json to retrigger prefab CLI” workaround from Groovy to Kotlin DSL for Worklets.
  • Removed standalone spotless.gradle scripts and configured Spotless directly in the Kotlin DSL build scripts.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/react-native-worklets/android/spotless.gradle Removed Groovy Spotless script (Spotless config moved into Kotlin DSL).
packages/react-native-worklets/android/fix-prefab.gradle.kts Added Kotlin DSL version of the prefab refresh workaround.
packages/react-native-worklets/android/fix-prefab.gradle Removed Groovy version of the prefab refresh workaround.
packages/react-native-worklets/android/build.gradle.kts Added Kotlin DSL build script for Worklets (publishing, Android config, feature flags, prefab headers, validations).
packages/react-native-worklets/android/build.gradle Removed Groovy build script for Worklets.
packages/react-native-reanimated/android/spotless.gradle Removed Groovy Spotless script (Spotless config moved into Kotlin DSL).
packages/react-native-reanimated/android/build.gradle.kts Added Kotlin DSL build script for Reanimated (publishing, Android config, feature flags, validations, worklets dependency handling).
packages/react-native-reanimated/android/build.gradle Removed Groovy build script for Reanimated.

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

Comment thread packages/react-native-worklets/android/build.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/fix-prefab.gradle.kts Outdated
Copy link
Copy Markdown
Collaborator

@tjzel tjzel left a comment

Choose a reason for hiding this comment

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

The comments apply to both gradle files.

Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Comment thread packages/react-native-reanimated/android/build.gradle.kts
Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Comment thread packages/react-native-reanimated/android/build.gradle.kts
Comment thread packages/react-native-worklets/android/fix-prefab.gradle.kts Outdated
Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Copy link
Copy Markdown
Collaborator

@tjzel tjzel left a comment

Choose a reason for hiding this comment

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

Just some final nits.

Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Comment thread packages/react-native-reanimated/android/build.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/build.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/build.gradle.kts Outdated
Comment thread packages/react-native-worklets/android/build.gradle.kts Outdated
@tshmieldev tshmieldev added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit dc4db2d Apr 13, 2026
14 checks passed
@tshmieldev tshmieldev deleted the @tshmieldev/groovy->kt branch April 13, 2026 11:19
github-merge-queue bot pushed a commit that referenced this pull request Apr 15, 2026
## Summary

Use of reflections in #9191 resulted in `compile_commands.json` files
not being exported after compilation due to the `abi` field sitting in a
base class.

Here instead I traverse directories to find the file.

## Test plan

`compile_commands.json` is exported again after the compilation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants