-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
227 lines (204 loc) · 7.07 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.6.21'
ext.multidex_version = "2.0.1"
ext.legacy_v4_version = "1.0.0"
ext.app_compat_version = "1.1.0"
ext.material_version = "1.2.0-alpha06"
ext.vector_drawable_version = "1.0.0"
ext.constraint_layout_version = '1.1.3'
ext.recycler_view_version = "1.1.0"
ext.card_view_version = "1.0.0"
ext.browser_version = "1.2.0"
ext.exif_version = "1.2.0"
ext.media_version = "1.1.0"
ext.arch_version = "2.2.0"
ext.arch_worker_version = "2.7.1"
ext.lifecycle_version = "2.2.0"
ext.rx_java_version = '2.2.15'
ext.rx_android_version = '2.1.1'
ext.glide_version = '4.11.0'
ext.gson_version = '2.8.6'
ext.facebook_version = '5.11.2'
ext.espresso_version = "3.4.0"
ext.uiautomator_version = "2.2.0"
ext.orchestrator_version = "1.2.0"
ext.androidX_test_version = "1.4.0"
ext.target_version = 34
ext.min_version = 18
def version = System.getenv("VERSION")
def code = System.getenv("VERSION_CODE")
def artifactory_user = project.hasProperty('lovoo.repo.username') ? project.property('lovoo.repo.username') : System.getenv("ARTIFACTORY_USER")
def artifactory_pwd = project.hasProperty('lovoo.repo.password') ? project.property('lovoo.repo.password') : System.getenv("ARTIFACTORY_PWD")
ext.version_name = version == null ? "1.7.0-SNAPSHOT" : version
ext.version_code = code == null ? 10 : code.toInteger()
ext.repository_name = version_name.endsWith("-SNAPSHOT") ? "libs-snapshot" : "libs-release"
ext.artifactory_user = artifactory_user
ext.artifactory_pwd = artifactory_pwd
repositories {
google()
jcenter()
maven {
url 'https://lovoo.jfrog.io/artifactory/libs-snapshot'
credentials {
username artifactory_user
password artifactory_pwd
}
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.9.18'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.22.0'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.21.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'
setGroup('com.github.lovoo.android.pickpic')
setVersion(version_name)
repositories {
google()
jcenter()
maven {
url 'https://lovoo.jfrog.io/artifactory/libs-snapshot'
credentials {
username artifactory_user
password artifactory_pwd
}
content {
includeGroupByRegex "com\\.github\\.lovoo\\.android\\.pick.*"
}
}
}
tasks.withType(Javadoc).all {
enabled = false
}
}
gradle.projectsEvaluated {
subprojects {
preBuild.dependsOn spotlessApply
}
}
project('pickcore') {
apply from: '../documentation.gradle'
artifactoryPublish.dependsOn('build')
publishing {
publications {
aar(MavenPublication) {
groupId = group
artifactId = project.getName()
version = version_name
// Tell maven to prepare the generated "*.aar" file for publishing
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
artifactoryPublish {
publications(publishing.publications.aar)
}
}
project('pickui') {
apply from: '../documentation.gradle'
artifactoryPublish.dependsOn('build')
publishing {
publications {
aar(MavenPublication) {
groupId = group
artifactId = project.getName()
version = version_name
// Tell maven to prepare the generated "*.aar" file for publishing
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
artifactoryPublish {
publications(publishing.publications.aar)
}
}
project('pickcam') {
apply from: '../documentation.gradle'
artifactoryPublish.dependsOn('build')
publishing {
publications {
aar(MavenPublication) {
groupId = group
artifactId = project.getName()
version = version_name
// Tell maven to prepare the generated "*.aar" file for publishing
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
artifactoryPublish {
publications(publishing.publications.aar)
}
}
project('pickfacebook') {
apply from: '../documentation.gradle'
artifactoryPublish.dependsOn('build')
publishing {
publications {
aar(MavenPublication) {
groupId = group
artifactId = project.getName()
version = version_name
// Tell maven to prepare the generated "*.aar" file for publishing
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
artifactoryPublish {
publications(publishing.publications.aar)
}
}
project('pickapp') {
apply from: '../documentation.gradle'
artifactoryPublish.dependsOn('build')
publishing {
publications {
aar(MavenPublication) {
groupId = group
artifactId = project.getName()
version = version_name
// Tell maven to prepare the generated "*.aar" file for publishing
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
artifactoryPublish {
publications(publishing.publications.aar)
}
}
artifactory {
clientConfig.setIncludeEnvVars(false)
contextUrl = 'https://lovoo.jfrog.io/artifactory'
publish {
repository {
repoKey = ext.repository_name // The Artifactory repository key to publish to
username = ext.artifactory_user
password = ext.artifactory_pwd
maven = true
}
defaults {
// Reference to Gradle publications defined in the build script.
// This is how we tell the Artifactory Plugin which artifacts should be
// published to Artifactory.
publishArtifacts = true
publishPom = true // Publish generated POM files to Artifactory (true by default)
publishIvy = false //Publish generated Ivy descriptor files to Artifactory (true by default).
}
}
resolve {
repository {
repoKey = ext.repository_name // The Artifactory repository key to publish to
username = ext.artifactory_user
password = ext.artifactory_pwd
maven = true
}
}
}