diff --git a/packages/react-native-reanimated/android/build.gradle b/packages/react-native-reanimated/android/build.gradle index 3849ea8d11b..c448d839434 100644 --- a/packages/react-native-reanimated/android/build.gradle +++ b/packages/react-native-reanimated/android/build.gradle @@ -346,9 +346,19 @@ android { } sourceSets.main { java { + // Always present + srcDirs += "src/worklets/WorkletsModule/java" + + if(!hasExternalWorklets){ + srcDirs += "src/worklets/main/java" + } + if (IS_NEW_ARCHITECTURE_ENABLED) { srcDirs += "src/fabric/java" } else { + if(!hasExternalWorklets){ + srcDirs +="src/worklets/paper/java" + } srcDirs += "src/paper/java" } diff --git a/packages/react-native-reanimated/android/src/main/java/com/swmansion/worklets/WorkletsModule.java b/packages/react-native-reanimated/android/src/worklets/WorkletsModule/java/com/swmansion/worklets/WorkletsModule.java similarity index 100% rename from packages/react-native-reanimated/android/src/main/java/com/swmansion/worklets/WorkletsModule.java rename to packages/react-native-reanimated/android/src/worklets/WorkletsModule/java/com/swmansion/worklets/WorkletsModule.java diff --git a/packages/react-native-reanimated/android/src/main/java/com/swmansion/worklets/WorkletsMessageQueueThread.java b/packages/react-native-reanimated/android/src/worklets/main/java/com/swmansion/worklets/WorkletsMessageQueueThread.java similarity index 100% rename from packages/react-native-reanimated/android/src/main/java/com/swmansion/worklets/WorkletsMessageQueueThread.java rename to packages/react-native-reanimated/android/src/worklets/main/java/com/swmansion/worklets/WorkletsMessageQueueThread.java diff --git a/packages/react-native-reanimated/android/src/main/java/com/swmansion/worklets/WorkletsMessageQueueThreadBase.java b/packages/react-native-reanimated/android/src/worklets/main/java/com/swmansion/worklets/WorkletsMessageQueueThreadBase.java similarity index 100% rename from packages/react-native-reanimated/android/src/main/java/com/swmansion/worklets/WorkletsMessageQueueThreadBase.java rename to packages/react-native-reanimated/android/src/worklets/main/java/com/swmansion/worklets/WorkletsMessageQueueThreadBase.java diff --git a/packages/react-native-reanimated/android/src/paper/java/com/swmansion/worklets/NativeWorkletsModuleSpec.java b/packages/react-native-reanimated/android/src/worklets/paper/java/com/swmansion/worklets/NativeWorkletsModuleSpec.java similarity index 100% rename from packages/react-native-reanimated/android/src/paper/java/com/swmansion/worklets/NativeWorkletsModuleSpec.java rename to packages/react-native-reanimated/android/src/worklets/paper/java/com/swmansion/worklets/NativeWorkletsModuleSpec.java