Skip to content

Commit

Permalink
Allow redex to optimize more of yoga by removing unneeded @DoNotStrip…
Browse files Browse the repository at this point in the history
… marks

Summary:
There are multiple `DoNotStrip` in Yoga java binding, they aren't needed.

##Changelog:
[Internal][Yoga] Allow redex to optimize more of yoga by removing unneeded DoNotStrip marks

Reviewed By: SidharthGuglani

Differential Revision: D17519844

fbshipit-source-id: 8b26800d720f34cae87754d85460abf88acbe713
  • Loading branch information
amir-shalem authored and facebook-github-bot committed Dec 4, 2019
1 parent d3980dc commit 505a216
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 56 deletions.
3 changes: 0 additions & 3 deletions ReactAndroid/src/main/java/com/facebook/yoga/YogaAlign.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaAlign {
AUTO(0),
FLEX_START(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public interface YogaBaselineFunction {
/**
* Return the baseline of the node in points. When no baseline function is set the baseline
* default to the computed height of the node.
*/
@DoNotStrip
float baseline(YogaNode node, float width, float height);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaDimension {
WIDTH(0),
HEIGHT(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaDirection {
INHERIT(0),
LTR(1),
Expand Down
3 changes: 0 additions & 3 deletions ReactAndroid/src/main/java/com/facebook/yoga/YogaDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaDisplay {
FLEX(0),
NONE(1);
Expand Down
3 changes: 0 additions & 3 deletions ReactAndroid/src/main/java/com/facebook/yoga/YogaEdge.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaEdge {
LEFT(0),
TOP(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaExperimentalFeature {
WEB_FLEX_BASIS(0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaFlexDirection {
COLUMN(0),
COLUMN_REVERSE(1),
Expand Down
3 changes: 0 additions & 3 deletions ReactAndroid/src/main/java/com/facebook/yoga/YogaJustify.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaJustify {
FLEX_START(0),
CENTER(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public int intValue() {
return mIntValue;
}

@DoNotStrip
public static YogaLogLevel fromInt(int value) {
switch (value) {
case 0: return ERROR;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public interface YogaMeasureFunction {
/**
* Return a value created by YogaMeasureOutput.make(width, height);
*/
@DoNotStrip
long measure(
YogaNode node,
float width,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaMeasureMode {
UNDEFINED(0),
EXACTLY(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaNodeType {
DEFAULT(0),
TEXT(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaOverflow {
VISIBLE(0),
HIDDEN(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaPositionType {
RELATIVE(0),
ABSOLUTE(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaPrintOptions {
LAYOUT(1),
STYLE(2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public class YogaStyleInputs {
public static final short LAYOUT_DIRECTION = 0;
public static final short FLEX_DIRECTION = 1;
Expand Down
3 changes: 0 additions & 3 deletions ReactAndroid/src/main/java/com/facebook/yoga/YogaUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaUnit {
UNDEFINED(0),
POINT(1),
Expand Down
3 changes: 0 additions & 3 deletions ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package com.facebook.yoga;

import com.facebook.proguard.annotations.DoNotStrip;

@DoNotStrip
public enum YogaWrap {
NO_WRAP(0),
WRAP(1),
Expand Down

0 comments on commit 505a216

Please sign in to comment.