forked from Lukoh/AdvancedAppArchitecture
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
141 lines (117 loc) · 4.22 KB
/
build.gradle
File metadata and controls
141 lines (117 loc) · 4.22 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = "1.7.20"
kotlinx_version = '1.5.31'
ktlint_version = '8.2.0'
arch_version = '2.1.0'
arch_lifecycle_version = '2.6.0-alpha03'
arch_lifecycle_extension_version = '2.2.0'
arch_lifecycle_ktx = '2.6.0-alpha03'
arch_lifecycle_runtime_ktx = '2.6.0-alpha03'
arch_lifecycle_viewmodel_savedstate = '2.6.0-alpha03'
arch_paging_version = '3.1.1'
arch_nav_version = "2.5.3"
arch_fragment_version = '1.6.0-alpha04'
arch_fragment_testing_version = '1.5.5'
arch_activity_version = "1.6.1"
androidx_version = '1.2.0'
androidx_recyclerview_version = '1.2.1'
androidx_cardview_version = '1.0.0'
androidx_core_ktx_version = '1.9.0'
androidx_appcompat_version = '1.7.0-alpha01'
androidx_multidex_version = '2.0.1'
design_support_version = '1.3.0'
constraint_layout_version = '2.0.4'
retrofit_version = "2.9.0"
okhttp3_version = '4.9.0'
lottieVersion = '5.2.0'
dagger_version = '2.44.2'
timber_version = '5.0.1'
//sentry_gradle_plug_in_version = '3.1.6'
enableCrashlytics = false
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.14' // google-services plugin
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10'
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
classpath 'com.google.firebase:perf-plugin:1.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlint_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$arch_nav_version"
// https://github.com/getsentry/sentry-android-gradle-plugin/releases
//classpath "io.sentry:sentry-android-gradle-plugin:$sentry_gradle_plug_in_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
repositories {
google()
mavenCentral()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "1000"
}
}
}
plugins {
id "com.diffplug.gradle.spotless" version "4.1.0"
id "org.jlleitschuh.gradle.ktlint" version "$ktlint_version"
id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false
}
subprojects {
// Optionally configure plugin
ktlint {
debug.set(true)
}
}
spotless {
java {
target '**/*.java'
googleJavaFormat().aosp()
removeUnusedImports()
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
kotlin {
target "**/*.kt"
ktlint(ktlint_version)
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
format 'misc', {
target '**/*.gradle', '**/*.md', '**/.gitignore'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
format 'xml', {
target '**/*.xml'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "com.android.support") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "26.+"
}
}
if (requested.group == "androidx.appcompat") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "1.+"
}
}
}
exclude group: 'com.google.protobuf', module: 'protobuf-lite'
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: "com.android.support", module: "support-core-ui"
exclude group: "com.android.support", module: "support-compat"
}