-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
62 lines (52 loc) · 1.86 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compose_version = '1.4.7'
kotlin_version = '1.8.21'
}
repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
classpath 'org.jacoco:org.jacoco.core:0.8.10'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.22.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
task installGitHooks(type: Copy, group: "development") {
def sourceFolder = "${rootProject.projectDir}/bin/githooks"
def destFolder = "${rootProject.projectDir}/.git/hooks"
description = "install git hooks"
from(sourceFolder) {
include '*'
}
into destFolder
eachFile { file ->
println "${sourceFolder}/${file.relativeSourcePath} -> ${destFolder}/${file.path}"
}
}
task emptyMediaStore(type: Exec) {
commandLine 'adb', 'shell', 'content delete --uri content://media/external/images/media --where "1"'
}
def gitHubAction() {
/*
when running in a GitHub Action...
./gradlew --no-configuration-cache -PgitHubAction :app:connectedFdroidDebugAndroidTest
*/
def value = project.getProperties().get("gitHubAction") != null ? "true": "false"
println 'gitHubAction=' + value
return value
}