diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 53d7007..2a99172 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,10 +1,8 @@ -@file:Suppress("UnstableApiUsage") - -import com.bagnolati.learnoflegends.ProjectBuildType +import com.bagnolati.learnoflegends.LolBuildType plugins { alias(libs.plugins.learnoflegends.android.application) - alias(libs.plugins.learnoflegends.android.applicationCompose) + alias(libs.plugins.learnoflegends.android.application.compose) alias(libs.plugins.learnoflegends.android.hilt) } @@ -12,8 +10,8 @@ android { defaultConfig { applicationId = "com.bagnolati.learnoflegends" - versionCode = 5 - versionName = "1.2.1" // X.Y.Z; X = Major, Y = minor, Z = Patch level + versionCode = 6 + versionName = "1.3.0" // X.Y.Z; X = Major, Y = minor, Z = Patch level testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { @@ -23,14 +21,13 @@ android { buildTypes { debug { - applicationIdSuffix = ProjectBuildType.DEBUG.applicationIdSuffix + applicationIdSuffix = LolBuildType.DEBUG.applicationIdSuffix signingConfig = signingConfigs.getByName("debug") } release { - applicationIdSuffix = ProjectBuildType.RELEASE.applicationIdSuffix + applicationIdSuffix = LolBuildType.RELEASE.applicationIdSuffix isMinifyEnabled = true isShrinkResources = true - isDebuggable = false proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") // SignIn is done on GitHub workflow to hide keys. } @@ -58,15 +55,20 @@ dependencies { implementation(projects.core.ui) implementation(libs.androidx.activity.compose) - implementation(libs.androidx.appcompat) implementation(libs.androidx.core.ktx) implementation(libs.androidx.core.splashscreen) - implementation(libs.androidx.compose.runtime) implementation(libs.androidx.lifecycle.runtimeCompose) implementation(libs.androidx.compose.material3.windowSizeClass) - implementation(libs.androidx.hilt.navigation.compose) implementation(libs.androidx.navigation.compose) - implementation(libs.androidx.window.manager) + implementation(libs.androidx.profileinstaller) + implementation(libs.kotlinx.coroutines.guava) implementation(libs.coil.kt) -} \ No newline at end of file + ksp(libs.hilt.compiler) + + debugImplementation(libs.androidx.compose.ui.testManifest) +} + +dependencyGuard { + configuration("prodReleaseRuntimeClasspath") +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index f523e3d..d7cade2 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,3 +1,13 @@ +-dontwarn org.bouncycastle.jsse.BCSSLParameters +-dontwarn org.bouncycastle.jsse.BCSSLSocket +-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider +-dontwarn org.conscrypt.Conscrypt$Version +-dontwarn org.conscrypt.Conscrypt +-dontwarn org.conscrypt.ConscryptHostnameVerifier +-dontwarn org.openjsse.javax.net.ssl.SSLParameters +-dontwarn org.openjsse.javax.net.ssl.SSLSocket +-dontwarn org.openjsse.net.ssl.OpenJSSE + # Fix for Retrofit issue https://github.com/square/retrofit/issues/3751 # Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items). -keep,allowobfuscation,allowshrinking interface retrofit2.Call @@ -7,8 +17,3 @@ # kept. Suspend functions are wrapped in continuations where the type argument # is used. -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation - -# Keep network models. --keep class com.bagnolati.learnoflegends.core.network.model.* -# Keep serializers class. --keep class com.bagnolati.learnoflegends.core.network.serializer.* \ No newline at end of file diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index 46ae159..9b45f4d 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -1,3 +1,4 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { @@ -12,56 +13,58 @@ java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } -tasks.withType().configureEach { - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() + +kotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_17 } } dependencies { compileOnly(libs.android.gradlePlugin) + compileOnly(libs.android.tools.common) + compileOnly(libs.compose.gradlePlugin) compileOnly(libs.kotlin.gradlePlugin) compileOnly(libs.ksp.gradlePlugin) - compileOnly(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) +} + +tasks { + validatePlugins { + enableStricterValidation = true + failOnWarning = true + } } gradlePlugin { plugins { - - register("androidApplication") { - id = libs.plugins.learnoflegends.android.application.get().pluginId - implementationClass = "AndroidApplicationConventionPlugin" - } - register("androidApplicationCompose") { - id = libs.plugins.learnoflegends.android.applicationCompose.get().pluginId + id = "learnoflegends.android.application.compose" implementationClass = "AndroidApplicationComposeConventionPlugin" } - - register("androidLibrary") { - id = libs.plugins.learnoflegends.android.library.get().pluginId - implementationClass = "AndroidLibraryConventionPlugin" + register("androidApplication") { + id = "learnoflegends.android.application" + implementationClass = "AndroidApplicationConventionPlugin" } - register("androidLibraryCompose") { - id = libs.plugins.learnoflegends.android.libraryCompose.get().pluginId + id = "learnoflegends.android.library.compose" implementationClass = "AndroidLibraryComposeConventionPlugin" } - + register("androidLibrary") { + id = "learnoflegends.android.library" + implementationClass = "AndroidLibraryConventionPlugin" + } register("androidFeature") { - id = libs.plugins.learnoflegends.android.feature.get().pluginId + id = "learnoflegends.android.feature" implementationClass = "AndroidFeatureConventionPlugin" } - register("androidHilt") { - id = libs.plugins.learnoflegends.android.hilt.get().pluginId + id = "learnoflegends.android.hilt" implementationClass = "AndroidHiltConventionPlugin" } - register("jvmLibrary") { - id = libs.plugins.learnoflegends.jvm.library.get().pluginId + id = "learnoflegends.jvm.library" implementationClass = "JvmLibraryConventionPlugin" } } -} \ No newline at end of file +} diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt index eee84d1..5c72869 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt @@ -1,18 +1,18 @@ import com.android.build.api.dsl.ApplicationExtension import com.bagnolati.learnoflegends.configureAndroidCompose -import dsl.applyPlugin -import dsl.libs import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.kotlin.dsl.apply import org.gradle.kotlin.dsl.getByType -@Suppress("unused") class AndroidApplicationComposeConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { - pluginManager.applyPlugin(libs.plugins.android.application) + apply(plugin = "com.android.application") + apply(plugin = "org.jetbrains.kotlin.plugin.compose") + val extension = extensions.getByType() configureAndroidCompose(extension) } } -} +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt index 91f6570..56b4f8f 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt @@ -1,26 +1,22 @@ import com.android.build.api.dsl.ApplicationExtension import com.bagnolati.learnoflegends.configureKotlinAndroid -import dsl.applyPlugin -import dsl.libs import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.configure -@Suppress("unused") class AndroidApplicationConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { with(pluginManager) { - applyPlugin(libs.plugins.android.application) - applyPlugin(libs.plugins.kotlin.android) + apply("com.android.application") + apply("org.jetbrains.kotlin.android") + apply("com.dropbox.dependency-guard") } extensions.configure { configureKotlinAndroid(this) defaultConfig.targetSdk = 34 } - } } - -} +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/AndroidFeatureConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidFeatureConventionPlugin.kt index 0f1a7f6..35a1d90 100644 --- a/build-logic/convention/src/main/kotlin/AndroidFeatureConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidFeatureConventionPlugin.kt @@ -1,37 +1,23 @@ -import dsl.applyPlugin -import dsl.implementation -import dsl.libs +import com.bagnolati.learnoflegends.libs import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.dependencies -@Suppress("unused") class AndroidFeatureConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { pluginManager.apply { - applyPlugin(libs.plugins.learnoflegends.android.library) - applyPlugin(libs.plugins.learnoflegends.android.hilt) + apply("learnoflegends.android.library") + apply("learnoflegends.android.hilt") } dependencies { - implementation(project(":core:model")) - implementation(project(":core:data")) - implementation(project(":core:common")) - implementation(project(":core:domain")) - implementation(project(":core:ui")) + add("implementation", project(":core:ui")) - implementation(libs.coil.kt) - implementation(libs.coil.kt.compose) - - implementation(libs.androidx.hilt.navigation.compose) - implementation(libs.androidx.lifecycle.runtimeCompose) - implementation(libs.androidx.lifecycle.viewModelCompose) - - implementation(libs.kotlinx.coroutines.android) + 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()) } } } -} - - +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt index ad453bf..5c84b72 100644 --- a/build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt @@ -1,25 +1,19 @@ -@file:Suppress("UnstableApiUsage") - -import dsl.applyPlugin -import dsl.implementation -import dsl.ksp -import dsl.libs +import com.bagnolati.learnoflegends.libs import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.dependencies -@Suppress("unused") class AndroidHiltConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { with(pluginManager) { - applyPlugin(libs.plugins.hilt) - applyPlugin(libs.plugins.ksp) + apply("com.google.devtools.ksp") + apply("dagger.hilt.android.plugin") } dependencies { - implementation(libs.hilt.android) - ksp(libs.hilt.compiler) + "implementation"(libs.findLibrary("hilt.android").get()) + "ksp"(libs.findLibrary("hilt.compiler").get()) } } } diff --git a/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt index 45d4085..5062466 100644 --- a/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt @@ -2,16 +2,17 @@ import com.android.build.gradle.LibraryExtension import com.bagnolati.learnoflegends.configureAndroidCompose import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.kotlin.dsl.apply import org.gradle.kotlin.dsl.getByType -@Suppress("unused") class AndroidLibraryComposeConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { - pluginManager.apply("com.android.library") + apply(plugin = "com.android.library") + apply(plugin = "org.jetbrains.kotlin.plugin.compose") + val extension = extensions.getByType() configureAndroidCompose(extension) } } - } \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt index b6b80ac..d49e34f 100644 --- a/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt @@ -1,23 +1,23 @@ import com.android.build.gradle.LibraryExtension import com.bagnolati.learnoflegends.configureKotlinAndroid -import dsl.applyPlugin -import dsl.libs import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.configure -@Suppress("unused") class AndroidLibraryConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { with(pluginManager) { apply("com.android.library") - applyPlugin(libs.plugins.kotlin.android) + apply("org.jetbrains.kotlin.android") } extensions.configure { configureKotlinAndroid(this) defaultConfig.targetSdk = 34 + // The resource prefix is derived from the module name, + // so resources inside ":core:module1" must be prefixed with "core_module1_" + resourcePrefix = path.split("""\W""".toRegex()).drop(1).distinct().joinToString(separator = "_").lowercase() + "_" } } } diff --git a/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt index ffc3b6c..16d0258 100644 --- a/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt @@ -1,17 +1,14 @@ import com.bagnolati.learnoflegends.configureKotlinJvm -import dsl.applyPlugin -import dsl.libs import org.gradle.api.Plugin import org.gradle.api.Project -@Suppress("unused") class JvmLibraryConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { with(pluginManager) { - applyPlugin(libs.plugins.kotlin.jvm) + apply("org.jetbrains.kotlin.jvm") } configureKotlinJvm() } } -} +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/AndroidCompose.kt b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/AndroidCompose.kt index 2ab9b04..f4f948a 100644 --- a/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/AndroidCompose.kt +++ b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/AndroidCompose.kt @@ -1,68 +1,47 @@ -@file:Suppress("UnstableApiUsage") - package com.bagnolati.learnoflegends import com.android.build.api.dsl.CommonExtension -import dsl.implementation -import dsl.libs import org.gradle.api.Project import org.gradle.kotlin.dsl.dependencies -import org.gradle.kotlin.dsl.withType -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile /** * Configure Compose-specific options */ internal fun Project.configureAndroidCompose( - commonExtension: CommonExtension<*, *, *, *, *>, + commonExtension: CommonExtension<*, *, *, *, *, *>, ) { commonExtension.apply { buildFeatures { compose = true } - composeOptions { - kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get().toString() - } - dependencies { - val bom = libs.androidx.compose.bom.get() - implementation(platform(bom)) - } - - } - - tasks.withType().configureEach { - kotlinOptions { - freeCompilerArgs = freeCompilerArgs + buildComposeMetricsParameters() + val bom = libs.findLibrary("androidx-compose-bom").get() + add("implementation", platform(bom)) + add("androidTestImplementation", platform(bom)) + add("implementation", libs.findLibrary("androidx-compose-ui-tooling-preview").get()) + add("debugImplementation", libs.findLibrary("androidx-compose-ui-tooling").get()) } - } -} - -private fun Project.buildComposeMetricsParameters(): List { - val metricParameters = mutableListOf() - val enableMetricsProvider = project.providers.gradleProperty("enableComposeCompilerMetrics") - val relativePath = projectDir.relativeTo(rootDir) - - val enableMetrics = (enableMetricsProvider.orNull == "true") - if (enableMetrics) { - val metricsFolder = rootProject.buildDir.resolve("compose-metrics").resolve(relativePath) - metricParameters.add("-P") - metricParameters.add( - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + metricsFolder.absolutePath - ) - } - val enableReportsProvider = project.providers.gradleProperty("enableComposeCompilerReports") - val enableReports = (enableReportsProvider.orNull == "true") - if (enableReports) { - val reportsFolder = rootProject.buildDir.resolve("compose-reports").resolve(relativePath) - metricParameters.add("-P") - metricParameters.add( - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + reportsFolder.absolutePath - ) } - return metricParameters.toList() +// extensions.configure { +// fun Provider.onlyIfTrue() = flatMap { provider { it.takeIf(String::toBoolean) } } +// fun Provider<*>.relativeToRootProject(dir: String) = flatMap { +// rootProject.layout.buildDirectory.dir(projectDir.toRelativeString(rootDir)) +// }.map { it.dir(dir) } +// +// project.providers.gradleProperty("enableComposeCompilerMetrics").onlyIfTrue() +// .relativeToRootProject("compose-metrics") +// .let(metricsDestination::set) +// +// project.providers.gradleProperty("enableComposeCompilerReports").onlyIfTrue() +// .relativeToRootProject("compose-reports") +// .let(reportsDestination::set) +// +// stabilityConfigurationFile = rootProject.layout.projectDirectory.file("compose_compiler_config.conf") +// +// enableStrongSkippingMode = true +// } } diff --git a/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/KotlinAndroid.kt b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/KotlinAndroid.kt index 5e94b85..4fabf05 100644 --- a/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/KotlinAndroid.kt +++ b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/KotlinAndroid.kt @@ -1,28 +1,30 @@ package com.bagnolati.learnoflegends + import com.android.build.api.dsl.CommonExtension -import dsl.coreLibraryDesugaring -import dsl.libs import org.gradle.api.JavaVersion import org.gradle.api.Project import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.kotlin.dsl.assign import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.provideDelegate -import org.gradle.kotlin.dsl.withType -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension /** * Configure base Kotlin with Android options */ internal fun Project.configureKotlinAndroid( - commonExtension: CommonExtension<*, *, *, *, *>, + commonExtension: CommonExtension<*, *, *, *, *, *>, ) { commonExtension.apply { compileSdk = 34 defaultConfig { - minSdk = 24 + minSdk = 21 } compileOptions { @@ -34,10 +36,10 @@ internal fun Project.configureKotlinAndroid( } } - configureKotlin() + configureKotlin() dependencies { - coreLibraryDesugaring(libs.android.desugarJdkLibs) + add("coreLibraryDesugaring", libs.findLibrary("android.desugarJdkLibs").get()) } } @@ -52,28 +54,26 @@ internal fun Project.configureKotlinJvm() { targetCompatibility = JavaVersion.VERSION_11 } - configureKotlin() + configureKotlin() } /** * Configure base Kotlin options */ -private fun Project.configureKotlin() { - // Use withType to workaround https://youtrack.jetbrains.com/issue/KT-55947 - tasks.withType().configureEach { - kotlinOptions { - // Set JVM target to 11 - jvmTarget = JavaVersion.VERSION_11.toString() - // Treat all Kotlin warnings as errors (disabled by default) - // Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties - val warningsAsErrors: String? by project - allWarningsAsErrors = warningsAsErrors.toBoolean() - freeCompilerArgs = freeCompilerArgs + listOf( - "-opt-in=kotlin.RequiresOptIn", - // Enable experimental coroutines APIs, including Flow - "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi", - "-opt-in=kotlinx.coroutines.FlowPreview", - ) - } +private inline fun Project.configureKotlin() = configure { + // Treat all Kotlin warnings as errors (disabled by default) + // Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties + val warningsAsErrors: String? by project + when (this) { + is KotlinAndroidProjectExtension -> compilerOptions + is KotlinJvmProjectExtension -> compilerOptions + else -> TODO("Unsupported project extension $this ${T::class}") + }.apply { + jvmTarget = JvmTarget.JVM_11 + allWarningsAsErrors = warningsAsErrors.toBoolean() + freeCompilerArgs.add( + // Enable experimental coroutines APIs, including Flow + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi", + ) } } diff --git a/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/LolBuildType.kt b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/LolBuildType.kt new file mode 100644 index 0000000..2ba7a27 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/LolBuildType.kt @@ -0,0 +1,6 @@ +package com.bagnolati.learnoflegends + +enum class LolBuildType(val applicationIdSuffix: String? = null) { + DEBUG(".debug"), + RELEASE, +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/ProjectBuildType.kt b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/ProjectBuildType.kt deleted file mode 100644 index 71c9864..0000000 --- a/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/ProjectBuildType.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.bagnolati.learnoflegends - - -@Suppress("unused") -enum class ProjectBuildType(val applicationIdSuffix: String? = null) { - DEBUG(".debug"), - RELEASE, -} diff --git a/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/ProjectExtensions.kt b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/ProjectExtensions.kt new file mode 100644 index 0000000..400dc7b --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/bagnolati/learnoflegends/ProjectExtensions.kt @@ -0,0 +1,9 @@ +package com.bagnolati.learnoflegends + +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalog +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.getByType + +val Project.libs + get(): VersionCatalog = extensions.getByType().named("libs") diff --git a/build-logic/convention/src/main/kotlin/dsl/Extentions.kt b/build-logic/convention/src/main/kotlin/dsl/Extentions.kt deleted file mode 100644 index 1970c6e..0000000 --- a/build-logic/convention/src/main/kotlin/dsl/Extentions.kt +++ /dev/null @@ -1,20 +0,0 @@ -package dsl - -import org.gradle.api.artifacts.Dependency -import org.gradle.api.artifacts.dsl.DependencyHandler -import org.gradle.api.plugins.PluginManager -import org.gradle.api.provider.Provider -import org.gradle.plugin.use.PluginDependency - -fun DependencyHandler.implementation(dependencyNotation: Any): Dependency? = - add("implementation", dependencyNotation) - -fun DependencyHandler.ksp(dependencyNotation: Any): Dependency? = - add("ksp", dependencyNotation) - -fun DependencyHandler.coreLibraryDesugaring(dependencyNotation: Any): Dependency? = - add("coreLibraryDesugaring", dependencyNotation) - -fun PluginManager.applyPlugin(plugin: Provider) { - apply(plugin.get().pluginId) -} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/dsl/Libs.kt b/build-logic/convention/src/main/kotlin/dsl/Libs.kt deleted file mode 100644 index a977136..0000000 --- a/build-logic/convention/src/main/kotlin/dsl/Libs.kt +++ /dev/null @@ -1,11 +0,0 @@ -package dsl - -import org.gradle.accessors.dm.LibrariesForLibs - -import org.gradle.api.Project -import org.gradle.kotlin.dsl.getByType - -// Enable version catalog on build-logic, -// see https://github.com/gradle/gradle/issues/15383 -internal val Project.libs: LibrariesForLibs - get() = this.extensions.getByType() diff --git a/build.gradle.kts b/build.gradle.kts index ee2a952..088bf9b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,14 +3,22 @@ buildscript { google() mavenCentral() } + dependencies { + + } } // Lists all plugins used throughout the project without applying them. plugins { alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.compose) apply false alias(libs.plugins.kotlin.jvm) apply false alias(libs.plugins.kotlin.serialization) apply false + alias(libs.plugins.dependencyGuard) apply false + alias(libs.plugins.gms) apply false alias(libs.plugins.hilt) apply false alias(libs.plugins.ksp) apply false alias(libs.plugins.secrets) apply false + alias(libs.plugins.module.graph) apply true // Plugin applied to allow module graph generation } diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts index f3f1afc..b0b6751 100644 --- a/core/common/build.gradle.kts +++ b/core/common/build.gradle.kts @@ -8,5 +8,4 @@ android { } dependencies { - implementation(libs.kotlinx.coroutines.android) -} \ No newline at end of file +} diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index 64eb027..3093ee2 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -8,13 +8,11 @@ android { } dependencies { - implementation(projects.core.common) - implementation(projects.core.datastore) - implementation(projects.core.model) - implementation(projects.core.network) + api(projects.core.common) + api(projects.core.datastore) + api(projects.core.network) - implementation(libs.androidx.core.ktx) - implementation(libs.kotlinx.coroutines.android) - implementation(libs.kotlinx.datetime) + implementation(libs.retrofit.core) implementation(libs.kotlinx.serialization.json) + } \ No newline at end of file diff --git a/core/datastore-proto/build.gradle.kts b/core/datastore-proto/build.gradle.kts new file mode 100644 index 0000000..90539a3 --- /dev/null +++ b/core/datastore-proto/build.gradle.kts @@ -0,0 +1,39 @@ +plugins { + alias(libs.plugins.learnoflegends.android.library) + alias(libs.plugins.protobuf) +} + +android { + namespace = "com.bagnolati.learnoflegends.core.datastore.proto" +} + +// Setup protobuf configuration, generating lite Java and Kotlin classes +protobuf { + protoc { + artifact = libs.protobuf.protoc.get().toString() + } + generateProtoTasks { + all().forEach { task -> + task.builtins { + register("java") { + option("lite") + } + register("kotlin") { + option("lite") + } + } + } + } +} + +//androidComponents.beforeVariants { +// android.sourceSets.register(it.name) { +// val buildDir = layout.buildDirectory.get().asFile +// java.srcDir(buildDir.resolve("generated/source/proto/${it.name}/java")) +// kotlin.srcDir(buildDir.resolve("generated/source/proto/${it.name}/kotlin")) +// } +//} + +dependencies { + api(libs.protobuf.kotlin.lite) +} diff --git a/core/datastore/src/main/proto/com/bagnolati/learnoflegends/data/dark_theme_config.proto b/core/datastore-proto/src/main/proto/com/bagnolati/learnoflegends/data/dark_theme_config.proto similarity index 100% rename from core/datastore/src/main/proto/com/bagnolati/learnoflegends/data/dark_theme_config.proto rename to core/datastore-proto/src/main/proto/com/bagnolati/learnoflegends/data/dark_theme_config.proto diff --git a/core/datastore/src/main/proto/com/bagnolati/learnoflegends/data/user_preferences.proto b/core/datastore-proto/src/main/proto/com/bagnolati/learnoflegends/data/user_preferences.proto similarity index 100% rename from core/datastore/src/main/proto/com/bagnolati/learnoflegends/data/user_preferences.proto rename to core/datastore-proto/src/main/proto/com/bagnolati/learnoflegends/data/user_preferences.proto diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts index 114d1ba..758f6e8 100644 --- a/core/datastore/build.gradle.kts +++ b/core/datastore/build.gradle.kts @@ -1,41 +1,19 @@ plugins { alias(libs.plugins.learnoflegends.android.library) alias(libs.plugins.learnoflegends.android.hilt) - alias(libs.plugins.protobuf) } android { defaultConfig { consumerProguardFiles("consumer-proguard-rules.pro") } - namespace = "com.bagnolati.learnoflegends.core.datastore" } -// Setup protobuf configuration, generating lite Java and Kotlin classes -protobuf { - protoc { - artifact = libs.protobuf.protoc.get().toString() - } - generateProtoTasks { - all().forEach { task -> - task.builtins { - register("java") { - option("lite") - } - register("kotlin") { - option("lite") - } - } - } - } -} - dependencies { - implementation(projects.core.common) - implementation(projects.core.model) + api(libs.androidx.dataStore.core) + api(projects.core.datastoreProto) + api(projects.core.model) - implementation(libs.androidx.dataStore.core) - implementation(libs.kotlinx.coroutines.android) - implementation(libs.protobuf.kotlin.lite) + implementation(projects.core.common) } diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts index 29752ba..c6535d4 100644 --- a/core/domain/build.gradle.kts +++ b/core/domain/build.gradle.kts @@ -1,8 +1,6 @@ -import dsl.ksp - plugins { alias(libs.plugins.learnoflegends.android.library) - id(libs.plugins.ksp.get().pluginId) + id("com.google.devtools.ksp") } android { @@ -10,12 +8,8 @@ android { } dependencies { - implementation(projects.core.common) - implementation(projects.core.data) - implementation(projects.core.model) - implementation(projects.core.network) + api(projects.core.data) + api(projects.core.model) - implementation(libs.kotlinx.coroutines.android) - implementation(libs.hilt.android) - ksp(libs.hilt.compiler) + implementation(libs.javax.inject) } diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index bb51c6c..40d8d04 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -24,7 +24,6 @@ dependencies { implementation(libs.coil.kt) implementation(libs.coil.kt.svg) - implementation(libs.kotlinx.coroutines.android) implementation(libs.kotlinx.datetime) implementation(libs.kotlinx.serialization.json) implementation(libs.okhttp.logging) diff --git a/core/network/src/main/kotlin/com/bagnolati/learnoflegends/core/network/NetworkUrls.kt b/core/network/src/main/kotlin/com/bagnolati/learnoflegends/core/network/NetworkUrls.kt index 9777e73..697a452 100644 --- a/core/network/src/main/kotlin/com/bagnolati/learnoflegends/core/network/NetworkUrls.kt +++ b/core/network/src/main/kotlin/com/bagnolati/learnoflegends/core/network/NetworkUrls.kt @@ -7,7 +7,7 @@ package com.bagnolati.learnoflegends.core.network * See [documentation](https://developer.riotgames.com/docs/lol) */ object DdragonUrl { - private const val VERSION = "13.21.1" + private const val VERSION = "14.13.1" // private const val BASE_URL = BuildConfig.DDRAGON_BASE_URL private const val BASE_URL = "https://ddragon.leagueoflegends.com/" diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 6ebd545..a7cb3f1 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -1,6 +1,6 @@ plugins { alias(libs.plugins.learnoflegends.android.library) - alias(libs.plugins.learnoflegends.android.libraryCompose) + alias(libs.plugins.learnoflegends.android.library.compose) } android { @@ -18,9 +18,9 @@ dependencies { api(libs.androidx.compose.runtime) api(libs.androidx.compose.ui.tooling.preview) api(libs.androidx.compose.ui.util) + api(libs.coil.kt.compose) debugApi(libs.androidx.compose.ui.tooling) implementation(libs.androidx.core.ktx) - implementation(libs.coil.kt.compose) } diff --git a/feature/champion/build.gradle.kts b/feature/champion/build.gradle.kts index 39eb98f..ccc4ecd 100644 --- a/feature/champion/build.gradle.kts +++ b/feature/champion/build.gradle.kts @@ -1,6 +1,6 @@ plugins { alias(libs.plugins.learnoflegends.android.feature) - alias(libs.plugins.learnoflegends.android.libraryCompose) + alias(libs.plugins.learnoflegends.android.library.compose) } android { @@ -8,5 +8,6 @@ android { } dependencies { - + implementation(projects.core.data) + implementation(projects.core.domain) } diff --git a/feature/champions/build.gradle.kts b/feature/champions/build.gradle.kts index 68dde2f..474ca6e 100644 --- a/feature/champions/build.gradle.kts +++ b/feature/champions/build.gradle.kts @@ -1,6 +1,6 @@ plugins { alias(libs.plugins.learnoflegends.android.feature) - alias(libs.plugins.learnoflegends.android.libraryCompose) + alias(libs.plugins.learnoflegends.android.library.compose) } android { @@ -8,5 +8,6 @@ android { } dependencies { - + implementation(projects.core.data) + implementation(projects.core.domain) } \ No newline at end of file diff --git a/feature/items/build.gradle.kts b/feature/items/build.gradle.kts index 0526637..cc2c568 100644 --- a/feature/items/build.gradle.kts +++ b/feature/items/build.gradle.kts @@ -1,6 +1,6 @@ plugins { alias(libs.plugins.learnoflegends.android.feature) - alias(libs.plugins.learnoflegends.android.libraryCompose) + alias(libs.plugins.learnoflegends.android.library.compose) } android { @@ -8,6 +8,6 @@ android { } dependencies { - - implementation(libs.material) + implementation(projects.core.data) + implementation(projects.core.domain) } diff --git a/feature/items/src/main/kotlin/com/bagnolati/learnoflegends/feature/items/component/ItemCard.kt b/feature/items/src/main/kotlin/com/bagnolati/learnoflegends/feature/items/component/ItemCard.kt index 605d5b8..f1dd774 100644 --- a/feature/items/src/main/kotlin/com/bagnolati/learnoflegends/feature/items/component/ItemCard.kt +++ b/feature/items/src/main/kotlin/com/bagnolati/learnoflegends/feature/items/component/ItemCard.kt @@ -18,12 +18,14 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import coil.compose.AsyncImage +import coil.request.ImageRequest import com.bagnolati.learnoflegends.core.model.Item import com.bagnolati.learnoflegends.core.ui.preview.ItemsPreviewParameterProvider import com.bagnolati.learnoflegends.core.ui.preview.ThemePreviews @@ -56,7 +58,11 @@ fun ItemCard( AsyncImage( modifier = Modifier .fillMaxSize(), - model = item.image.full, + model = + ImageRequest.Builder(LocalContext.current) + .data(item.image.full) + .crossfade(true) + .build(), contentDescription = null, placeholder = painterResource(id = uiR.drawable.ic_default_placeholder), contentScale = ContentScale.Crop diff --git a/feature/settings/build.gradle.kts b/feature/settings/build.gradle.kts index f80c9b9..c3a73f5 100644 --- a/feature/settings/build.gradle.kts +++ b/feature/settings/build.gradle.kts @@ -1,6 +1,6 @@ plugins { alias(libs.plugins.learnoflegends.android.feature) - alias(libs.plugins.learnoflegends.android.libraryCompose) + alias(libs.plugins.learnoflegends.android.library.compose) } android { @@ -8,4 +8,6 @@ android { } dependencies { + implementation(projects.core.data) + implementation(projects.core.domain) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 00a5c87..dc2b7e8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,43 +1,64 @@ [versions] -learnoflegends = "1.0.0" - -androidDesugarJdkLibs = "2.0.3" -androidGradlePlugin = "8.1.2" - -androidxActivity = "1.8.0" -androidxAppCompat = "1.6.1" -androidxComposeBom = "2023.10.00" -androidxComposeCompiler = "1.5.0" -androidxCore = "1.12.0" +accompanist = "0.34.0" +androidDesugarJdkLibs = "2.0.4" +# AGP and tools should be updated together +androidGradlePlugin = "8.4.0" +androidTools = "31.4.0" +androidxActivity = "1.9.0" +androidxAppCompat = "1.7.0" +androidxBrowser = "1.8.0" +androidxComposeBom = "2024.06.00" +androidxComposeCompiler = "1.5.14" +androidxComposeAlpha = "1.7.0-beta01" +androidxCore = "1.13.1" androidxCoreSplashscreen = "1.0.1" -androidxDataStore = "1.0.0" -androidxHiltNavigationCompose = "1.0.0" -androidxLifecycle = "2.6.2" -androidxNavigation = "2.7.4" -androidxWindowManager = "1.1.0" - -kotlin = "1.9.0" -kotlinxCoroutines = "1.7.1" -kotlinxSerializationJson = "1.5.1" -kotlinxDatetime = "0.4.0" -ksp = "1.9.0-1.0.13" - -accompanist = "0.30.1" -coil = "2.4.0" -hilt = "2.48" -lottie = "6.0.0" -okhttp = "4.10.0" -protobuf = "3.24.0" +androidxDataStore = "1.1.1" +androidxEspresso = "3.5.1" +androidxHiltNavigationCompose = "1.2.0" +androidxLifecycle = "2.8.3" +androidxMacroBenchmark = "1.2.4" +androidxMetrics = "1.0.0-alpha04" +androidxNavigation = "2.7.7" +androidxProfileinstaller = "1.3.1" +androidxTestCore = "1.5.0" +androidxTestExt = "1.1.5" +androidxTestRules = "1.5.0" +androidxTestRunner = "1.5.2" +androidxTracing = "1.2.0" +androidxUiAutomator = "2.3.0" +androidxWindowManager = "1.2.0" +androidxWork = "2.9.0" +coil = "2.6.0" +dependencyGuard = "0.5.0" +gmsPlugin = "4.4.2" +hilt = "2.51.1" +hiltExt = "1.2.0" +junit4 = "4.13.2" +kotlin = "2.0.0" +kotlinxCoroutines = "1.8.0" +kotlinxDatetime = "0.5.0" +kotlinxCollectionsImmutable = "0.3.7" +kotlinxSerializationJson = "1.6.3" +ksp = "2.0.0-1.0.21" +moduleGraph = "2.5.0" +okhttp = "4.12.0" +protobuf = "4.26.0" protobufPlugin = "0.9.4" retrofit = "2.9.0" retrofitKotlinxSerializationJson = "1.0.0" +robolectric = "4.11.1" +roborazzi = "1.7.0" secrets = "2.0.1" +truth = "1.4.2" +turbine = "1.1.0" [libraries] +accompanist-permissions = { group = "com.google.accompanist", name = "accompanist-permissions", version.ref = "accompanist" } android-desugarJdkLibs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "androidDesugarJdkLibs" } - androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidxActivity" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppCompat" } +androidx-benchmark-macro = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "androidxMacroBenchmark" } +androidx-browser = { group = "androidx.browser", name = "browser", version.ref = "androidxBrowser" } androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidxComposeBom" } androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation" } androidx-compose-foundation-layout = { group = "androidx.compose.foundation", name = "foundation-layout" } @@ -45,64 +66,80 @@ androidx-compose-material-iconsExtended = { group = "androidx.compose.material", androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" } androidx-compose-material3-windowSizeClass = { group = "androidx.compose.material3", name = "material3-window-size-class" } androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime" } +androidx-compose-ui-test = { group = "androidx.compose.ui", name = "ui-test-junit4" } +androidx-compose-ui-testManifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } androidx-compose-ui-util = { group = "androidx.compose.ui", name = "ui-util" } - androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" } androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "androidxCoreSplashscreen" } androidx-dataStore-core = { group = "androidx.datastore", name = "datastore", version.ref = "androidxDataStore" } -androidx-dataStore-preferences = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidxDataStore" } androidx-hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" } androidx-lifecycle-runtimeCompose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "androidxLifecycle" } androidx-lifecycle-viewModelCompose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "androidxLifecycle" } +androidx-metrics = { group = "androidx.metrics", name = "metrics-performance", version.ref = "androidxMetrics" } androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "androidxNavigation" } -androidx-window-manager = { module = "androidx.window:window", version.ref = "androidxWindowManager" } - -kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" } -kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } -kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinxDatetime" } - +androidx-navigation-testing = { group = "androidx.navigation", name = "navigation-testing", version.ref = "androidxNavigation" } +androidx-profileinstaller = { group = "androidx.profileinstaller", name = "profileinstaller", version.ref = "androidxProfileinstaller" } +androidx-test-core = { group = "androidx.test", name = "core", version.ref = "androidxTestCore" } +androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidxEspresso" } +androidx-test-ext = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "androidxTestExt" } +androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidxTestRules" } +androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidxTestRunner" } +androidx-test-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "androidxUiAutomator" } +androidx-tracing-ktx = { group = "androidx.tracing", name = "tracing-ktx", version.ref = "androidxTracing" } +coil-kt = { group = "io.coil-kt", name = "coil", version.ref = "coil" } +coil-kt-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" } +coil-kt-svg = { group = "io.coil-kt", name = "coil-svg", version.ref = "coil" } hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" } +hilt-android-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "hilt" } hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" } - +hilt-ext-compiler = { group = "androidx.hilt", name = "hilt-compiler", version.ref = "hiltExt" } +hilt-ext-work = { group = "androidx.hilt", name = "hilt-work", version.ref = "hiltExt" } +javax-inject = { module = "javax.inject:javax.inject", version = "1" } +kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" } +kotlinx-coroutines-guava = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-guava", version.ref = "kotlinxCoroutines" } +kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" } +kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinxDatetime" } +kotlinx-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version.ref = "kotlinxCollectionsImmutable" } +kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } +okhttp-logging = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" } protobuf-kotlin-lite = { group = "com.google.protobuf", name = "protobuf-kotlin-lite", version.ref = "protobuf" } protobuf-protoc = { group = "com.google.protobuf", name = "protoc", version.ref = "protobuf" } - retrofit-core = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" } retrofit-kotlin-serialization = { group = "com.jakewharton.retrofit", name = "retrofit2-kotlinx-serialization-converter", version.ref = "retrofitKotlinxSerializationJson" } -okhttp-logging = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" } - -coil-kt = { group = "io.coil-kt", name = "coil", version.ref = "coil" } -coil-kt-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" } -coil-kt-svg = { group = "io.coil-kt", name = "coil-svg", version.ref = "coil" } - -lottie-compose = { group = "com.airbnb.android", name = "lottie-compose", version.ref = "lottie" } - # Dependencies of the included build-logic android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" } +android-tools-common = { group = "com.android.tools", name = "common", version.ref = "androidTools" } +compose-gradlePlugin = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" } kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } ksp-gradlePlugin = { group = "com.google.devtools.ksp", name = "com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } -material = { group = "com.google.android.material", name = "material", version = "1.10.0" } -androidx-ui-text-android = { group = "androidx.compose.ui", name = "ui-text-android", version = "1.5.3" } [plugins] -kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } - +android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } +android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" } +baselineprofile = { id = "androidx.baselineprofile", version.ref = "androidxMacroBenchmark" } +compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +dependencyGuard = { id = "com.dropbox.dependency-guard", version.ref = "dependencyGuard" } +module-graph = { id = "com.jraska.module.graph.assertion", version.ref = "moduleGraph" } +gms = { id = "com.google.gms.google-services", version.ref = "gmsPlugin" } hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" } +roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" } secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" } -# Learn Of Legends plugins -learnoflegends-android-application = { id = "learnoflegends.android.application", version.ref = "learnoflegends" } -learnoflegends-android-applicationCompose = { id = "learnoflegends.android.application.compose", version.ref = "learnoflegends" } -learnoflegends-android-library = { id = "learnoflegends.android.library", version.ref = "learnoflegends" } -learnoflegends-android-libraryCompose = { id = "learnoflegends.android.library.compose", version.ref = "learnoflegends" } -learnoflegends-android-feature = { id = "learnoflegends.android.feature", version.ref = "learnoflegends" } -learnoflegends-android-hilt = { id = "learnoflegends.android.hilt", version.ref = "learnoflegends" } -learnoflegends-jvm-library = { id = "learnoflegends.jvm.library", version.ref = "learnoflegends" } \ No newline at end of file +# Plugins defined by this project +learnoflegends-android-application = { id = "learnoflegends.android.application", version = "unspecified" } +learnoflegends-android-application-compose = { id = "learnoflegends.android.application.compose", version = "unspecified" } +learnoflegends-android-application-flavors = { id = "learnoflegends.android.application.flavors", version = "unspecified" } +learnoflegends-android-feature = { id = "learnoflegends.android.feature", version = "unspecified" } +learnoflegends-android-hilt = { id = "learnoflegends.android.hilt", version = "unspecified" } +learnoflegends-android-library = { id = "learnoflegends.android.library", version = "unspecified" } +learnoflegends-android-library-compose = { id = "learnoflegends.android.library.compose", version = "unspecified" } +learnoflegends-android-test = { id = "learnoflegends.android.test", version = "unspecified" } +learnoflegends-jvm-library = { id = "learnoflegends.jvm.library", version = "unspecified" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c..d64cd49 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 332218b..6215db7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,8 @@ +#Wed May 22 23:41:37 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists \ No newline at end of file +zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index 350024d..dcebd4f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -24,6 +24,7 @@ include(":app") include(":core:common") include(":core:data") include(":core:datastore") +include(":core:datastore-proto") include(":core:domain") include(":core:model") include(":core:network")