Skip to content

Commit 0536dd5

Browse files
authored
publish fixes (#32)
1 parent 7d9756a commit 0536dd5

File tree

4 files changed

+7
-46
lines changed

4 files changed

+7
-46
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ jobs:
6464
run: ./gradlew assemble
6565

6666
- name: Publish to sonatype
67-
run: ./gradlew publishReleasePublicationToMavenRepository closeAndReleaseMavenStagingRepository -Dorg.gradle.parallel=false
67+
run: ./gradlew publishAllPublicationsToMavenRepository closeAndReleaseMavenStagingRepository -Dorg.gradle.parallel=false

android-prefixed/build.gradle

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,6 @@ dependencies {
3838

3939
def POM_ARTIFACT_ID = "android-prefixed"
4040

41-
def getReleaseRepositoryUrl() {
42-
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
43-
: "https://ossrh-staging-api.central.sonatype.com/service/local/"
44-
}
45-
46-
def getRepositoryUsername() {
47-
return hasProperty('nexusUsername') ? nexusUsername : ""
48-
}
49-
50-
def getRepositoryPassword() {
51-
return hasProperty('nexusPassword') ? nexusPassword : ""
52-
}
53-
5441
def configurePom(pom) {
5542
pom.name = POM_NAME
5643
pom.packaging = POM_PACKAGING
@@ -82,15 +69,6 @@ def configurePom(pom) {
8269
afterEvaluate {
8370

8471
publishing {
85-
repositories {
86-
maven {
87-
url getReleaseRepositoryUrl()
88-
credentials(PasswordCredentials) {
89-
username = getRepositoryUsername()
90-
password = getRepositoryPassword()
91-
}
92-
}
93-
}
9472
publications {
9573
androidPrefixed(MavenPublication) {
9674
// Applies the component for the release build variant.

android/build.gradle

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@ apply plugin: 'signing'
44
def POM_ARTIFACT_ID = "android"
55
def AAR_FILE = "libwebrtc.aar"
66

7-
def getReleaseRepositoryUrl() {
8-
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
9-
: "https://ossrh-staging-api.central.sonatype.com/service/local/"
10-
}
11-
12-
def getRepositoryUsername() {
13-
return hasProperty('nexusUsername') ? nexusUsername : ""
14-
}
15-
16-
def getRepositoryPassword() {
17-
return hasProperty('nexusPassword') ? nexusPassword : ""
18-
}
19-
207
def configurePom(pom) {
218
pom.name = POM_NAME
229
pom.packaging = POM_PACKAGING
@@ -48,15 +35,6 @@ def configurePom(pom) {
4835
afterEvaluate {
4936

5037
publishing {
51-
repositories {
52-
maven {
53-
url getReleaseRepositoryUrl()
54-
credentials(PasswordCredentials) {
55-
username = getRepositoryUsername()
56-
password = getRepositoryPassword()
57-
}
58-
}
59-
}
6038
publications {
6139
android(MavenPublication) {
6240
groupId = GROUP

build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ plugins {
1717
group = GROUP
1818
version = VERSION_NAME
1919

20+
def getReleaseRepositoryUrl() {
21+
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
22+
: "https://ossrh-staging-api.central.sonatype.com/service/local/"
23+
}
24+
2025
def getRepositoryUsername() {
2126
return hasProperty('nexusUsername') ? nexusUsername : ""
2227
}
@@ -29,7 +34,7 @@ nexusPublishing {
2934
packageGroup = GROUP
3035
repositories {
3136
maven {
32-
nexusUrl.set(uri(RELEASE_REPOSITORY_URL))
37+
nexusUrl.set(uri(getReleaseRepositoryUrl()))
3338
username = getRepositoryUsername()
3439
password = getRepositoryPassword()
3540
stagingProfileId = STAGING_PROFILE_ID

0 commit comments

Comments
 (0)