Skip to content

Commit e6e4f49

Browse files
committed
Get publishing to maven central working again
1 parent 1706614 commit e6e4f49

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ rstaui_*.zip
33
.gradle
44
build
55
out/
6+
.vscode/
7+

RSTAUI/build.gradle

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ base {
99
}
1010

1111
dependencies {
12-
api 'com.fifesoft:rsyntaxtextarea:3.5.4'
13-
api 'com.fifesoft:autocomplete:3.3.2'
12+
api 'com.fifesoft:rsyntaxtextarea:3.6.1'
13+
api 'com.fifesoft:autocomplete:3.3.3'
1414
testImplementation platform('org.junit:junit-bom:5.12.1')
1515
testImplementation 'org.junit.jupiter:junit-jupiter'
1616
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
@@ -44,18 +44,6 @@ jar {
4444
}
4545

4646
publishing {
47-
repositories {
48-
maven {
49-
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
50-
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
51-
url = isReleaseVersion ? releasesRepoUrl : snapshotsRepoUrl
52-
credentials { // Credentials usually kept in user's .gradle/gradle.properties
53-
// We must defensively check for these properties so Travis CI build works
54-
username = project.hasProperty('ossrhUsername') ? ossrhUsername : 'unknown'
55-
password = project.hasProperty('ossrhPassword') ? ossrhPassword : 'unknown'
56-
}
57-
}
58-
}
5947
publications {
6048
maven(MavenPublication) {
6149

build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id 'com.github.spotbugs' version '6.1.7'
3+
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
34
}
45

56
// We require building with JDK 17 or later. Built artifact compatibility
@@ -75,3 +76,15 @@ subprojects {
7576
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
7677
}
7778
}
79+
80+
nexusPublishing {
81+
repositories {
82+
sonatype {
83+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
84+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
85+
// We must defensively check for these properties so CI builds work
86+
username.set(project.hasProperty('sonatypeUsername') ? sonatypeUsername : 'unknown')
87+
password.set(project.hasProperty('sonatypePassword') ? sonatypePassword : 'unknown')
88+
}
89+
}
90+
}

settings.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
}
5+
}
6+
17
rootProject.name = 'RSTAUI'
28

39
include 'RSTAUI', 'RSTAUIDemo'

0 commit comments

Comments
 (0)