Skip to content

Commit

Permalink
Adding Type-safe project accessors (mihonapp#194)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
theolm authored and jobobby04 committed Jan 28, 2024
1 parent b210491 commit 78c7fac
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 34 deletions.
20 changes: 10 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,18 @@ android {
}

dependencies {
implementation(project(":i18n"))
implementation(projects.i18n)
// SY -->
implementation(project(":i18n-sy"))
implementation(projects.i18nSy)
// SY <--
implementation(project(":core"))
implementation(project(":core-metadata"))
implementation(project(":source-api"))
implementation(project(":source-local"))
implementation(project(":data"))
implementation(project(":domain"))
implementation(project(":presentation-core"))
implementation(project(":presentation-widget"))
implementation(projects.core)
implementation(projects.coreMetadata)
implementation(projects.sourceApi)
implementation(projects.sourceLocal)
implementation(projects.data)
implementation(projects.domain)
implementation(projects.presentationCore)
implementation(projects.presentationWidget)

// Compose
implementation(platform(compose.bom))
Expand Down
2 changes: 1 addition & 1 deletion core-metadata/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
}

dependencies {
implementation(project(":source-api"))
implementation(projects.sourceApi)

implementation(kotlinx.bundles.serialization)
}
4 changes: 2 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ android {
}

dependencies {
implementation(project(":i18n"))
implementation(projects.i18n)
// SY -->
implementation(project(":i18n-sy"))
implementation(projects.i18nSy)
// SY <--

api(libs.logcat)
Expand Down
6 changes: 3 additions & 3 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ android {
}

dependencies {
implementation(project(":source-api"))
implementation(project(":domain"))
implementation(project(":core"))
implementation(projects.sourceApi)
implementation(projects.domain)
implementation(projects.core)

api(libs.bundles.sqldelight)
}
Expand Down
4 changes: 2 additions & 2 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
}

dependencies {
implementation(project(":source-api"))
implementation(project(":core"))
implementation(projects.sourceApi)
implementation(projects.core)

implementation(platform(kotlinx.coroutines.bom))
implementation(kotlinx.bundles.coroutines)
Expand Down
6 changes: 3 additions & 3 deletions presentation-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ android {
}

dependencies {
api(project(":core"))
api(project(":i18n"))
api(projects.core)
api(projects.i18n)
// SY -->
api(project(":i18n-sy"))
api(projects.i18nSy)
// SY <--

// Compose
Expand Down
8 changes: 4 additions & 4 deletions presentation-widget/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ android {
}

dependencies {
implementation(project(":core"))
implementation(project(":domain"))
implementation(project(":presentation-core"))
api(project(":i18n"))
implementation(projects.core)
implementation(projects.domain)
implementation(projects.presentationCore)
api(projects.i18n)

implementation(compose.glance)
lintChecks(compose.lintchecks)
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ dependencyResolutionManagement {
}
}

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

rootProject.name = "TachiyomiSY"
include(":app")
include(":i18n")
Expand Down
6 changes: 3 additions & 3 deletions source-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ kotlin {
api(libs.rxjava)
api(libs.jsoup)
// SY -->
api(project(":i18n"))
api(project(":i18n-sy"))
api(projects.i18n)
api(projects.i18nSy)
api(kotlinx.reflect)
// SY <--
}
}
val androidMain by getting {
dependencies {
implementation(project(":core"))
implementation(projects.core)
api(libs.preferencektx)

// Workaround for https://youtrack.jetbrains.com/issue/KT-57605
Expand Down
12 changes: 6 additions & 6 deletions source-local/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":source-api"))
api(project(":i18n"))
implementation(projects.sourceApi)
api(projects.i18n)
// SY -->
api(project(":i18n-sy"))
api(projects.i18nSy)
// SY <--

implementation(libs.unifile)
Expand All @@ -23,11 +23,11 @@ kotlin {
}
val androidMain by getting {
dependencies {
implementation(project(":core"))
implementation(project(":core-metadata"))
implementation(projects.core)
implementation(projects.coreMetadata)

// Move ChapterRecognition to separate module?
implementation(project(":domain"))
implementation(projects.domain)

implementation(kotlinx.bundles.serialization)
}
Expand Down

0 comments on commit 78c7fac

Please sign in to comment.