This repository has been archived by the owner on Dec 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
85 lines (73 loc) · 3.03 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
project.ext {
kotlin_version = '1.2.41'
gradle_version = '3.1.1'
jacoco_version = '0.8.0'
sonarqube_version = '2.6.2'
fabric_version = '1.25.1'
gmss_version = '3.3.0'
firebase_version = '1.1.5'
sonarqube_url = hasProperty('SONARQUBE_URL') ? SONARQUBE_URL : System.getenv('SONARQUBE_URL')
}
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.fabric.tools:gradle:$fabric_version"
classpath "com.google.gms:google-services:$gmss_version"
classpath "com.google.firebase:firebase-plugins:$firebase_version"
classpath "org.jacoco:org.jacoco.core:$jacoco_version"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:$sonarqube_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
task printVersionName {
doLast {
println android.defaultConfig.versionName
}
}
apply plugin: "org.sonarqube"
sonarqube {
androidVariant 'debug'
def sonarqube_url = hasProperty('SONARQUBE_URL') ? SONARQUBE_URL : System.getenv('SONARQUBE_URL')
properties {
property "sonar.verbose", true
property "sonar.host.url", ${sonarqube_url}
property "sonar.issuesReport.html.enable", "true"
property "sonar.issuesReport.console.enable", "true"
property "detekt.sonar.kotlin.config.path", "detekt-config.yml"
property "sonar.sources", "app/src/main/java/**"
property "sonar.tests", "app/src/androidTest/java/**"
property "sonar.exclusions", "app/src/androidTest/java/**"
property "sonar.test.exclusions", "app/src/main/java/**"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.java.binaries", "${rootProject.projectDir}/target/classes," + "${buildDir}/intermediates/classes/debug," +
"${rootProject.projectDir}/app/build/tmp/kotlin-classes"
property 'sonar.jacoco.reportPaths', "${rootProject.projectDir}/app/build/jacoco/testDebugUnitTest.exec"
// property "sonar.login", "xxx"
// property "sonar.report.export.path", "${rootProject.projectDir}/sonar-report.json"
// property "sonar.test", "."
// property "sonar.source", "."
// property "sonar.test", "."
// property "sonar.cpd.exclusions", "app/src/main/java/**"
// property "sonar.coverage.exclusions", "xxx"
}
}