mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 21:27:01 +05:30
buildSrc: move plugin dependencies to Dependencies.kt
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
2a4c58a680
commit
df1db3d0ff
5 changed files with 36 additions and 41 deletions
|
@ -1,18 +1,3 @@
|
|||
buildscript {
|
||||
apply(from = "buildSrc/buildDependencies.gradle")
|
||||
val build: Map<Any, Any> by extra
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath(build.getValue("androidGradlePlugin"))
|
||||
classpath(build.getValue("daggerGradlePlugin"))
|
||||
classpath(build.getValue("kotlinGradlePlugin"))
|
||||
classpath(build.getValue("sqldelightGradlePlugin"))
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions") version "0.36.0"
|
||||
`lobsters-plugin`
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
apply(from = "buildDependencies.gradle")
|
||||
val build: Map<Any, Any> by extra
|
||||
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
@ -32,10 +29,10 @@ gradlePlugin {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation(build.getValue("kotlinGradlePlugin"))
|
||||
implementation(build.getValue("daggerGradlePlugin"))
|
||||
implementation(build.getValue("androidGradlePlugin"))
|
||||
implementation(build.getValue("androidGradlePlugin_lintModel"))
|
||||
implementation(build.getValue("jsemver"))
|
||||
implementation(build.getValue("sqldelightGradlePlugin"))
|
||||
implementation(Plugins.androidGradlePlugin)
|
||||
implementation(Plugins.androidGradlePlugin_lintModel)
|
||||
implementation(Plugins.daggerGradlePlugin)
|
||||
implementation(Plugins.jsemver)
|
||||
implementation(Plugins.kotlinGradlePlugin)
|
||||
implementation(Plugins.sqldelightGradlePlugin)
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
rootProject.ext.versions = [
|
||||
agp : '7.0.0-alpha05',
|
||||
daggerHilt: '2.31.2-alpha',
|
||||
kotlin : '1.4.21',
|
||||
lint : '30.0.0-alpha05',
|
||||
semver : '0.9.0',
|
||||
sqldelight: '1.4.4',
|
||||
]
|
||||
|
||||
rootProject.ext.build = [
|
||||
androidGradlePlugin : "com.android.tools.build:gradle:${versions.agp}",
|
||||
androidGradlePlugin_lintModel : "com.android.tools.lint:lint-model:${versions.lint}",
|
||||
daggerGradlePlugin : "com.google.dagger:hilt-android-gradle-plugin:${versions.daggerHilt}",
|
||||
kotlinGradlePlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
|
||||
jsemver : "com.github.zafarkhaja:java-semver:${versions.semver}",
|
||||
sqldelightGradlePlugin : "com.squareup.sqldelight:gradle-plugin:${versions.sqldelight}",
|
||||
]
|
21
buildSrc/buildSrc/build.gradle.kts
Normal file
21
buildSrc/buildSrc/build.gradle.kts
Normal file
|
@ -0,0 +1,21 @@
|
|||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
kotlinDslPluginOptions {
|
||||
experimentalWarning.set(false)
|
||||
}
|
||||
|
||||
// force compilation of Dependencies.kt so it can be referenced in buildSrc/build.gradle.kts
|
||||
sourceSets.main {
|
||||
java {
|
||||
setSrcDirs(setOf(projectDir.parentFile.resolve("src/main/java")))
|
||||
include("Dependencies.kt")
|
||||
}
|
||||
}
|
|
@ -5,6 +5,15 @@
|
|||
|
||||
private const val DAGGER_HILT_VERSION = "2.31.2-alpha"
|
||||
|
||||
object Plugins {
|
||||
const val androidGradlePlugin = "com.android.tools.build:gradle:7.0.0-alpha05"
|
||||
const val androidGradlePlugin_lintModel = "com.android.tools.lint:lint-model:30.0.0-alpha05"
|
||||
const val daggerGradlePlugin = "com.google.dagger:hilt-android-gradle-plugin:${DAGGER_HILT_VERSION}"
|
||||
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21"
|
||||
const val jsemver = "com.github.zafarkhaja:java-semver:0.9.0"
|
||||
const val sqldelightGradlePlugin = "com.squareup.sqldelight:gradle-plugin:1.4.4"
|
||||
}
|
||||
|
||||
object Dependencies {
|
||||
const val COMPOSE_VERSION = "1.0.0-alpha10"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue