-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathbuild.gradle
122 lines (108 loc) · 4 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
110
111
112
113
114
115
116
117
118
119
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.5.21'
repositories {
google()
mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath 'me.tatarka:gradle-retrolambda:3.7.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// allows to set BuildConfig fields during compilation
// without breaking incremental compilation
classpath "hu.supercluster:paperwork-plugin:1.2.7"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jacoco:org.jacoco.core:0.8.8"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
}
}
plugins {
id "org.jlleitschuh.gradle.ktlint" version "9.2.1"
id "org.sonarqube" version "3.3"
}
sonarqube {
properties {
def branch = System.getenv("BITRISE_GIT_BRANCH")
def targetBranch = System.getenv("BITRISEIO_GIT_BRANCH_DEST")
def pullRequestId = System.getenv("BITRISE_PULL_REQUEST")
property "sonar.projectKey", "dhis2_dhis2-android-capture-app"
property "sonar.organization", "dhis2"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.projectName", "android capture app"
if (pullRequestId == null) {
property "sonar.branch.name", branch
property "sonar.branch.target", targetBranch
} else {
property "sonar.pullrequest.base", targetBranch
property "sonar.pullrequest.branch", branch
property "sonar.pullrequest.key", pullRequestId
}
}
}
apply from: 'buildsystem/dependencies.gradle'
allprojects {
configurations.all {
resolutionStrategy {
eachDependency { details ->
if ('org.jacoco' == details.requested.group) {
details.useVersion "0.8.8"
}
}
}
}
apply plugin: 'jacoco'
repositories {
google()
jcenter() {
content {
includeModule('de.adorsys.android', 'securestoragelibrary')
includeModule('com.andrognito.pinlockview', 'pinlockview')
includeModule('me.toptas.fancyshowcase', 'fancyshowcaseview')
includeModule('org.matomo.sdk', 'tracker')
includeModule('com.journeyapps', 'zxing-android-embedded')
includeGroup('co.infinum')
}
}
mavenCentral()
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
def mapboxDownloadsToken = System.getenv("MAPBOX_DOWNLOADS_TOKEN") != null ? System.getenv("MAPBOX_DOWNLOADS_TOKEN") : project.properties['MAPBOX_DOWNLOADS_TOKEN']
credentials {
// This should always be `mapbox` (not your username).
username = 'mapbox'
password = mapboxDownloadsToken
}
}
}
apply plugin: "org.jlleitschuh.gradle.ktlint"
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "1000"
}
}
ktlint {
debug = true
verbose = true
android = true
outputToConsole = true
enableExperimentalRules = true
filter {
exclude { element -> element.file.path.contains("androidTest") }
exclude { element -> element.file.path.contains("dhis2-android-sdk") }
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}