-
Notifications
You must be signed in to change notification settings - Fork 99
/
build.gradle.kts
76 lines (68 loc) · 2.06 KB
/
build.gradle.kts
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
val kotlinVersion = findProperty("version.org.jetbrains.kotlin") as String
val agpVersion = findProperty("version.com.android.tools.build..gradle") as String
classpath("com.android.tools.build:gradle:$agpVersion")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("com.google.gms:google-services:4.2.0")
// 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.1.1"
}
allprojects {
repositories {
google()
jcenter()
}
}
tasks.register("hello") {
group = "custom"
description = "Hello World task - useful to solve build problems"
}
tasks.register("install") {
group = "custom"
description = "Build and install the app"
dependsOn(":app:installDebug")
}
tasks.register("test") {
group = "custom"
description = "Run the unit tests"
dependsOn(":app:testDebugUnitTest")
}
tasks.register("androidTest") {
group = "custom"
description = "Run android instrumentation tests"
dependsOn(":app:connectedDebugAndroidTest")
}
detekt {
input = files("$projectDir/app/src/main/java")
config = files("$projectDir/config/detekt/detekt.yml")
reports {
xml {
enabled = true
destination = file("$projectDir/reports/detekt.xml")
}
html {
enabled = true
destination = file("$projectDir/reports/detekt.html")
}
}
parallel = true
}
tasks.named<Wrapper>("wrapper") {
distributionType = Wrapper.DistributionType.ALL
}
tasks.register("runOnGitHub") {
// Documentation: https://guides.gradle.org/writing-gradle-tasks/
dependsOn(":app:testDebugUnitTest")
group = "custom"
description = "$ ./gradlew runOnGitHub # runs on GitHub Action"
}