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

Migrate to version catalog #712

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

StefMa
Copy link

@StefMa StefMa commented May 17, 2024

📜 Description

Migrate most of the dependencies from the Dependencies.kt file into Gradles version catalog.
Basically fixes #486

For include/composite builds I added a symlink to share literally anything in a single libs.versions.toml file.

Unfourtnaly, the I can't move anything. Thre is still stuff left in Dependencies.kt.
Most noteworthy the BuildPluginsVersion.AGP (which is fine IMHO), but also the Libs.PROGUARD.
I can't remove them and still need sometimes the buildscript block because the gradle files are in groovy and it seems there is no possibility to use the BuildPluginsVersion.AGP from a groovy script.. 🤔 Didn't worked for me.

💡 Motivation and Context

As mentioned, this fixed #486
Just wanted to tackle this 🤷 🙃

💚 How did you test it?

Since this is about dependency mangament basically any task would reveal if everything is correct as dependency stuff happen on configuration time.
However, I also create my own fork and created a PR to check stuff.
See StefMa#1

Only the matrix builds failing because of the lack of a SENTRY_AUTH_TOKEN.

To note also:
Gradle 7.0.4 does not work because we have to enable the featurePreview("VERSION_CATALOGS").
I'm not sure if it worth it to add or just drop this test case.
This Gradle version is quite old, but this is not my decision 🙃

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@StefMa
Copy link
Author

StefMa commented May 28, 2024

@markushi

The tests failing with

Unrecognized auth token format!

secrets are not available for PRs.
See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#accessing-secrets
In your workflow file you're using SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}.

A potential workaorund would be to use pull_request_target in combination of checking out the PR branch.
In combination with required reviewers it might somewhat safe 😅
See also https://github.com/orgs/community/discussions/50161#discussioncomment-5824158

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.

Use toml file to share library versions
1 participant