Skip to content

Commit

Permalink
Migrate even more to the Kotlin DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
niknetniko committed Oct 5, 2024
1 parent 684f26e commit 195ba25
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import com.google.gms.googleservices.GoogleServicesPlugin
import java.io.FileInputStream

plugins {
id("com.android.application")
id(libs.plugins.android.build.tool.get().pluginId)
id("be.ugent.zeus.hydra.licenses")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
alias(libs.plugins.gms)
alias(libs.plugins.firebase.crashlytics.gradle)
}

// Read our properties, see bottom for details.
Expand Down
34 changes: 6 additions & 28 deletions build.gradle → build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022 The Hydra authors
* Copyright (c) 2015-2024 The Hydra authors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,36 +19,14 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
buildscript {
repositories {
// For Google-related dependencies
google()
// For the license plugin
mavenCentral()
}
dependencies {
classpath libs.android.build.tool
classpath libs.gms
classpath libs.firebase.crashlytics.gradle
}
}

allprojects {
repositories {
// Google libraries
google()
// Other libraries
mavenCentral()
// Some custom libraries
maven { url 'https://jitpack.io' }
}
}

tasks.register('clean', Delete) {
delete rootProject.layout.buildDirectory
plugins {
id(libs.plugins.android.build.tool.get().pluginId) apply false
alias(libs.plugins.gms) apply false
alias(libs.plugins.firebase.crashlytics.gradle) apply false
}

// We want sources to improve IDE features inside our Gradle files.
wrapper {
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}
11 changes: 8 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ livedata = '2.8.6'
okhttp3 = '4.12.0'
recordbuilder = '42'
room = '2.6.1'
buildtool = '8.5.2'

[libraries]
android-build-tool = { module = 'com.android.tools.build:gradle', version = '8.5.2' }
android-build-tool = { module = 'com.android.tools.build:gradle', version.ref = 'buildtool' }
androidx-appcompat = { module = 'androidx.appcompat:appcompat', version = '1.7.0' }
androidx-browser = { module = 'androidx.browser:browser', version = '1.8.0' }
androidx-cardview = { module = 'androidx.cardview:cardview', version = '1.0.0' }
Expand Down Expand Up @@ -40,8 +41,6 @@ easyrandom = { module = 'com.github.niknetniko:easy-random', version = 'master-S
equalsverifier = { module = 'nl.jqno.equalsverifier:equalsverifier', version = '3.17' }
firebase-analytics = { module = 'com.google.firebase:firebase-analytics', version = '22.1.0' }
firebase-crashlytics = { module = 'com.google.firebase:firebase-crashlytics', version = '19.2.0' }
firebase-crashlytics-gradle = { module = 'com.google.firebase:firebase-crashlytics-gradle', version = '3.0.2' }
gms = { module = 'com.google.gms:google-services', version = '4.4.2' }
guava = { module = 'com.google.guava:guava', version = '33.3.1-jre' }
insetter = { module = 'dev.chrisbanes.insetter:insetter', version = '0.6.1' }
ipcam = { module = 'com.github.niqdev:ipcam-view', version = '2.4.1' }
Expand All @@ -68,5 +67,11 @@ rxjava-rules = { module = 'com.artemzin.rxjava:proguard-rules', version = '1.3.3
shazamcrest = { module = 'com.shazam:shazamcrest', version = '0.11' }
zxing = { module = 'com.journeyapps:zxing-android-embedded', version = '4.3.0' }

[plugins]
android-build-tool = { id = 'com.android.application', version.ref = 'buildtool' }
android-build-library = { id = 'com.android.library', version.ref = 'buildtool' }
gms = 'com.google.gms.google-services:4.4.2'
firebase-crashlytics-gradle = 'com.google.firebase.crashlytics:3.0.2'

[bundles]
androidx-lifecycle = ['androidx-lifecycle-vm', 'androidx-lifecycle-data', 'androidx-lifecycle-java']
2 changes: 1 addition & 1 deletion material-intro/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import java.io.FileInputStream
import java.util.*

plugins {
id("com.android.library")
id(libs.plugins.android.build.library.get().pluginId)
}

val versions = loadAndroidVersions()
Expand Down
17 changes: 17 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,22 @@
* SOFTWARE.
*/

pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}

dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}

include(":app")
include(":material-intro")

0 comments on commit 195ba25

Please sign in to comment.