-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 b080a90
Showing
18 changed files
with
66 additions
and
120 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
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,23 @@ | ||
// 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')) | ||
} |
File renamed without changes.
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 |
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,10 @@ | ||
apply plugin: 'java' | ||
|
||
dependencies { | ||
|
||
} | ||
|
||
java { | ||
sourceCompatibility(JavaVersion.VERSION_1_8) | ||
targetCompatibility(JavaVersion.VERSION_1_8) | ||
} |
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
...oid/annotations/src/main/java/com/facebook/react/module/annotations/BaseNativeModule.java
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,8 @@ | ||
package com.facebook.react.module.annotations; | ||
|
||
/** | ||
* Used to make sure classes passed to the ReactModule annotation are actually an instance of | ||
* NativeModule without needing a dependency on NativeModule that is in the ReactAndroid target. | ||
*/ | ||
public interface BaseNativeModule { | ||
} |
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
File renamed without changes.
File renamed without changes.
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