mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 10:37:05 +05:30
gradle: migrate plugin dependencies to version catalogs
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
c9806c09dd
commit
0eba1e26fb
9 changed files with 52 additions and 52 deletions
|
@ -1,4 +1,5 @@
|
|||
@file:OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
|
||||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
import com.android.build.api.artifact.SingleArtifact
|
||||
import com.android.build.api.variant.BuiltArtifactsLoader
|
||||
|
@ -17,11 +18,11 @@ import org.gradle.api.tasks.PathSensitivity
|
|||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.compose")
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
kotlin("kapt")
|
||||
id("dagger.hilt.android.plugin")
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.kapt)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.hilt)
|
||||
}
|
||||
|
||||
@CacheableTask
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
plugins { kotlin("jvm") }
|
||||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
plugins { alias(libs.plugins.kotlin.jvm) }
|
||||
|
||||
dependencies {
|
||||
api(projects.model)
|
||||
|
|
|
@ -1,30 +1,19 @@
|
|||
import org.gradle.api.tasks.compile.JavaCompile
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
buildscript {
|
||||
val kotlinVersion = "1.6.10"
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url = uri("https://storage.googleapis.com/r8-releases/raw")
|
||||
content { includeModule("com.android.tools", "r8") }
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools:r8:3.3.14-dev")
|
||||
classpath(kotlin("gradle-plugin", version = kotlinVersion))
|
||||
classpath(kotlin("serialization", version = kotlinVersion))
|
||||
classpath("com.android.tools.build:gradle:7.0.4")
|
||||
classpath("com.google.dagger:hilt-android-gradle-plugin:2.41")
|
||||
}
|
||||
dependencies { classpath(libs.r8) }
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.diffplug.spotless") version "6.3.0"
|
||||
id("com.github.ben-manes.versions") version "0.42.0"
|
||||
id("nl.littlerobots.version-catalog-update") version "0.3.1"
|
||||
alias(libs.plugins.spotless)
|
||||
alias(libs.plugins.versions)
|
||||
alias(libs.plugins.vcu)
|
||||
}
|
||||
|
||||
group = "dev.msfjarvis.claw"
|
||||
|
@ -42,21 +31,3 @@ spotless {
|
|||
ktfmt("0.35").googleStyle()
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
||||
targetCompatibility = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
languageVersion = "1.5"
|
||||
freeCompilerArgs =
|
||||
freeCompilerArgs +
|
||||
listOf(
|
||||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
@file:OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
|
||||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
import org.jetbrains.compose.compose
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
id("com.android.library")
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("com.android.library")
|
||||
id("com.squareup.sqldelight") version "1.5.3"
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.sqldelight)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
import org.jetbrains.compose.compose
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.compose)
|
||||
}
|
||||
|
||||
group = "dev.msfjarvis.claw"
|
||||
|
|
|
@ -1,12 +1,29 @@
|
|||
[versions]
|
||||
agp = "7.0.4"
|
||||
accompanist = "0.24.3-alpha"
|
||||
aurora = "1.1.0"
|
||||
coroutines = "1.6.0"
|
||||
hilt = "2.41"
|
||||
kotlin = "1.6.10"
|
||||
richtext = "0.11.0"
|
||||
serialization = "1.3.2"
|
||||
sqldelight = "1.5.3"
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||
compose = { id = "org.jetbrains.compose", version = "1.1.0" }
|
||||
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
|
||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
spotless = { id = "com.diffplug.spotless", version = "6.3.0" }
|
||||
sqldelight = { id = "com.squareup.sqldelight", version = "1.5.3" }
|
||||
versions = { id = "com.github.ben-manes.versions", version = "0.42.0" }
|
||||
vcu = { id = "nl.littlerobots.version-catalog-update", version = "0.3.1" }
|
||||
|
||||
[libraries]
|
||||
accompanist-insets = { module = "com.google.accompanist:accompanist-insets", version.ref = "accompanist" }
|
||||
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
|
||||
|
@ -34,6 +51,7 @@ kotlin-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-co
|
|||
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" }
|
||||
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
|
||||
multiplatform-paging = "io.github.kuuuurt:multiplatform-paging:0.4.7"
|
||||
r8 = "com.android.tools:r8:3.3.14-dev"
|
||||
retrofit-kotlinxSerializationConverter = "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0"
|
||||
retrofit-lib = "com.squareup.retrofit2:retrofit:2.9.0"
|
||||
sqldelight-androidDriver = { module = "com.squareup.sqldelight:android-driver", version.ref = "sqldelight" }
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
kotlin("plugin.serialization")
|
||||
id("com.android.library")
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
alias(libs.plugins.android.library)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
|
@ -8,7 +10,6 @@ pluginManagement {
|
|||
}
|
||||
google()
|
||||
}
|
||||
plugins { id("org.jetbrains.compose") version "1.2.0-alpha01-dev640" apply false }
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue