This repository has been archived by the owner on Jan 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 711
/
build.gradle
109 lines (94 loc) · 3.72 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.espresso_version = '3.1.0-alpha4'
ext.coroutines_version = '1.4.2'
ext.jna_version = "5.6.0"
// Pinning the last working version of the service-telemetry component until we decide
// what we want to do with telemetry in the app.
ext.mozilla_components_version_telemetry = '57.0.9'
repositories {
google()
mavenCentral()
maven {
// We will always need this repository for retrieving stable dependencies (like Glean).
url "https://maven.mozilla.org/maven2"
}
maven {
url "https://nightly.maven.mozilla.org/maven2"
}
}
dependencies {
classpath Dependencies.android_gradle_plugin
classpath Dependencies.kotlin_gradle_plugin
classpath "org.mozilla.components:tooling-glean-gradle:${AndroidComponents.VERSION}"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
// The version number is duplicated in the detekt block. We are unable to use constants due to
// limitations of the gradle plugin. We've decided to stick with duplication for now since the
// other methods involve using undocumented APIs
// https://docs.gradle.org/current/userguide/plugins.html#plugins_dsl_limitations
id("io.gitlab.arturbosch.detekt").version("1.16.0")
}
detekt {
// The version number is duplicated, please refer to plugins block for more details
version = "1.16.0"
buildUponDefaultConfig = true
input = files("$projectDir/app")
config = files("$projectDir/quality/detekt.yml")
baseline = file("$projectDir/quality/detekt-baseline.xml")
reports {
html {
enabled = true
destination = file("$projectDir/build/reports/detekt.html")
}
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://nightly.maven.mozilla.org/maven2"
}
maven {
url "https://maven.mozilla.org/maven2"
}
jcenter() {
content {
////////////////////////////////////////////////////////////////////////////////
// JCenter is going away. Please do not add any new dependencies here.
// https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
////////////////////////////////////////////////////////////////////////////////
// Used by detekt
// Issue for publishing to maven central: https://github.com/Kotlin/kotlinx.html/issues/173
// Related detekt issue: https://github.com/detekt/detekt/issues/3461
includeVersion("org.jetbrains.kotlinx", "kotlinx-html-jvm", "0.7.2")
includeVersion("org.jetbrains.kotlinx", "kotlinx-html-common", "0.7.2")
// Fastlane
// Doesn't seem to be available on Maven Central yet, and I couldn't find an issue for it
// https://github.com/fastlane/fastlane
includeVersion("tools.fastlane", "screengrab", "2.0.0")
// https://github.com/jraska/Falcon/issues/52
includeVersion("com.jraska", "falcon", "2.1.1")
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
configurations {
ktlint
}
dependencies {
ktlint "com.github.shyiko:ktlint:0.31.0"
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args "**/*.kt"
}