-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
70 lines (60 loc) · 2.29 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
def getVersionCode = {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim().toInteger()
}
def getVersionName = {
return new Date().format('yy.MM.dd')
}
ext.kotlin_version = '1.9.22'
ext.hilt_version = '2.48.1'
ext.cucumber_version = '4.4.+'
ext.version_name = getVersionName()
ext.version_code = getVersionCode()
repositories {
google()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373"
classpath "com.hiya:jacoco-android:0.2"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.6"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: "org.sonarqube"
//sonar configuration
sonarqube {
properties {
property "sonar.organization", "mercuriete-github"
property "sonar.projectKey", "android-musician-tools"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.projectVersion", project.version_name
property "sonar.sourceEncoding", "UTF-8"
property "sonar.coverage.jacoco.xmlReportPaths", getRootDir().toString() + "/app/build/jacoco/jacoco.xml"
property "sonar.junit.reportsPath", getRootDir().toString() + "/app/build/test-results/testDebugUnitTest/"
property "sonar.androidLint.reportPaths", getRootDir().toString() + "/app/build/reports/lint-results-debug.xml"
property "sonar.kotlin.detekt.reportPaths", getRootDir().toString() + "/app/build/reports/detekt/debug.xml"
}
}