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

Adding Type-safe project accessors #194

Merged
merged 14 commits into from
Jan 23, 2024
Merged

Conversation

theolm
Copy link
Contributor

@theolm theolm commented Jan 22, 2024

Description

Since the app has several modules, we can take advantage of the gradle new feature. The project accessors are mapped from the project path. For example, if a project path is :commons:utils:some:lib then the project accessor will be projects.commons.utils.some.lib.

before:

dependencies {
    implementation(project(":i18n"))
    implementation(project(":core"))
}

after:

dependencies {
    implementation(projects.i18n)
    implementation(projects.core)
}

This way we don't need to relay on strings that are prone to error.

settings.gradle.kts Outdated Show resolved Hide resolved
@theolm theolm requested a review from AntsyLich January 22, 2024 23:00
settings.gradle.kts Outdated Show resolved Hide resolved
@theolm theolm requested a review from AntsyLich January 23, 2024 12:03
@AntsyLich AntsyLich merged commit e17d87f into mihonapp:main Jan 23, 2024
1 check passed
@theolm theolm deleted the type-safe-project branch January 23, 2024 13:58
kaiserbh pushed a commit to kaiserbh/mihon that referenced this pull request Feb 18, 2024
* replace the windowInsetsPadding for navigationBarsPadding + statusBarsPadding

* Enabling TYPESAFE_PROJECT_ACCESSORS

* Adding typesafe project accessors in the app module

* Adding typesafe project accessors in the core module

* Adding typesafe project accessors in the core-metadata module

* Adding typesafe project accessors in the data module

* Adding typesafe project accessors in the domain module

* Adding typesafe project accessors in the presentation-core module

* Adding typesafe project accessors in the presentation-widget module

* Adding typesafe project accessors in the source-local module

* Adding typesafe project accessors in the source-api module

* Rolling back

* Changing TYPESAFE_PROJECT_ACCESSORS line

* Removing extra spaces

(cherry picked from commit e17d87f)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants