-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
94 lines (83 loc) · 3.06 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
buildscript {
ext {
kotlin_version = '1.6.20'
app_compat_version = '1.4.1'
constraint_layout_version = '2.1.3'
core_version = '1.7.0'
coroutines_version = '1.6.1'
fragment_version = '1.5.0-alpha05'
glide_version = '4.13.1'
guava_version = '31.1-android'
hilt_version = '2.41'
lifecycle_version = '2.5.0-alpha06'
material_version = '1.5.0'
navigation_version = '2.4.2'
moshi_version = '1.13.0'
recyclerview_version = '1.2.1'
retrofit_version = '2.9.0'
ok_http_version = '5.0.0-alpha.6'
timber_version = '5.0.1'
room_version = '2.4.2'
// Test Dependency Versions
junit_version = '4.13.2'
junit_test_ext_version = '1.1.3'
timber_junit_rule_version = '1.0.1'
espresso_version = '3.4.0'
hilt_fragment_testing_version = '1.3.0'
androidx_test_runner_version = '1.4.0'
androidx_test_core_version = '1.4.0'
arch_testing_version = '2.1.0'
mockk_version = '1.12.3'
kotest_version = '5.2.3'
turbine_version = '0.7.0'
// Gradle Plugins
android_gradle_plugin_version = '7.1.3'
ci_detect_plugin_version = '0.5.0'
dependency_analysis_version = '1.0.0-rc06'
detekt_version = '1.20.0-RC2'
githooks_version = '1.2.0'
spotless_version = '6.4.2'
// Tool Versions
ktlint_version = '0.45.2'
jacoco_version = '0.8.8'
}
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "com.android.tools.build:gradle:$android_gradle_plugin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
classpath "gradle.plugin.com.star-zero.gradle:githook:$githooks_version"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detekt_version"
classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotless_version"
classpath "com.autonomousapps:dependency-analysis-gradle-plugin:$dependency_analysis_version"
classpath "be.vbgn.gradle:ci-detect-plugin:$ci_detect_plugin_version"
classpath "org.jacoco:org.jacoco.core:$jacoco_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
// Delete all subproject build directories when "clean" task is run
afterEvaluate {
task cleanBuildDir { task ->
delete "${task.project.name}/${buildDir}"
}
clean.doFirst { cleanBuildDir }
}
}
ext {
gradleScriptsDir = layout.projectDirectory.dir('gradle')
}
// Gradle Plugins
apply from: "$gradleScriptsDir/spotless.gradle"
apply from: "$gradleScriptsDir/commit-msg-template.gradle"
apply from: "$gradleScriptsDir/githooks.gradle"
apply from: "$gradleScriptsDir/dependency-analysis.gradle"
apply plugin: "be.vbgn.ci-detect"