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

[FR]: Use gradle version catalog's type-safe accessors in build-logic #317

Open
2 tasks done
AfigAliyev opened this issue Oct 3, 2022 · 1 comment
Open
2 tasks done
Labels
enhancement New feature or request waiting Waiting on (blocked by) someone or something

Comments

@AfigAliyev
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

Currently, build-logic uses the gradle version catalog without type-safe accessors and the names of libraries and plugins are hard-coded.

For example, the AndroidFeatureConventionPlugin has the following code snippet:

dependencies {
    add("implementation", libs.findLibrary("androidx.hilt.navigation.compose").get())
    add("implementation", libs.findLibrary("androidx.lifecycle.runtimeCompose").get())
    add("implementation", libs.findLibrary("androidx.lifecycle.viewModelCompose").get())
}

Describe the solution

With the gradle version catalog's type-safe accessors, the above code snippet can be replaced with:

dependencies {
    add("implementation", libs.androidx.hilt.navigation.compose)
    add("implementation", libs.androidx.lifecycle.runtimeCompose)
    add("implementation", libs.androidx.lifecycle.viewModelCompose)
}

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AfigAliyev AfigAliyev added the enhancement New feature or request label Oct 3, 2022
@alexvanyo alexvanyo added the waiting Waiting on (blocked by) someone or something label Oct 10, 2022
@alexvanyo
Copy link
Contributor

Per the comments in #318 , we want to wait until this is officially supported by Gradle without using a workaround that might be brittle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting Waiting on (blocked by) someone or something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants