-
Notifications
You must be signed in to change notification settings - Fork 143
Expand file tree
/
Copy pathbuild.gradle
More file actions
113 lines (95 loc) · 3.35 KB
/
build.gradle
File metadata and controls
113 lines (95 loc) · 3.35 KB
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
/*
* 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 {
repositories {
google()
mavenLocal()
maven { url = "https://maven.google.com" }
maven { url = "https://plugins.gradle.org/m2/" }
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath libs.androidx.navigation.safe.args.gradle.plugin
classpath libs.gradle
classpath libs.google.services
// Performance Monitoring plugin: https://firebase.google.com/docs/perf-mon
classpath libs.perf.plugin
// Crashlytics plugin
classpath libs.firebase.crashlytics.gradle
// Kotlin
classpath libs.kotlin.gradle.plugin
classpath libs.kotlin.serialization
// OSS Licenses Plugin
classpath libs.oss.licenses.plugin
// To fetch Maps API key from secrets.properties.
classpath libs.secrets.gradle.plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
alias libs.plugins.kotlin.serialization apply false
alias libs.plugins.compose.compiler apply false
alias libs.plugins.ksp apply false
alias libs.plugins.room apply false
alias libs.plugins.ktfmt
alias libs.plugins.hilt.android apply false
alias libs.plugins.detekt
alias libs.plugins.protobuf apply false
alias libs.plugins.kotlin.multiplatform apply false
alias libs.plugins.android.kotlin.multiplatform.library apply false
alias libs.plugins.android.lint apply false
alias libs.plugins.compose.multiplatform 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.8"
source.setFrom(files(subprojects.collect { "${it.projectDir}/src" }))
allRules = true
config.setFrom(files("${project.rootDir}/config/detekt/detekt.yml"))
baseline = file("${project.rootDir}/config/detekt/baseline.xml")
buildUponDefaultConfig = true
ignoreFailures = false
basePath = projectDir
}
tasks.register('checkCode') {
dependsOn 'detekt'
}
subprojects {
rootProject.tasks.named('checkCode').configure {
dependsOn tasks.matching { task ->
task.name in ['checkstyle', 'ktfmtCheck', 'lintLocalDebug', 'lintAndroidMain']
}
}
}