Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate buildscript to plugins #255

Merged
merged 1 commit into from
Dec 9, 2023
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
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ plugins {
id "moop.android.application"
id "moop.android.compose"
id "moop.android.hilt"
alias libs.plugins.firebase.crashlytics
alias libs.plugins.firebase.perf
alias libs.plugins.dependencyGuard
}
if (file("google-services.json").exists()) {
apply plugin: 'com.google.gms.google-services'
}
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.dropbox.dependency-guard'

def useReleaseKeystore = rootProject.file("signing/app-release.jks").exists()

Expand Down
31 changes: 11 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
buildscript {
dependencies {
classpath libs.android.pluginGradle
classpath libs.kotlin.pluginGradle
classpath libs.kotlin.serializationPluginGradle
classpath libs.dagger.hilt.pluginGradle
classpath libs.google.pluginGradle
classpath libs.firebase.crashlytics.pluginGradle
classpath libs.firebase.perf.pluginGradle
classpath libs.dependencyGuard.pluginGradle
}
}

plugins {
alias(libs.plugins.spotless)
alias(libs.plugins.ksp)
alias(libs.plugins.dependencyGuard)
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.gms) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.dagger.hilt) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.dependencyGuard) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.firebase.perf) apply false
}

apply from: "$rootDir/gradle/version.gradle"
Expand All @@ -33,10 +28,6 @@ subprojects {
}
}

dependencyGuard {
configuration("classpath")
}

Object propOrDef(String propertyName, Object defaultValue) {
def properties = new Properties()
def keyFile = rootProject.file("signing/key.properties")
Expand Down
172 changes: 0 additions & 172 deletions dependencies/classpath.txt

This file was deleted.

26 changes: 17 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[versions]

# Android
androidGradlePlugin = "8.1.4"
gms = "4.3.14"

# Kotlin
kotlin = "1.8.10"
coroutines = "1.6.4"
Expand Down Expand Up @@ -34,14 +38,12 @@ dependencyGuard = "0.3.2"

[libraries]

android-pluginGradle = "com.android.tools.build:gradle:8.1.4"
# Android
android-desugar-jdk = "com.android.tools:desugar_jdk_libs:1.1.5"

# Kotlin

kotlin-pluginGradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-serializationPluginGradle = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
kotlin-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }

coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
Expand All @@ -50,7 +52,6 @@ coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", ve

# Dagger

dagger-hilt-pluginGradle = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "dagger" }
dagger-hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "dagger" }
dagger-hilt-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "dagger" }
dagger-hilt-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "dagger" }
Expand Down Expand Up @@ -128,7 +129,6 @@ androidx-test-uiautomator = "androidx.test.uiautomator:uiautomator:2.2.0"

# Google

google-pluginGradle = "com.google.gms:google-services:4.3.14"
google-play-appUpdate = "com.google.android.play:app-update-ktx:2.0.1"
google-ads = "com.google.android.gms:play-services-ads:21.3.0"

Expand All @@ -139,8 +139,6 @@ firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx"
firebase-dynamicLinks = { module = "com.google.firebase:firebase-dynamic-links-ktx" }
firebase-messaging = { module = "com.google.firebase:firebase-messaging-ktx" }
firebase-perf = { module = "com.google.firebase:firebase-perf-ktx" }
firebase-crashlytics-pluginGradle = { module = "com.google.firebase:firebase-crashlytics-gradle", version = "2.9.2" }
firebase-perf-pluginGradle = { module = "com.google.firebase:perf-plugin", version = "1.4.2" }

# Etc

Expand All @@ -153,9 +151,19 @@ kakaoLink = "com.kakao.sdk:v2-share:2.13.0"
naverMapCompose = { module = "io.github.fornewid:naver-map-compose", version.ref = "navermapcompose" }
timber = "com.jakewharton.timber:timber:5.0.1"

dependencyGuard-pluginGradle = { module = "com.dropbox.dependency-guard:dependency-guard", version.ref = "dependencyGuard" }
# Dependencies of the included build-logic
android-pluginGradle = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
kotlin-pluginGradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }

[plugins]
spotless = { id = "com.diffplug.spotless", version = "6.11.0" }
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
gms = { id = "com.google.gms.google-services", version.ref = "gms" }
dagger-hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
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" }
spotless = { id = "com.diffplug.spotless", version = "6.11.0" }
dependencyGuard = { id = "com.dropbox.dependency-guard", version.ref = "dependencyGuard" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "2.9.2" }
firebase-perf = { id = "com.google.firebase.firebase-perf", version = "1.4.2" }