-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathbuild.gradle
95 lines (82 loc) · 2.67 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.jacocoVersion = '0.8.7'
ext.versions = [
'kotlin' : '1.7.22',
'coroutines' : '1.4.2',
'pusher' : '2.2.1',
'robolectric' : '4.9.2',
'mockito' : '3.8.0',
'mockito_kotlin': '2.2.0',
'junit_ext' : '1.1.2',
]
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath 'org.robolectric:robolectric-gradle-plugin:1.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id "org.sonarqube" version "3.5.0.2730"
}
sonarqube {
properties {
property "sonar.projectKey", "PaystackHQ_paystack-android"
property "sonar.organization", "paystackhq"
property "sonar.host.url", "https://sonarcloud.io"
property 'sonar.core.codeCoveragePlugin', 'jacoco'
property "sonar.coverage.jacoco.xmlReportPaths", "${project.projectDir}/paystack/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
property("sonar.sources", "src/main")
property("sonar.tests", "src/test")
}
}
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
configurations.all {
resolutionStrategy {
force 'org.objenesis:objenesis:2.6'
eachDependency { details ->
if (details.requested.group == 'org.jacoco') {
details.useVersion jacocoVersion
}
}
}
}
}
ext {
compileSdkVersion = 29
minSdkVersion = 16
targetSdkVersion = 29
versionCode = 23
buildToolsVersion = "29.0.2"
versionName = "3.3.2"
}
Object getEnvOrDefault(String propertyName, Object defaultValue) {
// Check 'local.properties' first
String propertyValue
def propFile = file('local.properties')
if (propFile.exists()) {
Properties localProps = new Properties()
localProps.load(propFile.newDataInputStream())
propertyValue = localProps.getProperty(propertyName)
if (propertyValue != null) {
return propertyValue
}
}
propertyValue = project.properties[propertyName]
if (propertyValue == null) {
logger.error("Build property named {} not defined. Falling back to default value.", propertyName)
return defaultValue
}
return propertyValue
}