mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34386 Current we expose native code (.h, .cpp) inside the src/main/java folder. This is making impossible for users on New Architecture to open the project inside Android Studio. The problem is that the src/main/java is reserved to Java/Kotlin sources only. AGP 7.2 also removed support for mixed source roots: https://developer.android.com/studio/releases/gradle-plugin#duplicate-content-roots This is essentially forcing users to write Java code without any autocompletion as all the React Native Java classes are considered C++ files. I'm addressing this issue folder by folder by moving them from `ReactAndroid/src/main/java/com/facebook/...` to `ReactAndroid/src/main/jni/react/...` This is the diff for reactperflogger Changelog: [Internal] [Changed] - Do not store .cpp/.h files inside src/main/java - reactperflogger Reviewed By: cipolleschi Differential Revision: D38584681 fbshipit-source-id: 8b65b3fa47a7f106c7fea79fd739f0e4e37efa2a
26 lines
718 B
Python
26 lines
718 B
Python
load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_target", "rn_android_library")
|
|
|
|
rn_android_library(
|
|
name = "reactperflogger",
|
|
srcs = glob(
|
|
[
|
|
"*.java",
|
|
],
|
|
),
|
|
autoglob = False,
|
|
labels = [
|
|
"pfh:ReactNative_CommonInfrastructurePlaceholder",
|
|
"supermodule:xplat/default/public.react_native.infra",
|
|
],
|
|
language = "JAVA",
|
|
required_for_source_only_abi = True,
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
|
|
react_native_dep("libraries/fbjni:java"),
|
|
react_native_target("jni/react/reactperflogger:jni"),
|
|
],
|
|
)
|