This repository has been archived by the owner on Apr 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
/
build.gradle
139 lines (120 loc) · 5.08 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import org.mozilla.gradle.Dependencies
buildscript {
ext.androidx_version = '1.0.0'
ext.architecture_components_version = '2.0.0'
ext.kotlin_version = '1.3.31'
ext.coroutines_version = '1.0.1'
ext.moz_components_version = '24.0.0'
ext.androidx_work_version = '2.0.1'
ext.adm_version = '1.0.1' // Also update proguard rule if this gets updated
ext.oss_licenses_version = '17.0.0'
ext.robolectric_version = '4.0.2' // required for SDK 28.
// Support library test dependencies
// - List of artifacts: https://developer.android.com/training/testing/set-up-project#android-test-dependencies
// - Keep pinned to tested versions (in release notes): https://developer.android.com/jetpack/androidx/releases/archive/test
ext.test_core = '1.1.0'
ext.test_runner = '1.1.1'
ext.test_rules = ext.test_runner
ext.test_orchestrator = '1.1.1'
ext.espresso_version = '3.1.1'
ext.uiautomator_version = '2.2.0'
ext.junit = "1.1.0"
// This logic is duplicated in the allprojects block: I don't know how to fix that.
repositories {
maven {
url "https://maven.mozilla.org/maven2"
content {
includeGroupByRegex Dependencies.RepoMatching.mozilla
}
}
google() {
content {
// Improve performance: only check google maven for mozilla deps.
includeGroupByRegex Dependencies.RepoMatching.androidx
includeGroupByRegex Dependencies.RepoMatching.comGoogleAndroid
includeGroupByRegex Dependencies.RepoMatching.comAndroid
// Improve security: don't search deps with known repos. In theory, this is unnecessary
// if includeGroup is specified, but it's helpful in case includeGroup is removed.
excludeGroupByRegex Dependencies.RepoMatching.mozilla
}
}
jcenter() {
content {
// Improve security: don't search deps with known repos.
excludeGroupByRegex Dependencies.RepoMatching.mozilla
excludeGroupByRegex Dependencies.RepoMatching.androidx
excludeGroupByRegex Dependencies.RepoMatching.comGoogleAndroid
excludeGroupByRegex Dependencies.RepoMatching.comAndroid
}
}
}
dependencies {
// If you ever see strange Gradle behavior that looks related to the version,
// double check that this matches build.gradle.kts
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'org.ajoberstar:grgit:1.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.android.gms:oss-licenses-plugin:0.9.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id "io.gitlab.arturbosch.detekt" version "1.0.0.RC9.2"
}
detekt {
toolVersion = "1.0.0.RC9.2"
input = files("$projectDir")
config = files("$projectDir/quality/detekt.yml")
filters = ".*test.*,.*/resources/.*,.*/tmp/.*"
}
allprojects {
// This logic is duplicated in the buildscript block: I don't know how to fix that.
repositories {
maven {
url "https://maven.mozilla.org/maven2"
content {
// Improve performance: only check moz maven for mozilla deps.
includeGroupByRegex Dependencies.RepoMatching.mozilla
}
}
google() {
content {
// Improve performance: only check google maven for google deps.
includeGroupByRegex Dependencies.RepoMatching.androidx
includeGroupByRegex Dependencies.RepoMatching.comGoogleAndroid
includeGroupByRegex Dependencies.RepoMatching.comAndroid
// Improve security: don't search deps with known repos. In theory, this is unnecessary
// if includeGroup is specified, but it's helpful in case includeGroup is removed.
excludeGroupByRegex Dependencies.RepoMatching.mozilla
}
}
jcenter() {
content {
// Improve security: don't search deps with known repos.
excludeGroupByRegex Dependencies.RepoMatching.mozilla
excludeGroupByRegex Dependencies.RepoMatching.androidx
excludeGroupByRegex Dependencies.RepoMatching.comGoogleAndroid
excludeGroupByRegex Dependencies.RepoMatching.comAndroid
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
configurations {
ktlint
}
dependencies {
ktlint "com.pinterest:ktlint:0.33.0"
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "**/*.kt"
}