-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
119 lines (97 loc) · 3.36 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
import io.gitlab.arturbosch.detekt.Detekt
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
androidGradlePlugin = '7.3.1'
kotlinSerializationPlugin = '1.8.0'
// Project
minSdk = 23
targetSdk = 33
compileSdk = 33
desugarJdkLibrary = "1.1.6"
// Kotlin
kotlin = "1.8.0"
// Kotlin Coroutines
kotlinCoroutines = "1.6.4"
// ViewModel
viewModelScope = "2.5.1"
viewModelFragmentKtx = "1.5.5"
// Android UI
appCompat = "1.6.0"
materialUi = "1.8.0"
constraintLayout = "2.1.4"
recyclerView = '1.2.1'
swiperefresh = "1.1.0"
navigation = "2.5.3"
lottieAndroidView = "5.2.0"
shimmerAndroidView = "0.5.0"
glide = "4.14.2"
// Jetpack Compose UI
composeCompiler = "1.4.0"
composeBom = "2023.01.00"
activityCompose = "1.7.0-alpha04"
composeConstraintLayout = "1.0.1"
navigationCompose = "2.6.0-alpha05"
coil = "2.2.2"
lottieCompose = "5.2.0"
shimmerCompose = "1.0.4"
// DI
dagerHilt = "2.45"
hiltNavigation = "1.0.0"
// Room
room = "2.5.0"
// Retrofit
retrofit = "2.9.0"
retrofitLogging = "4.9.3"
retrofitKotlinxSerialization = "0.8.0"
// KotlinX Serialization
kotlinxSerialization = "1.4.1"
// Code Style
detekt = "1.20.0"
// Testing
jUnit = "4.13.2"
jUnitAndroidX = "1.1.5"
espresso = "3.5.1"
mockk = "1.13.2"
kotlinAndroidTest = "1.5.0"
okHttp = "4.9.0"
androidArchCore = "2.1.0"
}
}
plugins {
//trick: for the same plugin versions in all sub-modules
id 'org.jetbrains.kotlin.android' version "$kotlin" apply false
id 'com.android.application' version "$androidGradlePlugin" apply false
id 'com.android.library' version "$androidGradlePlugin" apply false
// Detekt
id "io.gitlab.arturbosch.detekt" version "$detekt" apply false
// DI
id "com.google.dagger.hilt.android" version "$dagerHilt" apply false
}
subprojects {
// Jetpack Compose breaches lots of code styles in Kotlin,
// so ignoring Detekt on module with Jetpack Compose
if (project.name != "jetpackComposeApp")
applyDetekt(project.name)
}
def applyDetekt(projectName) {
project(projectName) {
// Version should be inherited from parent
apply plugin: "io.gitlab.arturbosch.detekt"
detekt {
// point to your custom config defining rules to run, overwriting default behavior
config = files("$rootDir/detekt_config.yml")
}
tasks.withType(Detekt).configureEach {
reports {
html.enabled = false
// observe findings in your browser with structure and code snippets
xml.enabled = false // checkstyle like format mainly for integrations like Jenkins
txt.enabled = false
// similar to the console output, contains issue signature to manually edit baseline files
sarif.enabled = false
// standardized SARIF format (https://sarifweb.azurewebsites.net/) to support integrations with Github Code Scanning
}
}
}
}