-
Notifications
You must be signed in to change notification settings - Fork 119
/
build.gradle
123 lines (104 loc) · 3.72 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Top-level build file. Configuration specified here is inherited by all sub-projects/modules.
buildscript {
ext {
// As of Gradle 8.5, Kotlin plugin only tested up to 1.9.20.
kotlinVersion = "1.9.23"
hiltVersion = "2.51"
navigationVersion = "2.7.7"
roomVersion = "2.6.1"
junitVersion = "4.13.2"
timberVersion = "5.0.1"
}
repositories {
google()
mavenLocal()
maven { url "https://maven.google.com" }
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.google.gms:google-services:4.4.2'
classpath "de.sharpmind:gitversioner:0.6.3"
// Performance Monitoring plugin: https://firebase.google.com/docs/perf-mon
classpath 'com.google.firebase:perf-plugin:1.4.2'
// Crashlytics plugin
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
// Kotlin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
// OSS Licenses Plugin
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id "org.jetbrains.kotlin.android" version "$kotlinVersion" apply false
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlinVersion"
id "com.ncorti.ktfmt.gradle" version "0.20.0"
id "com.google.dagger.hilt.android" version "$hiltVersion" apply false
id "io.gitlab.arturbosch.detekt" version "1.23.5"
id "com.google.protobuf" version '0.9.4' apply false
}
allprojects {
repositories {
google() // For github repos.
mavenLocal()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
maven { url "https://repo.osgeo.org/repository/release/" } // GeoTools
mavenCentral()
}
}
subprojects {
apply plugin: "com.ncorti.ktfmt.gradle" // Version should be inherited from parent
// https://github.com/cortinico/ktfmt-gradle
ktfmt {
googleStyle()
}
}
detekt {
toolVersion = "1.23.5"
source = files("ground/src", "sharedTest/src")
allRules = true
config = files("${project.rootDir}/config/detekt/detekt.yml")
baseline = file("${project.rootDir}/config/detekt/baseline.xml")
buildUponDefaultConfig = true
ignoreFailures = false
basePath = projectDir
}
tasks.register('checkCode', GradleBuild) {
tasks = ['checkstyle', 'lintLocalDebug', 'ktfmtCheck', 'detekt']
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
// https://github.com/passsy/gradle-gitVersioner-plugin
apply plugin: "de.sharpmind.gitversioner"
gitVersioner {
baseBranch "master"
}
ext {
androidCompileSdk = 34
androidMinSdk = 24
androidTargetSdk = 33
jvmToolchainVersion = 17
}