Skip to content

Commit e6009a1

Browse files
Sonatype release (#149)
* Added call to close and release repository. Fixes #148 * Swap over to different publishing plugin. * Missed plugin during the swap. * Added path to download the plugin. * Corrected the plugin. * Comment out maven-publish * Comment out repositories. * Missed a bracket. * Change runtime to match. * Missed the } again. * Set the staging id. * Correcting syntax error. * Corrected Syntax error. * Comment out SwimRuntimePublish * Disable testing for now. * Disable SwimRuntimePublis on swim.actor. * Disable include of SwimRuntimePublish in the project build.gradle files. * Disable include of SwimRuntimePublish in the project build.gradle files. * Disable include of SwimRuntimePublish in the project build.gradle files. * Disable include of SwimRuntimePublish in the project build.gradle files. * Enable tests and restrict release to main and numbered branches. * Write out the date for a snapshot. * Append the git commit to the pom. * Corrected the environment. * Add the git commit. * Set the environment. * Comment out the staging profile * hard set the url. * hard set the url. * Move to run out of the swim-runtime directory. * Reenable SwimPublish on all sub modules Move the nexus tasks to the top-level build.gradle- attempt to bypass the issue with the plugin not supporting modular projects * Only build on the proper branches. Enable testing. --------- Co-authored-by: ajay-gov <[email protected]>
1 parent 50d1904 commit e6009a1

File tree

64 files changed

+136
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+136
-112
lines changed

Jenkinsfile

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pipeline {
166166
steps {
167167
container('java') {
168168
dir('swim-java') {
169-
sh "./gradlew build||true" //TODO: Fix this! Intermittent tests must pass.
169+
sh "./gradlew build || true" //TODO: Fix this! Intermittent tests must pass.
170170
}
171171
}
172172
}
@@ -178,22 +178,33 @@ pipeline {
178178
}
179179

180180
stage('release-java') {
181-
// when {
182-
// anyOf {
183-
// branch 'main';
184-
// branch pattern: "^\\d+.\\d+.\\d+", comparator: "REGEXP"
185-
// }
186-
// }
181+
when {
182+
anyOf {
183+
branch 'main';
184+
branch pattern: "^\\d+.\\d+.\\d+", comparator: "REGEXP"
185+
}
186+
}
187187
environment {
188188
ORG_GRADLE_PROJECT_signingKey = credentials("jenkins-gpg-key")
189189
ORG_GRADLE_PROJECT_signingPassword = credentials("jenkins-gpg-key-password")
190+
ORG_GRADLE_PROJECT_gitCommit="${env.GIT_COMMIT}"
190191
}
191192
steps {
192193
container('java') {
193-
withCredentials([usernamePassword(credentialsId: 'sonatype-swim', passwordVariable: 'password', usernameVariable: 'username')]) {
194-
withEnv(["ORG_GRADLE_PROJECT_swimUsername=${username}", "ORG_GRADLE_PROJECT_swimPassword=${password}"]) {
194+
withCredentials([
195+
usernamePassword(credentialsId: 'sonatype-swim', passwordVariable: 'password', usernameVariable: 'username'),
196+
string(credentialsId: 'sonatype-swim-repository', variable: 'stagingProfileId')
197+
]) {
198+
withEnv([
199+
"ORG_GRADLE_PROJECT_swimUsername=${username}",
200+
"ORG_GRADLE_PROJECT_swimPassword=${password}",
201+
"ORG_GRADLE_PROJECT_swimStagingProfileId=${stagingProfileId}",
202+
]) {
195203
dir('swim-java') {
196-
sh "./gradlew publish"
204+
sh "date"
205+
sh "./gradlew publishToSonatype"
206+
sh "./gradlew findSonatypeStagingRepository closeSonatypeStagingRepository"
207+
sh "./gradlew findSonatypeStagingRepository releaseSonatypeStagingRepository"
197208
}
198209
}
199210
}
@@ -231,4 +242,5 @@ pipeline {
231242
}
232243

233244
}
234-
}
245+
}
246+

swim-java/build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
buildscript {
2+
dependencies {
3+
classpath("io.github.gradle-nexus:publish-plugin:2.0.0-rc-1")
4+
}
5+
}
6+
17
plugins {
28
id 'SwimOSFramework'
39
id 'SwimOSPublish'
10+
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
411
}
512

613
description = 'SwimOS'
@@ -125,3 +132,19 @@ def localizeDependencies(subproject) {
125132
}
126133
}
127134
}
135+
136+
if (project.hasProperty('swimUsername') &&
137+
project.hasProperty('swimPassword') &&
138+
project.hasProperty('swimStagingProfileId')) {
139+
nexusPublishing {
140+
repositories {
141+
sonatype {
142+
username = swimUsername
143+
password = swimPassword
144+
nexusUrl = uri("https://oss.sonatype.org/service/local/")
145+
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
146+
// stagingProfileId = swimStagingProfileId
147+
}
148+
}
149+
}
150+
}

swim-java/buildSrc/src/main/groovy/SwimOSPublish.gradle

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ publishing {
1717
name = project.name
1818
description = project.description
1919
url = project.homepage
20+
if(project.hasProperty('gitCommit')) {
21+
properties = [
22+
"git.commit": gitCommit
23+
]
24+
}
2025
licenses {
2126
license {
2227
name = 'The Apache Software License, Version 2.0'
@@ -39,36 +44,15 @@ publishing {
3944
}
4045
}
4146
}
42-
43-
repositories {
44-
if (project.hasProperty('swimUsername') && project.hasProperty('swimPassword')) {
45-
maven {
46-
def releasesRepositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
47-
def snapshotsRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
48-
name = 'Sonatype'
49-
url = isReleaseVersion ? releasesRepositoryUrl : snapshotsRepositoryUrl
50-
credentials {
51-
username swimUsername
52-
password swimPassword
53-
}
54-
}
55-
}
56-
//if (project.hasProperty('githubUsername') && project.hasProperty('githubPassword')) {
57-
// maven {
58-
// name = 'GitHub'
59-
// url = 'https://maven.pkg.github.com/swimos/swim'
60-
// credentials {
61-
// username githubUsername
62-
// password githubPassword
63-
// }
64-
// }
65-
//}
66-
}
6747
}
6848

69-
if (isReleaseVersion) {
49+
50+
//if (isReleaseVersion) {
7051
signing {
52+
def signingKey = findProperty("signingKey")
53+
def signingPassword = findProperty("signingPassword")
54+
useInMemoryPgpKeys(signingKey, signingPassword)
7155
required { gradle.taskGraph.hasTask('publish') }
7256
sign publishing.publications.mavenJava
7357
}
74-
}
58+
//}

swim-java/swim-runtime/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeFramework'
3-
id 'SwimRuntimePublish'
3+
// id 'SwimRuntimePublish'
44
}
55

66
description = 'Swim Runtime'

swim-java/swim-runtime/buildSrc/src/main/groovy/SwimRuntimePublish.gradle

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ publishing {
1717
name = project.name
1818
description = project.description
1919
url = project.homepage
20+
if(project.hasProperty('gitCommit')) {
21+
properties = [
22+
"git.commit": gitCommit
23+
]
24+
}
2025
licenses {
2126
license {
2227
name = 'The Apache Software License, Version 2.0'
@@ -40,19 +45,19 @@ publishing {
4045
}
4146
}
4247

43-
repositories {
44-
if (project.hasProperty('swimUsername') && project.hasProperty('swimPassword')) {
45-
maven {
46-
def releasesRepositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
47-
def snapshotsRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
48-
name = 'Sonatype'
49-
url = isReleaseVersion ? releasesRepositoryUrl : snapshotsRepositoryUrl
50-
credentials {
51-
username swimUsername
52-
password swimPassword
53-
}
54-
}
55-
}
48+
// repositories {
49+
// if (project.hasProperty('swimUsername') && project.hasProperty('swimPassword')) {
50+
// maven {
51+
// def releasesRepositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
52+
// def snapshotsRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
53+
// name = 'Sonatype'
54+
// url = isReleaseVersion ? releasesRepositoryUrl : snapshotsRepositoryUrl
55+
// credentials {
56+
// username swimUsername
57+
// password swimPassword
58+
// }
59+
// }
60+
// }
5661
//if (project.hasProperty('githubUsername') && project.hasProperty('githubPassword')) {
5762
// maven {
5863
// name = 'GitHub'
@@ -63,7 +68,7 @@ publishing {
6368
// }
6469
// }
6570
//}
66-
}
71+
// }
6772
}
6873

6974
//if (isReleaseVersion) {

swim-java/swim-runtime/swim-core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeFramework'
3-
id 'SwimRuntimePublish'
3+
44
}
55

66
description = 'Swim Core Framework'

swim-java/swim-runtime/swim-core/swim.args/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Composable command line argument parser'

swim-java/swim-runtime/swim-core/swim.avro/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Apache Avro codec that incrementally parses and writes swim-structure values'

swim-java/swim-runtime/swim-core/swim.codec/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Incremental I/O; functional parsers and writers; display, debug, and diagnostic formatters; and Unicode and binary codecs'

swim-java/swim-runtime/swim-core/swim.collections/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Immutable, structure sharing collections, including hash array mapped tries, finger tries, B-trees, and S-trees (sequence trees)'

swim-java/swim-runtime/swim-core/swim.concurrent/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Timer, task, and continuation passing style interfaces, with lightweight scheduler and execution stage implementations'

swim-java/swim-runtime/swim-core/swim.csv/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Comma-Separated Values (CSV) codec that incrementally parses and writes swim-structure values'

swim-java/swim-runtime/swim-core/swim.dataflow/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Compiler from swim-structure expressions to live-updated data models'

swim-java/swim-runtime/swim-core/swim.db/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Lock-free document store—optimized for high rate atomic state changes—that concurrently commits and compacts on-disk log-structured storage files without blocking parallel in-memory updates to associative B-tree maps, spatial Q-tree maps, sequential S-tree lists, and singleton U-tree values'

swim-java/swim-runtime/swim-core/swim.deflate/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'DEFLATE codec that incrementally compresses and decompresses streams'

swim-java/swim-runtime/swim-core/swim.http/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'HTTP message model and wire protocol codec that incrementally decodes and encodes HTTP streams without intermediate buffering'

swim-java/swim-runtime/swim-core/swim.http2/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'HTTP/2 frame model and wire protocol codec that incrementally decodes and encodes HTTP/2 streams without intermediate buffering'

swim-java/swim-runtime/swim-core/swim.io.http/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'HTTP client and server socket modems for pipelining and concurrently transporting explicitly flow-controlled HTTP streams over a network without blocking or intermediate buffering'

swim-java/swim-runtime/swim-core/swim.io.mqtt/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'MQTT socket modem for concurrently transporting explicitly flow-controlled MQTT streams over a network without blocking or intermediate buffering'

swim-java/swim-runtime/swim-core/swim.io.warp/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'WARP socket modem for multiplexing and concurrently transporting prioritized, explicitly flow-controlled WARP treams over a network, without blocking or intermediate buffering'

swim-java/swim-runtime/swim-core/swim.io.ws/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'WebSocket modem for concurrently transporting explicitly flow-controlled WebSocket streams over a network without blocking or intermediate buffering, and swim-io-http requesters and responders for upgrading HTTP client and server modems to WebSocket modems'

swim-java/swim-runtime/swim-core/swim.io/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Explicitly flow-controlled, non-blocking, parallel I/O engine, with swim-codec-modulated socket modems, and TCP and TLS transports'

swim-java/swim-runtime/swim-core/swim.json/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'JavaScript Object Notation (JSON) codec that incrementally parses and writes swim-structure values'

swim-java/swim-runtime/swim-core/swim.math/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Mathematical and geometric structures, including rings, fields, vector modules and spaces, affine spaces, tensor spaces, probability distributions, and associated operators'

swim-java/swim-runtime/swim-core/swim.mqtt/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'MQTT packet model and wire protocol codec that incrementally decodes and encodes MQTT streams without intermediate buffering'

swim-java/swim-runtime/swim-core/swim.observable/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Collection interfaces that notify registered observers of precise state changes'

swim-java/swim-runtime/swim-core/swim.protobuf/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Protocol Buffers (protobuf) codec that incrementally parses and writes swim-structure values'

swim-java/swim-runtime/swim-core/swim.recon/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'SwimRuntimeLibrary'
3-
id 'SwimRuntimePublish'
3+
id 'SwimOSPublish'
44
}
55

66
description = 'Object notation with attributes, like if JSON and XML had a baby'

0 commit comments

Comments
 (0)