Skip to content

Commit

Permalink
Move all possible plugins in to toml and replace where is called.
Browse files Browse the repository at this point in the history
  • Loading branch information
davthecodercom committed May 27, 2024
1 parent 5d5ff81 commit 8ecf15d
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 41 deletions.
8 changes: 4 additions & 4 deletions bike/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
plugins {
id("com.android.application")
alias(libs.plugins.androidApplication)
kotlin("android")
kotlin("kapt")
id("dagger.hilt.android.plugin")
}

android {
namespace = "soy.gabimoreno.bike"
compileSdk = extra["compileSdk.version"]?.toString()?.toInt()
compileSdk = libs.versions.sdk.compile.get().toInt()

defaultConfig {
applicationId = "soy.gabimoreno.bike"
minSdk = extra["minSdk.version"]?.toString()?.toInt()
targetSdk = extra["targetSdk.version"]?.toString()?.toInt()
minSdk = libs.versions.sdk.minimum.get().toInt()
targetSdk = libs.versions.sdk.target.get().toInt()
versionCode = 1
versionName = "1.0"

Expand Down
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ buildscript {
}

plugins {
kotlin("multiplatform").apply(false)
id("com.android.application").apply(false)
id("com.android.library").apply(false)
id("org.jetbrains.compose").apply(false)
id("io.gitlab.arturbosch.detekt") version libs.versions.detekt.get()
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version libs.versions.secrets.gradle.plugin.get() apply false
alias(libs.plugins.kotlinMultiplatform).apply(false)
alias(libs.plugins.androidApplication).apply(false)
alias(libs.plugins.androidLibrary).apply(false)
alias(libs.plugins.jetbrainsCompose).apply(false)
alias(libs.plugins.detekt.gradle.plugin)
alias(libs.plugins.secrets.gradle.plugin) apply false
}

apply(from = "gradle-scripts/detekt.gradle")
Expand Down
12 changes: 6 additions & 6 deletions gabimoreno/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension
import org.jetbrains.compose.ComposePlugin.CommonComponentsDependencies.resources

plugins {
id("com.android.application")
alias(libs.plugins.androidApplication)
kotlin("android")
alias(libs.plugins.google.services)
kotlin("kapt")
id("dagger.hilt.android.plugin")
id("com.google.firebase.crashlytics")
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
id("org.jetbrains.compose")
alias(libs.plugins.secrets.gradle.plugin)
alias(libs.plugins.jetbrainsCompose)
}

@Suppress("UnstableApiUsage")
Expand All @@ -28,12 +28,12 @@ android {
}

namespace = "soy.gabimoreno"
compileSdk = extra["compileSdk.version"]?.toString()?.toInt()
compileSdk = libs.versions.sdk.compile.get().toInt()

defaultConfig {
applicationId = "soy.gabimoreno"
minSdk = extra["minSdk.version"]?.toString()?.toInt()
targetSdk = extra["targetSdk.version"]?.toString()?.toInt()
minSdk = libs.versions.sdk.minimum.get().toInt()
targetSdk = libs.versions.sdk.target.get().toInt()
versionCode = 54
versionName = "1.3.0"

Expand Down
4 changes: 0 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,4 @@ kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.version=1.9.20
agp.version=8.2.0
compose.version=1.5.11
compileSdk.version=34
minSdk.version=23
targetSdk.version=34
org.jetbrains.compose.experimental.uikit.enabled=true
kotlin.native.cacheKind=none
14 changes: 13 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[versions]
sdk-compile = "34"
sdk-target = "34"
sdk-minimum = "23"
agp = "8.2.0"
kotlin = "1.9.20"
accompanist-coil = "0.12.0"
accompanist-insets = "0.12.0"
androidx-junit = "1.1.5"
Expand All @@ -24,8 +29,9 @@ glide = "4.12.0"
google-material = "1.10.0"
google-services = "4.4.0"
gson = "2.10.1"
hilt-android = "2.48.1"
hilt-android = "2.51.1"
secrets-gradle-plugin = "2.0.1"
compose-plugin = "1.6.10"

junit = "4.13.2"
kluent-android = "1.73"
Expand Down Expand Up @@ -120,3 +126,9 @@ compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref =

[plugins]
google-services = { id = "com.google.gms.google-services", version.ref = "google-services" }
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
secrets-gradle-plugin = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets-gradle-plugin" }
detekt-gradle-plugin = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
6 changes: 3 additions & 3 deletions modules/core-testing/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id("com.android.library")
alias(libs.plugins.androidLibrary)
kotlin("android")
}

@Suppress("UnstableApiUsage")
android {
namespace = "soy.gabimoreno.core.testing"
compileSdk = 33
compileSdk = libs.versions.sdk.compile.get().toInt()

defaultConfig {
minSdk = 23
minSdk = libs.versions.sdk.minimum.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
6 changes: 3 additions & 3 deletions modules/core-view/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
plugins {
id("com.android.library")
alias(libs.plugins.androidLibrary)
kotlin("android")
kotlin("kapt")
}

@Suppress("UnstableApiUsage")
android {
namespace = "soy.gabimoreno.core.view"
compileSdk = 33
compileSdk = libs.versions.sdk.compile.get().toInt()

defaultConfig {
minSdk = 23
minSdk = libs.versions.sdk.minimum.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
6 changes: 3 additions & 3 deletions modules/framework/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
plugins {
id("com.android.library")
alias(libs.plugins.androidLibrary)
kotlin("android")
kotlin("kapt")
}

@Suppress("UnstableApiUsage")
android {
namespace = "soy.gabimoreno.framework"
compileSdk = 33
compileSdk = libs.versions.sdk.compile.get().toInt()

defaultConfig {
minSdk = 23
minSdk = libs.versions.sdk.minimum.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
6 changes: 3 additions & 3 deletions modules/player/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id("com.android.library")
alias(libs.plugins.androidLibrary)
id("org.jetbrains.kotlin.android")
}

@Suppress("UnstableApiUsage")
android {
namespace = "soy.gabimoreno.player"
compileSdk = 33
compileSdk = libs.versions.sdk.compile.get().toInt()

defaultConfig {
minSdk = 23
minSdk = libs.versions.sdk.minimum.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
6 changes: 3 additions & 3 deletions modules/remote-config/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
plugins {
id("com.android.library")
alias(libs.plugins.androidLibrary)
kotlin("android")
kotlin("kapt")
}

@Suppress("UnstableApiUsage")
android {
namespace = "soy.gabimoreno.remoteconfig"
compileSdk = 33
compileSdk = libs.versions.sdk.compile.get().toInt()

defaultConfig {
minSdk = 23
minSdk = libs.versions.sdk.minimum.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
10 changes: 5 additions & 5 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import java.util.Locale

plugins {
kotlin("multiplatform")
id("com.android.library")
id("org.jetbrains.compose")
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.jetbrainsCompose)
}

@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
Expand Down Expand Up @@ -86,9 +86,9 @@ kotlin {

android {
namespace = "soy.gabimoreno.shared"
compileSdk = 33
compileSdk = libs.versions.sdk.compile.get().toInt()
defaultConfig {
minSdk = 23
minSdk = libs.versions.sdk.minimum.get().toInt()
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
Expand Down

0 comments on commit 8ecf15d

Please sign in to comment.