@@ -5,32 +5,32 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:7.4.2 '
8
+ classpath ' com.android.tools.build:gradle:8.7.3 '
9
9
classpath ' org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0'
10
+ classpath " com.vanniktech:gradle-maven-publish-plugin:0.33.0"
10
11
}
11
12
}
12
13
13
14
apply plugin : ' com.android.library'
14
- apply plugin : ' maven-publish'
15
15
apply plugin : ' signing'
16
16
apply plugin : ' kotlin-android'
17
+ apply plugin : ' com.vanniktech.maven.publish'
17
18
apply from : ' spec.gradle'
18
19
apply from : ' jacoco.gradle'
19
20
20
-
21
21
ext {
22
22
splitVersion = ' 5.3.0'
23
23
jacocoVersion = ' 0.8.8'
24
24
}
25
25
26
26
// Define exclusions for JaCoCo coverage
27
27
def coverageExclusions = [
28
- ' **/R.class' ,
29
- ' **/R$*.class' ,
30
- ' **/BuildConfig.*' ,
31
- ' **/Manifest*.*' ,
32
- ' **/*Test*.*' ,
33
- ' android/**/*.*'
28
+ ' **/R.class' ,
29
+ ' **/R$*.class' ,
30
+ ' **/BuildConfig.*' ,
31
+ ' **/Manifest*.*' ,
32
+ ' **/*Test*.*' ,
33
+ ' android/**/*.*'
34
34
]
35
35
36
36
android {
@@ -76,7 +76,7 @@ android {
76
76
77
77
testOptions {
78
78
unitTests. returnDefaultValues = true
79
-
79
+
80
80
// Configure JaCoCo for all test tasks
81
81
unitTests. all {
82
82
jacoco {
@@ -114,17 +114,17 @@ android {
114
114
}
115
115
}
116
116
117
+ repositories {
118
+ google()
119
+ mavenCentral()
120
+ }
121
+
117
122
tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach {
118
123
kotlinOptions {
119
124
jvmTarget = " 1.8"
120
125
}
121
126
}
122
127
123
- repositories {
124
- google()
125
- mavenCentral()
126
- }
127
-
128
128
dependencies {
129
129
130
130
def roomVersion = ' 2.4.3'
@@ -195,7 +195,6 @@ dependencies {
195
195
196
196
def splitPOM = {
197
197
name = ' Split Android SDK'
198
- packaging = ' aar'
199
198
description = ' Official Split Android SDK'
200
199
url = ' https://github.com/splitio/android-client'
201
200
@@ -208,15 +207,8 @@ def splitPOM = {
208
207
209
208
developers {
210
209
developer {
211
- id = ' sarrubia'
212
- name = ' Sebastian Arrubia'
213
- email = ' sebastian@split.io'
214
- }
215
-
216
- developer {
217
- id = ' fernando'
218
- name = ' Fernando Martin'
219
- email = ' fernando@split.io'
210
+ id = ' sdks'
211
+ email = ' sdks@split.io'
220
212
}
221
213
}
222
214
@@ -227,59 +219,17 @@ def splitPOM = {
227
219
}
228
220
}
229
221
230
- def releaseRepo = {
231
- name = " ReleaseRepo"
232
- def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
233
- def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
234
- url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
235
- credentials {
236
- username = ossrhUsername
237
- password = ossrhPassword
238
- }
239
- }
240
-
241
- afterEvaluate {
242
- android. sourceSets. all { sourceSet ->
243
- if (! sourceSet. name. startsWith(" test" )) {
244
- sourceSet. kotlin. setSrcDirs([])
245
- }
246
- }
247
-
248
- publishing {
249
- publications {
250
- release(MavenPublication ) {
251
- from components. release
252
-
253
- artifactId = ' android-client'
254
- groupId = ' io.split.client'
255
- version = splitVersion
256
- artifact sourcesJar
257
- artifact javadocJar
258
-
259
- pom splitPOM
260
-
261
- repositories {
262
- maven releaseRepo
263
- }
264
- }
265
- }
266
- }
267
-
268
- task publishRelease(type : PublishToMavenRepository ) {
269
- publication = publishing. publications. getByName(" release" )
270
- repository = publishing.repositories.ReleaseRepo
271
- }
222
+ mavenPublishing {
223
+ coordinates(" io.split.client" , " android-client" , splitVersion)
224
+ pom(splitPOM)
272
225
273
- signing {
274
- sign publishing. publications. getByName(" release" )
275
- }
226
+ publishToMavenCentral(false )
227
+ signAllPublications()
276
228
}
277
229
278
-
279
230
task sourcesJar (type : Jar ) {
280
231
archiveClassifier. set(" sources" )
281
232
from android. sourceSets. main. java. srcDirs
282
- // archiveClassifier = "sources"
283
233
}
284
234
285
235
task javadoc (type : Javadoc ) {
@@ -337,4 +287,3 @@ tasks.withType(Test) {
337
287
338
288
339
289
340
-
0 commit comments