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

refactor: simplify dependency version resource generation #2851

Conversation

AndroidBob
Copy link
Collaborator

@AndroidBob AndroidBob commented Apr 3, 2024

Cherry pick from the original PRs:


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  1. doesn't rely on Gradle's input/output properties. Inputs and Outputs tell Gradle whether a task should be executed again or if it it already up-to-date.
  2. Maybe it knows a bit too much about Kalium, where these dependencies are defined, and where it should write the JSON to.
  3. It is a bit over complicated, by parsing the version catalog manually

Solutions

  1. Rewrite it to be an abstract class and make it use Input/Output. By doing this, Gradle will only run the task again if the output file was altered, or the inputs have changed.
  2. Make the task itself simpler: its only responsibility is to write a to a specified Json file. When registering the task, the caller can link it to Kalium and to the app's asset directory.
  3. The caller can figure it out by just accessing the version catalog instead of having to parse the toml file.

Dependencies

This PR depends on:


PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. .

@AndroidBob AndroidBob added the cherry-pick PR is cherry-picking changes from another banch label Apr 3, 2024
Copy link
Contributor

github-actions bot commented Apr 3, 2024

Test Results

880 tests  ±0   880 ✅ ±0   10m 21s ⏱️ + 1m 25s
122 suites ±0     0 💤 ±0 
122 files   ±0     0 ❌ ±0 

Results for commit a80b6ea. ± Comparison against base commit 80d5aab.

♻️ This comment has been updated with latest results.

@AndroidBob
Copy link
Collaborator Author

Build 3939 failed.

@yamilmedina yamilmedina requested review from a team, typfel, alexandreferris, borichellow, MohamadJaara and vitorhugods and removed request for a team April 8, 2024 09:34
@vitorhugods vitorhugods force-pushed the refactor/simplify-dependency-version-declaration-cherry-pick branch from 0aa1fe5 to a80b6ea Compare April 8, 2024 12:28
@vitorhugods vitorhugods enabled auto-merge April 8, 2024 12:29
@AndroidBob
Copy link
Collaborator Author

Build 4054 failed.

@vitorhugods vitorhugods added this pull request to the merge queue Apr 8, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

APKs built during tests are available here. Scroll down to Artifacts!

Merged via the queue into develop with commit 319be19 Apr 8, 2024
13 of 14 checks passed
@vitorhugods vitorhugods deleted the refactor/simplify-dependency-version-declaration-cherry-pick branch April 8, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants