Skip to content

Commit f42b978

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Add SoLoaderLibrary annotation stub for Gradle builds
Summary: Add a stub `SoLoaderLibrary` annotation at `com.facebook.soloader.annotation.SoLoaderLibrary` for open-source Gradle builds. The real annotation lives in `fbandroid/java/com/facebook/soloader/annotation/` and is used by the internal Buck build for compile-time validation of native library merging. Since it is not published to Maven Central, the Gradle build fails with "Unresolved reference" when any ReactAndroid file uses it. The stub follows the existing pattern used by `DebugOverlayTag` and `ProcessorBase`: the file lives in the shared source tree and gets compiled by Gradle, while the BUCK file has `autoglob = False` with no `srcs`, making it an empty target so Buck continues using the real internal annotation. Differential Revision: D94950035
1 parent dd6980c commit f42b978

File tree

1 file changed

+17
-0
lines changed
  • packages/react-native/ReactAndroid/src/main/java/com/facebook/soloader/annotation

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
package com.facebook.soloader.annotation
9+
10+
/**
11+
* Stub annotation for open-source Gradle builds. The real implementation lives in
12+
* fbandroid/java/com/facebook/soloader/annotation/ and is used by the internal Buck build for
13+
* compile-time validation of native library merging.
14+
*/
15+
@Retention(AnnotationRetention.SOURCE)
16+
@Target(AnnotationTarget.CLASS)
17+
internal annotation class SoLoaderLibrary(vararg val value: String)

0 commit comments

Comments
 (0)