Skip to content

Commit 02ada90

Browse files
committed
build: migrate to version catalog with convention plugins
Replace buildSrc Dependencies.kt with gradle/libs.versions.toml and introduce a build-logic included build with three convention plugins: - flipcash.android.library: base Android library config (serialization, timber, coroutines) - flipcash.android.library.compose: adds Compose compiler/BOM/ui/foundation - flipcash.android.feature: adds Hilt, KSP, parcelize, Compose bundle, and common project dependencies (core, logging, UI stack) Commonizes repeated dependencies across 114 modules, removing ~5,000 lines of boilerplate. Converts settings.gradle to settings.gradle.kts. Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 921ada3 commit 02ada90

142 files changed

Lines changed: 1538 additions & 5863 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ apps/flipcash/app/dapp_publishing/.asset-manifest.json
1919
## Fastlane
2020
fastlane/report.xml
2121
*.env.*
22+
.claude/

apps/codeApp/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,4 @@ dependencies {
215215
implementation(Libs.bugsnag)
216216

217217
implementation(Libs.haze)
218-
}
218+
}

apps/flipcash/app/build.gradle.kts

Lines changed: 68 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension
44
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
55

66
plugins {
7-
id(Plugins.android_application)
8-
id(Plugins.kotlin_android)
9-
id(Plugins.kotlin_parcelize)
10-
id(Plugins.kotlin_ksp)
11-
id(Plugins.kotlin_serialization)
12-
id(Plugins.androidx_navigation_safeargs)
13-
id(Plugins.hilt)
14-
id(Plugins.google_services)
15-
id(Plugins.firebase_crashlytics)
16-
id(Plugins.firebase_perf)
17-
id(Plugins.bugsnag_gradle)
18-
id(Plugins.secrets_gradle_plugin)
19-
id(Plugins.versioning_gradle_plugin)
20-
id(Plugins.jetbrains_compose_compiler)
7+
id("com.android.application")
8+
id("org.jetbrains.kotlin.android")
9+
id("org.jetbrains.kotlin.plugin.parcelize")
10+
id("com.google.devtools.ksp")
11+
id("org.jetbrains.kotlin.plugin.serialization")
12+
alias(libs.plugins.navigation.safeargs)
13+
id("dagger.hilt.android.plugin")
14+
alias(libs.plugins.google.services)
15+
alias(libs.plugins.firebase.crashlytics)
16+
alias(libs.plugins.firebase.perf)
17+
alias(libs.plugins.bugsnag.gradle)
18+
alias(libs.plugins.secrets)
19+
alias(libs.plugins.versioning)
20+
id("org.jetbrains.kotlin.plugin.compose")
2121
}
2222

2323
val contributorsSigningConfig = ContributorsSignatory(rootProject)
@@ -91,15 +91,13 @@ android {
9191
}
9292

9393
compileOptions {
94-
sourceCompatibility(Versions.java)
95-
targetCompatibility(Versions.java)
94+
sourceCompatibility(Android.javaVersion)
95+
targetCompatibility(Android.javaVersion)
9696
isCoreLibraryDesugaringEnabled = true
9797
}
9898

9999
packaging {
100-
resources.excludes.add("**/*.proto")
101-
resources.excludes.add("META-INF/LICENSE.md")
102-
resources.excludes.add("META-INF/LICENSE-notice.md")
100+
resources.excludes += setOf("**/*.proto", "META-INF/LICENSE.md", "META-INF/LICENSE-notice.md")
103101
}
104102
}
105103

@@ -121,11 +119,11 @@ bugsnag {
121119

122120
kotlin {
123121
jvmToolchain {
124-
languageVersion.set(JavaLanguageVersion.of(Versions.java))
122+
languageVersion.set(JavaLanguageVersion.of(Android.javaVersion))
125123
}
126124

127125
compilerOptions {
128-
jvmTarget.set(JvmTarget.fromTarget(Versions.java))
126+
jvmTarget.set(JvmTarget.fromTarget(Android.javaVersion))
129127
optIn.addAll(
130128
"kotlin.time.ExperimentalTime",
131129
"kotlin.ExperimentalUnsignedTypes",
@@ -200,66 +198,66 @@ dependencies {
200198
implementation(project(":ui:resources"))
201199
implementation(project(":ui:theme"))
202200

203-
coreLibraryDesugaring(Libs.android_desugaring)
201+
coreLibraryDesugaring(libs.android.desugaring)
204202

205203
//standard libraries
206-
implementation(Libs.kotlinx_collections_immutable)
207-
implementation(Libs.kotlinx_serialization_json)
208-
implementation(Libs.androidx_core)
209-
implementation(Libs.androidx_lifecycle_runtime)
210-
implementation(Libs.androidx_lifecycle_viewmodel)
211-
implementation(Libs.androidx_navigation_ui)
212-
implementation(Libs.androidx_work)
204+
implementation(libs.kotlinx.collections.immutable)
205+
implementation(libs.kotlinx.serialization.json)
206+
implementation(libs.androidx.core)
207+
implementation(libs.androidx.lifecycle.runtime)
208+
implementation(libs.androidx.lifecycle.viewmodel)
209+
implementation(libs.androidx.navigation.ui)
210+
implementation(libs.androidx.work)
213211
implementation("androidx.webkit:webkit:1.14.0")
214212

215213
//hilt dependency injection
216-
implementation(Libs.hilt)
217-
implementation(Libs.hilt_worker)
218-
ksp(Libs.hilt_android_compiler)
219-
ksp(Libs.hilt_compiler)
214+
implementation(libs.hilt.android)
215+
implementation(libs.hilt.worker)
216+
ksp(libs.hilt.android.compiler)
217+
ksp(libs.hilt.compiler)
220218

221-
androidTestImplementation(Libs.hilt)
222-
androidTestImplementation(Libs.hilt_android_test)
223-
kspAndroidTest(Libs.hilt_android_compiler)
224-
testImplementation(Libs.hilt_android_test)
225-
kspTest(Libs.hilt_android_compiler)
219+
androidTestImplementation(libs.hilt.android)
220+
androidTestImplementation(libs.hilt.android.test)
221+
kspAndroidTest(libs.hilt.android.compiler)
222+
testImplementation(libs.hilt.android.test)
223+
kspTest(libs.hilt.android.compiler)
226224

227225
androidTestImplementation("io.mockk:mockk:1.14.6")
228226

229227
//Jetpack compose
230-
implementation(platform(Libs.compose_bom))
231-
implementation(Libs.compose_ui)
232-
debugImplementation(Libs.compose_ui_tools)
233-
implementation(Libs.compose_accompanist)
234-
implementation(Libs.compose_foundation)
235-
implementation(Libs.compose_material)
236-
implementation(Libs.compose_materialIconsExtended)
237-
implementation(Libs.compose_activities)
238-
implementation(Libs.compose_view_models)
239-
240-
implementation(Libs.androidx_activity)
241-
242-
implementation(Libs.androidx_browser)
243-
244-
implementation(Libs.slf4j)
245-
implementation(Libs.grpc_android)
246-
247-
implementation(platform(Libs.firebase_bom))
248-
implementation(Libs.firebase_analytics)
249-
implementation(Libs.firebase_crashlytics)
250-
implementation(Libs.firebase_messaging)
251-
252-
implementation(Libs.mixpanel)
253-
254-
androidTestImplementation(Libs.androidx_test_runner)
255-
androidTestImplementation(Libs.androidx_junit)
256-
androidTestImplementation(Libs.junit)
257-
androidTestImplementation(Libs.espresso_core)
258-
androidTestImplementation(Libs.espresso_contrib) {
228+
implementation(platform(libs.compose.bom))
229+
implementation(libs.compose.ui)
230+
debugImplementation(libs.compose.ui.tools)
231+
implementation(libs.compose.accompanist)
232+
implementation(libs.compose.foundation)
233+
implementation(libs.compose.material)
234+
implementation(libs.compose.material.icons.extended)
235+
implementation(libs.compose.activities)
236+
implementation(libs.compose.view.models)
237+
238+
implementation(libs.androidx.activity)
239+
240+
implementation(libs.androidx.browser)
241+
242+
implementation(libs.slf4j)
243+
implementation(libs.grpc.android)
244+
245+
implementation(platform(libs.firebase.bom))
246+
implementation(libs.firebase.analytics)
247+
implementation(libs.firebase.crashlytics)
248+
implementation(libs.firebase.messaging)
249+
250+
implementation(libs.mixpanel)
251+
252+
androidTestImplementation(libs.androidx.test.runner)
253+
androidTestImplementation(libs.androidx.junit)
254+
androidTestImplementation(libs.junit)
255+
androidTestImplementation(libs.espresso.core)
256+
androidTestImplementation(libs.espresso.contrib) {
259257
exclude(module = "protobuf-lite")
260258
}
261-
androidTestImplementation(Libs.espresso_intents)
259+
androidTestImplementation(libs.espresso.intents)
262260

263-
implementation(Libs.timber)
264-
implementation(Libs.bugsnag)
261+
implementation(libs.timber)
262+
implementation(libs.bugsnag)
265263
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.flipcash.app.login
2+
3+
import androidx.compose.runtime.Composable
4+
import androidx.compose.ui.tooling.preview.Preview
5+
import com.android.tools.screenshot.PreviewTest
6+
import com.flipcash.app.theme.FlipcashPreview
7+
8+
@PreviewTest
9+
@Preview
10+
@Composable
11+
fun LoginScreenPreview() {
12+
FlipcashPreview {
13+
LoginS
14+
}
15+
}
Lines changed: 15 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,28 @@
1-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
31
plugins {
4-
id(Plugins.android_library)
5-
id(Plugins.kotlin_android)
6-
id(Plugins.kotlin_ksp)
7-
id(Plugins.kotlin_serialization)
8-
id(Plugins.kotlin_parcelize)
9-
id(Plugins.jetbrains_compose_compiler)
2+
alias(libs.plugins.flipcash.android.feature)
103
}
114

125
android {
136
namespace = "${Gradle.flipcashNamespace}.core"
14-
compileSdk = Android.compileSdkVersion
15-
defaultConfig {
16-
minSdk = Android.minSdkVersion
17-
testInstrumentationRunner = Android.testInstrumentationRunner
18-
}
19-
20-
buildFeatures {
21-
buildConfig = true
22-
compose = true
23-
}
24-
}
25-
26-
kotlin {
27-
jvmToolchain {
28-
languageVersion.set(JavaLanguageVersion.of(Versions.java))
29-
}
30-
31-
compilerOptions {
32-
jvmTarget.set(JvmTarget.fromTarget(Versions.java))
33-
optIn.addAll(
34-
"kotlin.time.ExperimentalTime",
35-
"kotlin.ExperimentalUnsignedTypes",
36-
"kotlin.RequiresOptIn"
37-
)
38-
}
397
}
408

419
dependencies {
42-
implementation(Libs.inject)
43-
implementation(Libs.hilt)
44-
ksp(Libs.hilt_android_compiler)
45-
ksp(Libs.hilt_compiler)
46-
47-
implementation(Libs.timber)
10+
implementation(libs.androidx.browser)
4811

49-
implementation(Libs.androidx_browser)
12+
implementation(libs.kotlinx.serialization.core)
13+
implementation(libs.kotlinx.serialization.json)
5014

51-
implementation(Libs.kotlinx_serialization_core)
52-
implementation(Libs.kotlinx_serialization_json)
15+
implementation(platform(libs.firebase.bom))
16+
implementation(libs.firebase.messaging)
17+
implementation(libs.bugsnag)
5318

54-
implementation(platform(Libs.compose_bom))
55-
implementation(Libs.compose_ui)
56-
implementation(Libs.compose_foundation)
57-
implementation(Libs.compose_material)
19+
implementation(libs.androidx.localbroadcastmanager)
20+
implementation(libs.androidx.credentials)
21+
implementation(libs.androidx.credentials.play.auth)
22+
implementation(libs.androidx.datastore)
5823

59-
implementation(platform(Libs.firebase_bom))
60-
implementation(Libs.firebase_messaging)
61-
implementation(Libs.bugsnag)
62-
63-
implementation(Libs.androidx_localbroadcastmanager)
64-
implementation(Libs.androidx_credentials)
65-
implementation(Libs.androidx_credentials_play_auth)
66-
implementation(Libs.androidx_datastore)
67-
68-
api(Libs.coil3)
69-
api(Libs.coil3_network)
24+
api(libs.coil3)
25+
api(libs.coil3.network)
7026

7127
api(project(":services:flipcash-compose"))
7228

@@ -76,17 +32,11 @@ dependencies {
7632

7733
api(project(":apps:flipcash:shared:theme"))
7834

79-
implementation(project(":ui:components"))
80-
implementation(project(":ui:navigation"))
81-
implementation(project(":ui:theme"))
82-
implementation(Libs.rinku_compose)
83-
84-
api(Libs.sodium_bindings)
85-
35+
api(libs.sodium.bindings)
8636

8737
api(project(":vendor:kik:scanner"))
8838

8939
api(project(":ui:core"))
9040

9141
api(project(":vendor:tipkit:tipkit-m2"))
92-
}
42+
}
Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,17 @@
1-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
31
plugins {
4-
id(Plugins.android_library)
5-
id(Plugins.kotlin_android)
6-
id(Plugins.kotlin_ksp)
7-
id(Plugins.hilt)
8-
id(Plugins.kotlin_parcelize)
9-
id(Plugins.jetbrains_compose_compiler)
2+
alias(libs.plugins.flipcash.android.feature)
103
}
114

125
android {
136
namespace = "${Gradle.flipcashNamespace}.features.advanced"
14-
compileSdk = Android.compileSdkVersion
15-
defaultConfig {
16-
minSdk = Android.minSdkVersion
17-
testInstrumentationRunner = Android.testInstrumentationRunner
18-
}
19-
20-
buildFeatures {
21-
buildConfig = true
22-
compose = true
23-
}
24-
}
25-
26-
kotlin {
27-
jvmToolchain {
28-
languageVersion.set(JavaLanguageVersion.of(Versions.java))
29-
}
30-
31-
compilerOptions {
32-
jvmTarget.set(JvmTarget.fromTarget(Versions.java))
33-
optIn.addAll(
34-
"kotlin.time.ExperimentalTime",
35-
"kotlin.ExperimentalUnsignedTypes",
36-
"kotlin.RequiresOptIn"
37-
)
38-
}
397
}
408

419
dependencies {
42-
implementation(Libs.inject)
43-
implementation(Libs.hilt)
44-
ksp(Libs.hilt_android_compiler)
45-
ksp(Libs.hilt_compiler)
46-
47-
implementation(Libs.timber)
48-
49-
implementation(platform(Libs.compose_bom))
50-
implementation(Libs.compose_ui)
51-
implementation(Libs.compose_foundation)
52-
implementation(Libs.compose_material)
53-
implementation(Libs.compose_materialIconsExtended)
54-
5510
implementation(project(":apps:flipcash:shared:bill-customization"))
5611
implementation(project(":apps:flipcash:shared:featureflags"))
5712
implementation(project(":apps:flipcash:shared:menu"))
58-
implementation(project(":apps:flipcash:core"))
5913

6014
implementation(project(":libs:datetime"))
61-
implementation(project(":libs:logging"))
6215
implementation(project(":libs:messaging"))
6316
implementation(project(":libs:permissions:bindings"))
64-
implementation(project(":ui:core"))
65-
implementation(project(":ui:components"))
66-
implementation(project(":ui:navigation"))
67-
implementation(project(":ui:resources"))
68-
implementation(project(":ui:theme"))
69-
implementation(Libs.rinku_compose)
70-
}
17+
}

0 commit comments

Comments
 (0)