1
- version = VERSION_NAME
2
- group = GROUP
3
-
4
1
def getReleaseRepositoryUrl () {
5
2
return hasProperty(' RELEASE_REPOSITORY_URL' ) ? RELEASE_REPOSITORY_URL
6
3
: " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
@@ -11,22 +8,58 @@ def getSnapshotRepositoryUrl() {
11
8
: " https://oss.sonatype.org/content/repositories/snapshots/"
12
9
}
13
10
14
- apply plugin : " com.vanniktech. maven. publish"
11
+ apply plugin : " maven- publish"
15
12
16
- publishing {
17
- repositories {
18
- maven {
19
- url = version. endsWith(' SNAPSHOT' ) ? getSnapshotRepositoryUrl() : getReleaseRepositoryUrl()
13
+ android {
14
+ publishing {
15
+ singleVariant(" release" ) {
16
+ withSourcesJar()
17
+ withJavadocJar()
20
18
}
21
19
}
22
20
}
23
21
24
- mavenPublish {
25
- releaseSigningEnabled false
26
- }
22
+ afterEvaluate {
23
+ publishing {
24
+ repositories {
25
+ maven {
26
+ url = version. endsWith(' SNAPSHOT' ) ? getSnapshotRepositoryUrl() : getReleaseRepositoryUrl()
27
+ }
28
+ }
27
29
28
- project. afterEvaluate {
29
- project. tasks. named(" androidSourcesJar" ). configure {
30
- from project. android. sourceSets. main. java. srcDirs
30
+ publications {
31
+ release(MavenPublication ) {
32
+ afterEvaluate {
33
+ from components. release
34
+ }
35
+ groupId = " com.badoo.ribs"
36
+ version = VERSION_NAME
37
+
38
+ pom {
39
+ name. set(" MVICore" )
40
+ description. set(" Badoo RIBs is an evolution of Uber RIBs, with notable differences and additions" )
41
+ url. set(" https://github.com/badoo/RIBs/" )
42
+ licenses {
43
+ license {
44
+ name. set(" The Apache Software License, Version 2.0" )
45
+ url. set(" https://www.apache.org/licenses/LICENSE-2.0.txt" )
46
+ }
47
+ }
48
+ developers {
49
+ developer {
50
+ id. set(" badoo" )
51
+ name. set(" Badoo Trading Limited" )
52
+ email. set(" mvicore@team.bumble.com" )
53
+ }
54
+ }
55
+ scm {
56
+ connection. set(" scm:git:git://github.com/badoo/RIBs.git" )
57
+ developerConnection. set(" scm:git:ssh://git@github.com/badoo/RIBs.git" )
58
+ url. set(" https://github.com/badoo/RIBs/" )
59
+ }
60
+ }
61
+ }
62
+ }
31
63
}
32
64
}
65
+
0 commit comments