Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies {

ksp(libs.hilt.compiler)
ksp(libs.hilt.android.compiler)
ksp(libs.kotlin.metadata.jvm)
implementation(libs.dagger)
implementation(libs.hilt.android)
implementation(libs.hilt.navigationCompose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import org.gradle.api.Project
open class AndroidAppPlugin : Plugin<Project> {
override fun apply(project: Project) = with(project) {
plugins {
apply("kotlin-android")
apply("com.android.application")
applyDependencyAnalysisPlugin()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ open class AndroidLibraryPlugin : Plugin<Project> {

override fun apply(project: Project) = with(project) {
plugins {
apply("kotlin-android")
apply("com.android.library")
applyDependencyAnalysisPlugin()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.gradle.api.Project

internal fun Project.configureAndroidCommon() {
androidCommon {
compileOptions {
compileOptions.apply {
sourceCompatibility = Versions.Java.sourceCompatibility
targetCompatibility = Versions.Java.targetCompatibility
}
Expand All @@ -22,7 +22,7 @@ internal fun Project.configureAndroidCommon() {
}

compileSdk = Versions.Android.Sdk.Compile
defaultConfig {
defaultConfig.apply {
minSdk = Versions.Android.Sdk.Min
testInstrumentationRunner = TestRunners.androidJUnit
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,12 @@ internal fun Project.androidApp(configure: ApplicationExtension.() -> Unit) {
}

internal fun Project.androidCommon(configure: AndroidCommonExtension.() -> Unit) {
getAndroidCommonExtension().configure()
}

internal fun Project.getAndroidCommonExtension(): AndroidCommonExtension {
extensions.findByType<LibraryExtension>()?.let { lib ->
// We're an Android library
return lib
} ?: run {
extensions.findByType<ApplicationExtension>()?.let { app ->
// We're an Android application
return app
} ?: error("Module ${this.name} cannot find Android library or application extension")
}
extensions.findByType<CommonExtension>()?.configure()
?: error("Module ${this.name} cannot find Android library or application extension")
}

internal fun Project.kotlinAndroid(configure: KotlinAndroidProjectExtension.() -> Unit) {
extensions.getByType<KotlinAndroidProjectExtension>().configure()
}

internal typealias AndroidCommonExtension = CommonExtension<*, *, *, *, *, *>
internal typealias AndroidCommonExtension = CommonExtension
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[versions]
androidGradlePlugin = "8.13.0"
androidGradlePlugin = "9.2.1"
androidxActivity = "1.11.0"
androidxLifecycle = "2.9.4"
androidxCoreTest = "1.7.0"
assertk = "0.28.1"
composeBom = "2026.05.01"
composeNavigation = "2.9.5"
dagger = "2.57.2"
dagger = "2.59.2"
kotlinMetadata = "2.4.0"
dependencyAnalysis = "3.2.0"
googleAccompanist = "0.36.0"
googleGuava = "33.5.0-jre"
Expand Down Expand Up @@ -66,6 +67,7 @@ javax-inject = { module = "javax.inject:javax.inject", version = "1" }
# Kotlin
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinCoroutines" }
kotlin-metadata-jvm = { module = "org.jetbrains.kotlin:kotlin-metadata-jvm", version.ref = "kotlinMetadata" }
kotlin-serializationJson = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinSerialization" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down