forked from urbanairship/android-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
155 lines (129 loc) · 4.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
buildscript {
ext {
// Airship Version - major.minor.patch
airshipVersion = '16.7.3'
// Airship Version Qualifier beta, release, etc...
// airshipVersionQualifier = "beta"
// Android SDK Versions
compileSdkVersion = 31
targetSdkVersion = 31
minSdkVersion = 21
// Sample override
sampleCompileSdkVersion = 33
sampleTargetSdkVersion = 33
// Gradle plugins
gradlePluginVersion = '7.2.1'
googleServicesPluginVersion = '4.3.10'
spotlessPluginVersion = '6.4.2'
// Spotless plugins
ktlintVersion = '0.41.0'
// Dependencies
// Kotlin
kotlinVersion = '1.5.31'
kotlinCoroutinesVersion = '1.5.2'
// Androidx
androidxCoreVersion = '1.7.0'
androidxFragmentVersion = '1.4.1'
androidxAnnotationVersion = '1.3.0'
androidxCustomViewVersion = '1.1.0'
androidxAppCompatVersion = '1.4.1'
androidxPreferenceVersion = '1.1.1'
androidxVectorDrawableVersion = '1.1.0'
androidxRoomVersion = '2.4.2'
androidxConstraintLayoutVersion = '2.1.3'
androidxPagingVersion = '2.1.2'
androidxLifeCycleVersion = '2.4.1'
androidxNavigationVersion = '2.4.2'
androidxSwipeRefreshLayoutVersion = '1.1.0'
androidXWork = '2.7.1'
androidXConcurrentFutures = '1.1.0'
androidXStartup = '1.1.1'
androidxRecyclerViewVersion = "1.2.0"
// Material design
materialVersion = '1.5.0'
// Google Play Services
playServicesAdsIdentifierVersion = '18.0.1'
playServicesLocationVersion = '19.0.1'
playServicesBaseVersion = '18.0.1'
// Firebase
firebaseMessagingVersion = '23.0.3'
// OkHttp (for WebSocket support in airship-chat)
okHttpVersion = '4.9.3'
// Test
androidxTestTruthVersion = '1.4.0'
androidxTestRunnerVersion = '1.4.0'
androidxTestRulesVersion = '1.4.0'
androidxTestCoreVersion = '1.4.0'
androidxTestJunitVersion = '1.1.3'
androidxEspressoVersion = '3.4.0'
kotlinxCorutinesTest = '1.5.2'
googleTruthVersion = '1.1.3'
junitVersion = '4.13.2'
mockitoVersion = '4.5.0'
mockitoKotlinVersion = '4.0.0'
robolectricVersion = '4.8.2'
turbineVersion = '0.7.0'
// Doc Dependencies
doclavaVersion = '1.0.6'
dokkaVersion = '1.4.32'
}
dependencies {
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
classpath "com.google.gms:google-services:$googleServicesPluginVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
}
}
plugins {
id 'airship-doclava'
id 'airship-dokka'
id 'airship-publish'
id 'com.diffplug.spotless' version "$spotlessPluginVersion"
}
task packageDocs() {
dependsOn(packageJavadoc, packageKDoc)
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Generate Javadoc and KDoc archives for release"
}
task getVersion() {
doLast {
def version = airshipVersion
if (project.hasProperty("airshipVersionQualifier")) {
version += "-" + airshipVersionQualifier
}
println version
}
}
spotless {
java {
target '**/*.java'
targetExclude '.idea/**'
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
def ktlintUserData = [
'android': 'true',
'max_line_length': 'off',
// Match Android Kotlin style guide import order.
// https://developer.android.com/kotlin/style-guide
'kotlin_imports_layout': 'ascii',
// Disable 'indent' to avoid overly aggressive wrapping of function parameters.
'disabled_rules': 'indent'
]
kotlin {
target '**/*.kt'
targetExclude '.idea/**', 'buildSrc/**'
ktlint(ktlintVersion).userData(ktlintUserData)
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
kotlinGradle {
target 'buildSrc/**/*.kts', 'buildSrc/**/*.kt'
targetExclude 'buildSrc/build/**'
ktlint(ktlintVersion).userData(ktlintUserData)
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}