-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
90 lines (76 loc) · 2.1 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
import io.gitlab.arturbosch.detekt.Detekt
buildscript {
ext {
kotlinVersion = '1.8.0'
jacocoVersion = '0.8.8'
detektVersion = '1.21.0'
}
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.7.10"
}
}
plugins {
id "io.gitlab.arturbosch.detekt" version "${detektVersion}"
id "nl.neotech.plugin.rootcoverage" version "1.5.3"
id "org.sonarqube" version "4.4.1.3373"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}
tasks.withType(Detekt).configureEach {
reports {
html.required.set(true)
xml.required.set(true)
txt.required.set(true)
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
// Update the version field when a new version is released
version = '5.0.2'
ext {
compileSdkVersion = 34
minSdkVersion = 21
kotlinCoroutinesVersion = '1.8.0'
wechatPayVersion = "6.8.0"
junitVersion = '4.13.2'
robolectricVersion = '4.12.2'
testCoreVersion = '1.5.0'
versionCode = System.getenv("AIRWALLEX_VERSION_CODE") as Integer ?: 1
versionName = version
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc).tap {
configureEach {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
}
}
}
}
subprojects {
configurations.configureEach {
resolutionStrategy {
eachDependency { details ->
if ('org.jacoco' == details.requested.group) {
details.useVersion "$jacocoVersion"
}
}
}
}
}
apply from: "${rootDir}/gradle/scripts/publish-root.gradle"
apply from: "${rootDir}/sonar.gradle"