Skip to content

Commit 8e879e0

Browse files
committed
Fixed publication issues
1 parent 9393b8c commit 8e879e0

File tree

4 files changed

+47
-27
lines changed

4 files changed

+47
-27
lines changed

Diff for: build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ buildscript {
1414
dependencies {
1515
classpath deps.build.gradlePlugins.android
1616
classpath deps.build.gradlePlugins.kotlin
17-
classpath deps.build.gradlePlugins.mavenPublish
1817
classpath deps.build.gradlePlugins.detekt
1918
classpath deps.build.gradlePlugins.jacoco
2019
}

Diff for: gradle.properties

-11
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1414
org.gradle.caching=true
1515
org.gradle.parallel=true
1616

17-
GROUP=com.badoo.ribs
1817
VERSION_NAME=0.40.2
19-
POM_DESCRIPTION=Badoo RIBs is an evolution of Uber RIBs, with notable differences and additions
20-
POM_URL=https://github.com/badoo/RIBs/
21-
POM_SCM_URL=https://github.com/badoo/RIBs/
22-
POM_SCM_CONNECTION=scm:git:git://github.com/badoo/RIBs.git
23-
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/badoo/RIBs.git
24-
POM_LICENCE_NAME=The Apache Software License, Version 2.0
25-
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
26-
POM_LICENCE_DIST=repo
27-
POM_DEVELOPER_ID=badoo
28-
POM_DEVELOPER_NAME=Badoo Trading Limited
2918

3019
android.useAndroidX=true
3120
android.defaults.buildfeatures.buildconfig=true

Diff for: gradle/dependencies.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def build = [
6464
gradlePlugins : [
6565
android : agp,
6666
kotlin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
67-
mavenPublish: 'com.vanniktech:gradle-maven-publish-plugin:0.15.1',
6867
detekt : 'io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0',
6968
jacoco : "org.jacoco:org.jacoco.core:${versions.jacoco}"
7069
]

Diff for: gradle/gradle-mvn-push.gradle

+47-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
version = VERSION_NAME
2-
group = GROUP
3-
41
def getReleaseRepositoryUrl() {
52
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
63
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
@@ -11,22 +8,58 @@ def getSnapshotRepositoryUrl() {
118
: "https://oss.sonatype.org/content/repositories/snapshots/"
129
}
1310

14-
apply plugin: "com.vanniktech.maven.publish"
11+
apply plugin: "maven-publish"
1512

16-
publishing {
17-
repositories {
18-
maven {
19-
url = version.endsWith('SNAPSHOT') ? getSnapshotRepositoryUrl() : getReleaseRepositoryUrl()
13+
android {
14+
publishing {
15+
singleVariant("release") {
16+
withSourcesJar()
17+
withJavadocJar()
2018
}
2119
}
2220
}
2321

24-
mavenPublish {
25-
releaseSigningEnabled false
26-
}
22+
afterEvaluate {
23+
publishing {
24+
repositories {
25+
maven {
26+
url = version.endsWith('SNAPSHOT') ? getSnapshotRepositoryUrl() : getReleaseRepositoryUrl()
27+
}
28+
}
2729

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("[email protected]")
53+
}
54+
}
55+
scm {
56+
connection.set("scm:git:git://github.com/badoo/RIBs.git")
57+
developerConnection.set("scm:git:ssh://[email protected]/badoo/RIBs.git")
58+
url.set("https://github.com/badoo/RIBs/")
59+
}
60+
}
61+
}
62+
}
3163
}
3264
}
65+

0 commit comments

Comments
 (0)