Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[linear-gradient] fix crash when r8 enabled #21580

Merged
merged 3 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/expo-linear-gradient/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### 🐛 Bug fixes

- Fixed crashes when R8 or Proguard is enabled. ([#21580](https://github.com/expo/expo/pull/21580) by [@kudo](https://github.com/kudo))

### 💡 Others

## 12.1.1 — 2023-02-09
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.graphics.Shader;
import android.util.TypedValue;
import android.view.View;
import expo.modules.core.interfaces.DoNotStrip;

public class LinearGradientView extends View {
private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
Expand All @@ -22,6 +23,8 @@ public class LinearGradientView extends View {
private int[] mSize = {0, 0};
private float[] mBorderRadii = {0, 0, 0, 0, 0, 0, 0, 0};

// Keeps this primary constructor from Proguard/R8 for ViewDefinitionBuilder
@DoNotStrip
public LinearGradientView(Context context) {
super(context);
}
Expand Down