chore: Generate type-safe accessors for convention plugins #186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Update the build-logic project to generate and consume type-safe accessors for the various plugins being applied to the main project.
Previously, because the version catalog information was not available when compiling our convention plugins, the convention plugins needed to use the string IDs when applying plugins to the consuming project. This works fine, but loses one of the advantages of using a version catalog in the first place.
This PR adds a task to the build-logic project such that, when build-logic is built, the
libs.versions.toml
catalog (which is shared between amplify-ui and build-logic projects) is read and used to generate a class definition enumerating its contents. The plugin code in build-logic can then import that class to get type-safe accessors that refer to the dependency declarations in the version catalog, which can be used in place of their String IDs.How did you test these changes?
Verified project still built correctly
Documentation update required?
General Checklist
fix(liveness): message
,fix(authenticator): message
,fix(all): message
)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.