This repository has been archived by the owner on Jun 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
131 lines (114 loc) · 4.6 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
/*
* Copyright (C) 2016 XING AG (http://xing.com/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
buildscript {
repositories {
jcenter()
maven {
url 'https://plugins.gradle.org/m2/'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.9'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
project.ext {
/** Contains global constants shared with all modules. */
versions = [
androidCompileSdk: 28,
androidBuildTools: '28.0.3',
androidMinSdk : 21,
androidTargetSdk : 28,
androidx : '1.0.0',
okHttp : '4.7.2',
kotlin_version : '1.3.61',
moshiVersion : '1.9.2'
]
/** Used dependencies. */
libraries = [
// Android
supportAnnotations : "androidx.annotation:annotation:$versions.androidx",
supportV4 : "androidx.legacy:legacy-support-v4:$versions.androidx",
supportAppCompat : "androidx.appcompat:appcompat:$versions.androidx",
supportDesign : "com.google.android.material:material:1.2.0-alpha06",
supportCardView : "androidx.cardview:cardview:$versions.androidx",
supportRecyclerView : "androidx.recyclerview:recyclerview:$versions.androidx",
android : 'com.google.android:android:4.1.1.4',
kotlin : "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin_version",
// Ok stack
okhttp : "com.squareup.okhttp3:okhttp:$versions.okHttp",
okhttpLoggingInterceptor : "com.squareup.okhttp3:logging-interceptor:$versions.okHttp",
okio : 'com.squareup.okio:okio:2.6.0',
moshi : "com.squareup.moshi:moshi:$versions.moshiVersion",
moshiKotlinCodegen : "com.squareup.moshi:moshi-kotlin-codegen:$versions.moshiVersion",
moshiLazyAdapters : 'com.serjltt.moshi:moshi-lazy-adapters:2.2',
// Additional network libraries
singpost : 'oauth.signpost:signpost-core:1.2.1.2@jar',
glide : 'com.github.bumptech.glide:glide:3.6.0',
// ReactiveX
rxjava2 : 'io.reactivex.rxjava2:rxjava:2.2.19',
// Test
junit : 'junit:junit:4.12',
assertj : 'org.assertj:assertj-core:1.7.0',
mockito : 'org.mockito:mockito-core:2.28.2',
mockitoAndroid : 'org.mockito:mockito-android:2.28.2',
robolectric : 'org.robolectric:robolectric:4.3',
mockWebServer : "com.squareup.okhttp3:mockwebserver:$versions.okHttp",
commonsIo : 'commons-io:commons-io:2.4',
apacheCommons3 : 'org.apache.commons:commons-lang3:3.4'
]
}
}
subprojects { project ->
apply plugin: 'checkstyle'
checkstyle {
toolVersion '6.0'
}
task checkstyle(type: Checkstyle) {
group 'verification'
configFile rootProject.file('checkstyle.xml')
source = ['src']
ignoreFailures false
showViolations true
include '**/*.java'
exclude '**/R.java'
exclude '**/BuildConfig.java'
classpath = files()
configProperties = [
'proj.module.dir' : projectDir.absolutePath,
'checkstyle.cache.file': './build/cache/checkstyle-cache'
]
}
afterEvaluate {
if (project.tasks.findByName('check')) {
check.dependsOn('checkstyle')
}
}
apply plugin: 'idea'
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
}