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

Boolean.parse string values from gradle properties #2599

Conversation

jthure
Copy link
Contributor

@jthure jthure commented Feb 21, 2024

What

The properties VisionCamera_disableFrameProcessors and VisionCamera_enableCodeScanner when defined is returned as strings by rootProject.ext.get. So when for example setting VisionCamera_enableCodeScanner=false in gradle.properties, the read value of it is the string"false". It is later used in a conditional, but if("false") evaluates to true which is not the intended behaviour.

Changes

Use Boolean.parse to parse props that are expected to have a boolean value

Tested on

Related issues

Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 25, 2024 11:27am

@mrousavy
Copy link
Owner

Hey - thanks for your PR, but the line is a bit messy - could you instead create a separate function below safeExtGet called safeExtGetBool that does this parsing?

Thank you!

@jthure
Copy link
Contributor Author

jthure commented Feb 25, 2024

Hey - thanks for your PR, but the line is a bit messy - could you instead create a separate function below safeExtGet called safeExtGetBool that does this parsing?

Thank you!

Done!

@mrousavy
Copy link
Owner

Awesome, thanks man LGTM!

@mrousavy mrousavy merged commit bca9472 into mrousavy:main Feb 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants