Skip to content

Commit eb23d67

Browse files
committed
Fix publishing to Nexus
1 parent e5f17e4 commit eb23d67

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
install: true
4242
script:
4343
- openssl aes-256-cbc -K $encrypted_8e5c960335c9_key -iv $encrypted_8e5c960335c9_iv -in secring.gpg.enc -out secring.gpg -d
44-
- ./gradlew publish closeAndReleaseRepository
44+
- ./gradlew --info publish closeAndReleaseRepository

build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import com.github.benmanes.gradle.versions.VersionsPlugin
2+
import de.marcphilipp.gradle.nexus.NexusPublishExtension
23
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
34
import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
5+
import java.time.Duration
46

57
val ossrhUsername: String? = System.getenv("OSSRH_USERNAME")
68
val ossrhPassword: String? = System.getenv("OSSRH_PASSWORD")
@@ -98,6 +100,15 @@ subprojects {
98100
archiveClassifier.set("sources")
99101
}
100102

103+
configure<NexusPublishExtension> {
104+
// We're constantly getting socket timeouts on Travis
105+
clientTimeout.set(Duration.ofMinutes(3))
106+
107+
repositories {
108+
sonatype()
109+
}
110+
}
111+
101112
configure<PublishingExtension> {
102113
publications {
103114
create<MavenPublication>(project.name) {
@@ -171,6 +182,7 @@ tasks.releaseRepository.configure {
171182

172183
nexusStaging {
173184
packageGroup = "ru.bozaro"
185+
stagingProfileId = "365bc6dc8b7aa3"
174186
username = ossrhUsername
175187
password = ossrhPassword
176188
}

0 commit comments

Comments
 (0)