-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable module annotation processor in OSS
- Loading branch information
1 parent
a4757d2
commit 03d7adf
Showing
29 changed files
with
155 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
ReactAndroid/src/main/java/com/facebook/react/module/annotations/BUCK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_target", "rn_android_library") | ||
load("//tools/build_defs/oss:rn_defs.bzl", "rn_android_library") | ||
|
||
rn_android_library( | ||
name = "annotations", | ||
srcs = glob(["**/*.java"]), | ||
labels = ["supermodule:xplat/default/public.react_native.infra"], | ||
required_for_source_only_abi = True, | ||
visibility = [ | ||
"PUBLIC", | ||
], | ||
deps = [ | ||
react_native_dep("third-party/java/infer-annotations:infer-annotations"), | ||
react_native_dep("third-party/java/jsr-305:jsr-305"), | ||
react_native_target("java/com/facebook/react/bridge:interfaces"), | ||
exported_deps = [ | ||
"//android/annotations/src/main/java/com/facebook/react/module/annotations:annotations", | ||
], | ||
) |
7 changes: 3 additions & 4 deletions
7
ReactAndroid/src/main/java/com/facebook/react/module/model/BUCK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "rn_android_library") | ||
load("//tools/build_defs/oss:rn_defs.bzl", "rn_android_library") | ||
|
||
rn_android_library( | ||
name = "model", | ||
srcs = glob(["**/*.java"]), | ||
labels = ["supermodule:xplat/default/public.react_native.infra"], | ||
visibility = [ | ||
"PUBLIC", | ||
], | ||
deps = [ | ||
react_native_dep("third-party/java/jsr-305:jsr-305"), | ||
exported_deps = [ | ||
"//android/annotations/src/main/java/com/facebook/react/module/model:model", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
apply plugin: 'java' | ||
|
||
sourceSets.configureEach { sourceSet -> | ||
tasks.named(sourceSet.compileJavaTaskName).configure { | ||
options.annotationProcessorGeneratedSourcesDirectory = file("$buildDir/generated/sources/annotationProcessor/java/${sourceSet.name}") | ||
} | ||
} | ||
|
||
java { | ||
sourceCompatibility(JavaVersion.VERSION_1_8) | ||
targetCompatibility(JavaVersion.VERSION_1_8) | ||
} | ||
|
||
dependencies { | ||
implementation('com.squareup:javapoet:1.8.0') | ||
implementation('com.facebook.infer.annotation:infer-annotation:0.11.2') | ||
implementation(project(':react-native-annotations')) | ||
} |
20 changes: 20 additions & 0 deletions
20
android/annotations-compiler/src/main/java/com/facebook/react/module/processing/BUCK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_target", "rn_java_annotation_processor", "rn_java_library") | ||
|
||
rn_java_library( | ||
name = "processing", | ||
srcs = glob(["*.java"]), | ||
labels = ["supermodule:xplat/default/public.react_native.infra"], | ||
source = "8", | ||
target = "8", | ||
visibility = [ | ||
"PUBLIC", | ||
], | ||
deps = [ | ||
react_native_dep("third-party/java/infer-annotations:infer-annotations"), | ||
react_native_dep("third-party/java/javapoet:javapoet"), | ||
react_native_dep("third-party/java/jsr-305:jsr-305"), | ||
react_native_target("java/com/facebook/react/module/annotations:annotations"), | ||
react_native_target("java/com/facebook/react/module/model:model"), | ||
react_native_target("java/com/facebook/react/turbomodule/core/interfaces:interfaces"), | ||
], | ||
) |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...tions-compiler/src/main/resources/META-INF/services/javax.annotation.processing.Processor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.facebook.react.module.processing.ReactModuleSpecProcessor |
Oops, something went wrong.