Skip to content

Reproducible build #2911

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

Merged
merged 3 commits into from
May 27, 2024
Merged

Reproducible build #2911

merged 3 commits into from
May 27, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented May 24, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Using BuildConfig.VERSION_CODE break the reproducible build since the value will always end with 0, and should end with a digit depending on the architecture.

Motivation and context

Should fix the issue regarding diff in versionCode observed in #1418 (comment)

Screenshots / GIFs

NA

Tests

  • NA

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty requested a review from a team as a code owner May 24, 2024 13:24
@bmarty bmarty requested review from ganfra and removed request for a team May 24, 2024 13:24
@bmarty bmarty mentioned this pull request May 24, 2024
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/NfBZCv

Copy link

codecov bot commented May 24, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 75.23%. Comparing base (8f6190e) to head (f8aac80).
Report is 24 commits behind head on develop.

Files Patch % Lines
...droid/libraries/androidutils/system/SystemUtils.kt 0.00% 2 Missing ⚠️
...kotlin/io/element/android/x/ElementXApplication.kt 0.00% 1 Missing ⚠️
...c/main/kotlin/io/element/android/x/di/AppModule.kt 0.00% 1 Missing ⚠️
.../src/main/kotlin/io/element/android/x/info/Logs.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2911      +/-   ##
===========================================
- Coverage    75.23%   75.23%   -0.01%     
===========================================
  Files         1550     1550              
  Lines        36954    36956       +2     
  Branches      7152     7152              
===========================================
  Hits         27803    27803              
- Misses        5415     5417       +2     
  Partials      3736     3736              

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

* last digit will always be 0.
*/
fun Context.getVersionCodeFromManifest(): Long {
return PackageInfoCompat.getLongVersionCode(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure it does work for every OS and with R8?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think R8 will remove this from the manifest, since it's used by the system to manage application upgrade.

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label May 27, 2024
@bmarty bmarty enabled auto-merge May 27, 2024 10:16
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label May 27, 2024
@bmarty bmarty merged commit 436a876 into develop May 27, 2024
24 of 26 checks passed
@bmarty bmarty deleted the feature/bma/reproducibleBuild branch May 27, 2024 10:46
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.

2 participants