mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Adding @CountEnum to simple enums in xplat/js
Summary: Using The Count to transform enums to ints in production builds: https://our.intern.facebook.com/intern/wiki/Android-java-transforms/the-count/ Reviewed By: achen1 Differential Revision: D9614432 fbshipit-source-id: 1b1a197ad8f4962712d6006ab07b3beb3eaf2432
This commit is contained in:
committed by
Facebook Github Bot
parent
01d5eff425
commit
06bf7b1f00
@@ -18,6 +18,7 @@ rn_java_library(
|
||||
source = "7",
|
||||
target = "7",
|
||||
deps = [
|
||||
react_native_dep("java/com/facebook/thecount:thecount"),
|
||||
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"),
|
||||
|
||||
@@ -53,6 +53,8 @@ import javax.lang.model.type.TypeMirror;
|
||||
import javax.lang.model.util.Elements;
|
||||
import javax.lang.model.util.Types;
|
||||
|
||||
import com.facebook.thecount.api.CountEnum;
|
||||
|
||||
/**
|
||||
* This annotation processor crawls subclasses of ReactShadowNode and ViewManager and finds their
|
||||
* exported properties with the @ReactProp or @ReactGroupProp annotation. It generates a class
|
||||
@@ -549,6 +551,7 @@ public class ReactPropertyProcessor extends AbstractProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
@CountEnum
|
||||
private enum SettableType {
|
||||
VIEW_MANAGER,
|
||||
SHADOW_NODE
|
||||
|
||||
Reference in New Issue
Block a user