forked from square/picasso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
132 lines (117 loc) · 3.61 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
buildscript {
ext.versions = [
'compileSdk': 31,
'minSdk': 21,
'targetSdk': 31,
'sourceCompatibility': JavaVersion.VERSION_1_8,
'targetCompatibility': JavaVersion.VERSION_1_8,
'kotlin': '1.5.21',
'okhttp': '4.9.3',
'okio': '3.0.0',
]
ext.deps = [
androidPlugin: 'com.android.tools.build:gradle:7.0.4',
kotlinPlugin: "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
okhttp: "com.squareup.okhttp3:okhttp:${versions.okhttp}",
okio: "com.squareup.okio:okio:${versions.okio}",
mockWebServer: "com.squareup.okhttp3:mockwebserver:${versions.okhttp}",
pollexor: 'com.squareup:pollexor:3.0.0',
androidxAnnotations: 'androidx.annotation:annotation:1.3.0',
androidxCore: 'androidx.core:core:1.6.0',
androidxCursorAdapter: 'androidx.cursoradapter:cursoradapter:1.0.0',
androidxExifInterface: 'androidx.exifinterface:exifinterface:1.3.3',
androidxFragment: 'androidx.fragment:fragment:1.4.0',
androidxLifecycle: 'androidx.lifecycle:lifecycle-common:2.4.0',
androidxStartup: 'androidx.startup:startup-runtime:1.1.0',
junit: 'junit:junit:4.13.2',
truth: 'com.google.truth:truth:1.1.3',
robolectric: 'org.robolectric:robolectric:4.6.1',
mockito: 'org.mockito:mockito-core:3.0.0',
]
ext.isCi = "true" == System.getenv('CI')
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
classpath deps.androidPlugin
classpath deps.kotlinPlugin
classpath 'com.github.ben-manes:gradle-versions-plugin:0.40.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0'
classpath 'org.jetbrains.kotlinx:binary-compatibility-validator:0.8.0'
}
}
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'binary-compatibility-validator'
apiValidation {
ignoredProjects += ['picasso-sample']
}
subprojects {
repositories {
mavenCentral()
google()
}
tasks.withType(Test) {
testLogging {
events "failed"
exceptionFormat "full"
showExceptions true
showStackTraces true
showCauses true
}
}
plugins.withId('com.vanniktech.maven.publish') {
mavenPublish {
sonatypeHost = 'S01'
}
publishing {
repositories {
/**
* Want to push to an internal repository for testing?
* Set the following properties in ~/.gradle/gradle.properties.
*
* internalUrl=YOUR_INTERNAL_URL
* internalUsername=YOUR_USERNAME
* internalPassword=YOUR_PASSWORD
*/
maven {
name = "internal"
url = providers.gradleProperty("internalUrl").forUseAtConfigurationTime()
credentials(PasswordCredentials)
}
}
}
}
apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
target('**/*.kt')
licenseHeaderFile(rootProject.file('gradle/license-header.txt'))
// Spotless doesn't read .editorconfig yet: https://github.com/diffplug/spotless/issues/142
ktlint('0.41.0').userData([
'insert_final_newline': 'true',
'end_of_line': 'lf',
'charset': 'utf-8',
'indent_size': '2',
])
}
}
group = GROUP
version = VERSION_NAME
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}
configurations {
osstrich
}
dependencies {
osstrich 'com.squareup.osstrich:osstrich:1.4.0'
}
tasks.register('deployJavadoc', JavaExec) {
classpath = configurations.osstrich
main = 'com.squareup.osstrich.JavadocPublisher'
args "$buildDir/osstrich", '[email protected]:square/picasso.git', 'com.squareup.picasso'
}