Skip to content

Use BuildConfig instead of reading version from properties file - #349

Merged
Keith-wright merged 2 commits into
pusher:masterfrom
daniel-shuy:build-config
Oct 20, 2026
Merged

Keith-wright merged 2 commits into
pusher:masterfrom
daniel-shuy:build-config

Conversation

@daniel-shuy

Copy link
Copy Markdown

What does this PR do?

Fixes #288

Use com.github.gmazzo.buildconfig Gradle plugin (a plugin that generates BuildConfig like the Gradle android plugin, but for non-Android Java projects) to generate BuildConfig with project version at build time, instead of reading from pusher.properties at runtime, which fails with DiskReadViolation when running on Android with StrictMode enabled.

CHANGELOG

  • [CHANGED] Use BuildConfig instead of reading version from properties file

@daniel-shuy

Copy link
Copy Markdown
Author

Do I need to update the version in build.gradle to 2.4.5? Would be nice to have a CONTRIBUTING.md file for contributors

@Keith-wright

Copy link
Copy Markdown
Contributor

Thanks for the PR, @daniel-shuy, and sorry for the wait. No version bump needed, since that's handled by our release process. I've merged master to resolve the build.gradle conflict.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.43%. Comparing base (d0a7ea8) to head (f657b63).
⚠️ Report is 23 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #349      +/-   ##
============================================
+ Coverage     74.65%   75.43%   +0.77%     
- Complexity      363      373      +10     
============================================
  Files            48       48              
  Lines          1965     1970       +5     
  Branches        145      148       +3     
============================================
+ Hits           1467     1486      +19     
+ Misses          433      421      -12     
+ Partials         65       63       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Keith-wright
Keith-wright merged commit d55b278 into pusher:master Oct 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PusherOptions.readVersionFromProperties android.os.strictmode.DiskReadViolation

4 participants