-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathbuild.gradle
More file actions
103 lines (93 loc) · 3.16 KB
/
build.gradle
File metadata and controls
103 lines (93 loc) · 3.16 KB
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
buildscript {
ext.kotlin_version = '1.9.0'
ext.gradle_version = '8.1.4'
repositories {
mavenCentral()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20"
}
}
plugins {
id "org.sonarqube" version "3.5.0.2730"
id "org.jlleitschuh.gradle.ktlint" version "13.0.0"
}
sonarqube {
properties {
property "sonar.projectKey", "mParticle_mparticle-android-sdk"
property "sonar.organization", "mparticle"
property "sonar.host.url", "https://sonarcloud.io"
}
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
throw new GradleException(
"Module '${project.name}' is missing an explicit namespace declaration. " +
"Please add 'namespace' to the android {} block in ${project.buildFile.name}"
)
}
}
}
}
apply plugin: 'org.sonarqube'
sonarqube {
androidVariant "release"
}
apply plugin: 'org.jlleitschuh.gradle.ktlint'
// Kits include their own `.editorconfig` files (some with `root = true`) which can
// prevent the repository `.editorconfig` from being applied. To keep lint behavior
// consistent without modifying kit repos, we override the relevant ktlint rules here.
if (project.projectDir.toString().startsWith("${rootProject.projectDir}/kits/")) {
project.plugins.withId("org.jlleitschuh.gradle.ktlint") {
project.ktlint {
additionalEditorconfig = [
"ktlint_standard_indent": "disabled",
"ktlint_standard_trailing-comma-on-call-site": "disabled",
"ktlint_standard_trailing-comma-on-declaration-site": "disabled",
"ktlint_standard_no-consecutive-blank-lines": "disabled",
]
}
}
}
}
allprojects {
group = 'com.mparticle'
version = '5.78.5-SNAPSHOT'
if (project.hasProperty('isRelease') && project.isRelease) {
version = version.toString().replace("-SNAPSHOT", "")
}
repositories {
mavenLocal()
google()
mavenCentral()
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
apply plugin: 'org.jlleitschuh.gradle.ktlint'
// Apply shared signing configuration to all Android projects
afterEvaluate { project ->
if (project.hasProperty('android')) {
android {
signingConfigs {
debug {
storeFile file("${rootProject.projectDir}/debug.keystore")
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
}
}
}
}
}