Skip to content

Commit bfce257

Browse files
committed
Update Novu Java SDK to version 0.0.4 and refactor project structure
- Updated version to 0.0.4 in gradle.properties and related files. - Changed project name and artifactId from 'openapi' to 'novu-java'. - Added Spring Boot auto-configuration and starter modules for the Novu Java SDK. - Updated README.md and other documentation to reflect the new version and project name. - Configured Sonatype Central upload plugin for publishing. - Refactored build.gradle and publishing.gradle for improved structure and clarity.
1 parent 202af9c commit bfce257

File tree

18 files changed

+129
-93
lines changed

18 files changed

+129
-93
lines changed

.speakeasy/gen.lock

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ management:
55
docVersion: 3.11.0
66
speakeasyVersion: 1.685.0
77
generationVersion: 2.794.1
8-
releaseVersion: 0.0.3
9-
configChecksum: 63ba2a3ecda3fa25fdae09938741c1cf
8+
releaseVersion: 0.0.4
9+
configChecksum: 39ed5e10c14e478b7c548071696b7c95
10+
published: true
1011
persistentEdits:
11-
generation_id: 3cf816f1-f554-4651-9035-80ec8c0c9633
12-
pristine_commit_hash: 68e671533418024f5f48f046253b91b449ba67eb
13-
pristine_tree_hash: 8624ad80ea2f1ec8854753f4bead00084c718fef
12+
generation_id: 674059c0-5d0e-4ee2-8b5c-6fc00212c5b7
13+
pristine_commit_hash: 1118586f6d968469bea8568d1613ccbd87a02df6
14+
pristine_tree_hash: d259e9ed836963a0bd89177ab2b905fa9122ff9f
1415
features:
1516
java:
1617
additionalDependencies: 0.1.0
@@ -42,8 +43,8 @@ trackedFiles:
4243
pristine_git_object: 13ccfa3052b3e51671bdfbd12bcb63fd95c94fab
4344
build.gradle:
4445
id: f07866736216
45-
last_write_checksum: sha1:d7669fa234875ae0489fdf58ec741ed6ce3864df
46-
pristine_git_object: 47c8eaba35a4fab3e36d2dcfb6d4fa0b49ee4910
46+
last_write_checksum: sha1:5d6f112d1bf567c22c9d5a91778fb4021538ef8f
47+
pristine_git_object: c7e69f64a1417d5a9266374f5055b21df4d849bc
4748
docs/models/components/ActionDto.md:
4849
id: c282c9d8a8c4
4950
last_write_checksum: sha1:c267b0718b481fac54cdba11596f9ef21cb6d2ad
@@ -2854,8 +2855,8 @@ trackedFiles:
28542855
pristine_git_object: 971eac94f44ae53d22cb40b328a7fe53bc9c9289
28552856
gradle.properties:
28562857
id: 2afbb999f001
2857-
last_write_checksum: sha1:f16e298925816dd2ddadb87fd5563ce14a869d7f
2858-
pristine_git_object: 0b4c9870f2050fc6918e4d2868a17bb077b86656
2858+
last_write_checksum: sha1:b0e2ee6f9672d6b2f52ba072163a107befa1efbe
2859+
pristine_git_object: 08b954d79daaaf92696da523fdb426f7c2fb11f2
28592860
gradle/wrapper/gradle-wrapper.jar:
28602861
id: ec27dae6e852
28612862
last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611
@@ -2874,40 +2875,40 @@ trackedFiles:
28742875
pristine_git_object: 5eed7ee8452842305a18a4eb967442683808226a
28752876
publishing.gradle:
28762877
id: 0f10e722a87d
2877-
last_write_checksum: sha1:9a592653f464f4537c4572e13440496c1615b1dc
2878-
pristine_git_object: e50630a2f536b5c6b4d929a609d1b0c693b6eea6
2878+
last_write_checksum: sha1:132792a05889287eb544773e2e9504a372c4746f
2879+
pristine_git_object: 64027becb6bc83e71d89772ec8f1609aa021b1cf
28792880
settings.gradle:
28802881
id: 05efc8b16577
2881-
last_write_checksum: sha1:b5b2f4aa4269fea383621740c89e1a847d952da9
2882-
pristine_git_object: 9a417c6ef38588594d4900724dbc71fec69accc0
2883-
spring/openapi-spring-boot-autoconfigure/build.gradle:
2884-
id: 8cca0f748528
2885-
last_write_checksum: sha1:4bf91a68de64401147187f47630c079c3bac4b9a
2886-
pristine_git_object: 05d547fbdb43245a7c11b814d908c0510a06f69e
2887-
spring/openapi-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/ConditionalOnPropertyPrefix.java:
2888-
id: aa458931f121
2882+
last_write_checksum: sha1:dcc1260c393aa56c16bd5cc476cdd9926f4420aa
2883+
pristine_git_object: 16aa3a1243290c30419f62016496e7d629856726
2884+
spring/novu-java-spring-boot-autoconfigure/build.gradle:
2885+
id: bd1629b7c2a6
2886+
last_write_checksum: sha1:43c2500e230d498fbdcaa5f358c83bc292712408
2887+
pristine_git_object: 2e0afdf1f7812ffc91f8ba2fdc0e408b8339fc29
2888+
spring/novu-java-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/ConditionalOnPropertyPrefix.java:
2889+
id: 8ea36f8b8559
28892890
last_write_checksum: sha1:467852286ca6090f9793a6b66f79b9f989f9dcb6
28902891
pristine_git_object: 1fc681a6640677a23f5cb78598e0e77ff96a0341
2891-
spring/openapi-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/OnPropertyPrefixCondition.java:
2892-
id: ff219eb28a9c
2892+
spring/novu-java-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/NovuJavaAutoConfig.java:
2893+
id: 88f419cf8bea
2894+
last_write_checksum: sha1:13f419df10b61b5d32c13dd3fd2f484c4c8cbf9e
2895+
pristine_git_object: ef2f5ff80a3d0d8da3b0c868a34b7f545b9522ef
2896+
spring/novu-java-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/NovuJavaAutoConfigProperties.java:
2897+
id: 1258b4f7e5cb
2898+
last_write_checksum: sha1:619920869c66bab7037880de2c131fc9e40e9531
2899+
pristine_git_object: 986fe72c071576a801a17cc35393b01e1c6def17
2900+
spring/novu-java-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/OnPropertyPrefixCondition.java:
2901+
id: 441409ccef39
28932902
last_write_checksum: sha1:bede3dd966bee70e820c56c5c2b1e52d83f81021
28942903
pristine_git_object: 5bffebc1cd603617355ff969d612db8b766475a3
2895-
spring/openapi-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/OpenapiAutoConfig.java:
2896-
id: 7fd4c309a94a
2897-
last_write_checksum: sha1:ebb74059932585a820c2b4e0375685eea871f15f
2898-
pristine_git_object: 61f88a50cd549f7eaed12c04c0b713f3fb2e478c
2899-
spring/openapi-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/OpenapiAutoConfigProperties.java:
2900-
id: c32633bfed88
2901-
last_write_checksum: sha1:30be60a68fc491012eb4989f0a044cbdb10df0d0
2902-
pristine_git_object: 19e52c7090f4ee5280a02b90d07a34a20f6c99c3
2903-
? spring/openapi-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
2904-
: id: 46aa419ee195
2905-
last_write_checksum: sha1:99b642db590c638b2cd477d9c51da616bcf501f6
2906-
pristine_git_object: cbd2fac9a00bfd3f42d909199b0a6ff9b8efe462
2907-
spring/openapi-spring-boot-starter/build.gradle:
2908-
id: 0df61da8e4c8
2909-
last_write_checksum: sha1:b6fcf6e08a237318167ef1f10d8f6143ee6b79df
2910-
pristine_git_object: 31161bc9436d6a82d0c2d9e5ea5c24b12f2e504d
2904+
? spring/novu-java-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
2905+
: id: 43b762dce868
2906+
last_write_checksum: sha1:a8592b208926db562fc1ee9d89b3f96e0c851954
2907+
pristine_git_object: a8e1237c380d250d4073d639d09b14680b23221e
2908+
spring/novu-java-spring-boot-starter/build.gradle:
2909+
id: 7365543060ac
2910+
last_write_checksum: sha1:1b62336932ee19d348c5532fbda62bad2437f94b
2911+
pristine_git_object: ef02cc939300d6690fca42411c4634d5a1c3508e
29112912
src/main/java/org/openapis/openapi/Activity.java:
29122913
id: 78fedd481186
29132914
last_write_checksum: sha1:ccd627279aed65143b4f3c00df6b115d2ee9393c
@@ -3066,8 +3067,8 @@ trackedFiles:
30663067
pristine_git_object: b02e52becb05a47d333ad337ffff1b91d083517b
30673068
src/main/java/org/openapis/openapi/SDKConfiguration.java:
30683069
id: 0b994d6164f8
3069-
last_write_checksum: sha1:19fe42a9e43ce280b7edfcd069fda857bf691b98
3070-
pristine_git_object: d17f05501e976e76022495e473878ed73f2c015c
3070+
last_write_checksum: sha1:609793de55bc83e102c622f2a003e16c6db6778b
3071+
pristine_git_object: a17c66e1be97b8c4e4a54cf193000ff0d6c17bc1
30713072
src/main/java/org/openapis/openapi/SecuritySource.java:
30723073
id: a2592d2c5a7a
30733074
last_write_checksum: sha1:bd494cc8f77e7c0582bae60e95ce48ed4e715935

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ generation:
2828
generateNewTests: true
2929
skipResponseBodyAssertions: false
3030
java:
31-
version: 0.0.3
31+
version: 0.0.4
3232
additionalDependencies: []
3333
additionalPlugins:
3434
- id 'org.sonarqube' version '4.4.1.3373'

.speakeasy/workflow.lock

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ speakeasyVersion: 1.685.0
22
sources:
33
Novu-OAS:
44
sourceNamespace: novu-oas
5-
sourceRevisionDigest: sha256:fdf9e744011dbc6cdac3a1b54b014363e4bf71780c68b0e57d34e50a7f93678e
6-
sourceBlobDigest: sha256:dd8cfd81eae54fc9bcf66dab1dad7d70c6b51e856cced6277c551b61e76bb91d
5+
sourceRevisionDigest: sha256:d469b73d1950430fd9b8c4269bc6c0aa79e2518aff46bc41b70724913f535c3e
6+
sourceBlobDigest: sha256:5af0f199cc7c27569ae7c033f6e6c41e6e386936de22fd21faa5c054d75ab923
77
tags:
88
- latest
9+
- 3.11.0
910
targets:
1011
novu:
1112
source: Novu-OAS
1213
sourceNamespace: novu-oas
13-
sourceRevisionDigest: sha256:fdf9e744011dbc6cdac3a1b54b014363e4bf71780c68b0e57d34e50a7f93678e
14-
sourceBlobDigest: sha256:dd8cfd81eae54fc9bcf66dab1dad7d70c6b51e856cced6277c551b61e76bb91d
14+
sourceRevisionDigest: sha256:d469b73d1950430fd9b8c4269bc6c0aa79e2518aff46bc41b70724913f535c3e
15+
sourceBlobDigest: sha256:5af0f199cc7c27569ae7c033f6e6c41e6e386936de22fd21faa5c054d75ab923
1516
codeSamplesNamespace: novu-oas-java-code-samples
16-
codeSamplesRevisionDigest: sha256:1c9d3693d14ee2801d4ec2d11df604cfe657aa6416c0d7becfcd9aae6d1b9880
17+
codeSamplesRevisionDigest: sha256:5d6142427fcf57313c5faeef9eef48880a568f374cf662e1326e605185afea86
1718
workflow:
1819
workflowVersion: 1.0.0
1920
speakeasyVersion: latest
@@ -30,6 +31,12 @@ workflow:
3031
novu:
3132
target: java
3233
source: Novu-OAS
34+
publish:
35+
java:
36+
ossrhUsername: $ossrh_username
37+
ossrhPassword: $ossrh_password
38+
gpgSecretKey: $java_gpg_secret_key
39+
gpgPassPhrase: $java_gpg_passphrase
3340
codeSamples:
3441
registry:
3542
location: registry.speakeasyapi.dev/novu/novu/novu-oas-java-code-samples

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ The samples below show how a published SDK artifact is used:
5050

5151
Gradle:
5252
```groovy
53-
implementation 'co.novu:novu-java:0.0.3'
53+
implementation 'co.novu:novu-java:0.0.4'
5454
```
5555

5656
Maven:
5757
```xml
5858
<dependency>
5959
<groupId>co.novu</groupId>
6060
<artifactId>novu-java</artifactId>
61-
<version>0.0.3</version>
61+
<version>0.0.4</version>
6262
</dependency>
6363
```
6464

build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ plugins {
1414
id 'java-library'
1515
id 'maven-publish'
1616
id 'signing'
17+
// V2 publishing plugin (Sonatype Central Portal)
18+
id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3'
1719
id "io.spring.dependency-management" version "1.1.6" apply false
1820
id 'org.sonarqube' version '4.4.1.3373'
1921
}
@@ -37,6 +39,7 @@ group = "${groupId}"
3739

3840
jar {
3941
dependsOn 'generatePomFileForMavenPublication'
42+
archiveBaseName = "${artifactId}"
4043

4144
into("META-INF/maven/co.novu/novu-java") {
4245
from(layout.buildDirectory.file("pom.xml")) {
@@ -91,8 +94,8 @@ ext {
9194

9295
subprojects {
9396
if (name in [
94-
'openapi-spring-boot-autoconfigure',
95-
'openapi-spring-boot-starter'
97+
'novu-java-spring-boot-autoconfigure',
98+
'novu-java-spring-boot-starter'
9699
]) {
97100
// Ensure subprojects use the same group and version as root project
98101
group = rootProject.group
@@ -103,6 +106,7 @@ subprojects {
103106
plugin "io.spring.dependency-management"
104107
plugin "maven-publish"
105108
plugin "signing"
109+
plugin "cl.franciscosolis.sonatype-central-upload"
106110
}
107111
dependencyManagement {
108112
imports {
@@ -130,8 +134,8 @@ ext {
130134
groupId: group,
131135
artifactId: artifactId,
132136
version: version,
133-
name: "My Company Java SDK",
134-
description: "SDK enabling Java developers to easily integrate with the My Company API.",
137+
name: "Novu Java SDK",
138+
description: "SDK enabling Java developers to easily integrate with the Novu API.",
135139
publicationName: "maven"
136140
]
137141
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
groupId=co.novu
22
artifactId=novu-java
3-
version=0.0.3
3+
version=0.0.4
44
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g

publishing.gradle

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ afterEvaluate {
55
}
66

77
def config = project.ext.publishingConfig
8+
sonatypeCentralUpload {
9+
username = System.getenv("SONATYPE_USERNAME") ?: "test-user"
10+
password = System.getenv("SONATYPE_PASSWORD") ?: "test-password"
11+
12+
// Use the actual generated artifact files
13+
archives = provider {
14+
def libsDir = layout.buildDirectory.dir("libs").get()
15+
def artifactId = config.artifactId
16+
def version = config.version
17+
18+
files(
19+
libsDir.file("${artifactId}-${version}.jar"),
20+
libsDir.file("${artifactId}-${version}-sources.jar"),
21+
libsDir.file("${artifactId}-${version}-javadoc.jar")
22+
)
23+
}
24+
25+
pom = layout.buildDirectory.file("pom.xml").get().asFile
26+
// This is your PGP private key. This is required to sign your files
27+
signingKey = System.getenv("SONATYPE_SIGNING_KEY") ?: ""
28+
// This is your PGP private key passphrase to decrypt your private key
29+
signingKeyPassphrase = System.getenv("SIGNING_KEY_PASSPHRASE") ?: ""
30+
}
831
publishing {
932

1033
publications {
@@ -22,10 +45,10 @@ afterEvaluate {
2245
]
2346
name = config.name
2447
description = config.description
25-
url = 'https://github.com/owner/repo'
48+
url = 'https://github.com/novu/novu-java'
2649
scm {
27-
url = 'github.com/owner/repo'
28-
connection = 'scm:git:ssh://[email protected]/owner/repo.git'
50+
url = 'github.com/novu/novu-java'
51+
connection = 'scm:git:ssh://[email protected]/novu/novu-java.git'
2952
}
3053
licenses {
3154
license {
@@ -35,14 +58,14 @@ afterEvaluate {
3558
}
3659
developers {
3760
developer {
38-
name = 'My Company'
39-
organization = 'My Company'
40-
61+
name = 'Novu'
62+
organization = 'Novu'
63+
4164
}
4265
}
4366
organization {
44-
name = 'My Company'
45-
url = 'www.mycompany.com'
67+
name = 'Novu'
68+
url = 'https://novu.co'
4669
}
4770
}
4871
}

settings.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
* in the user manual at https://docs.gradle.org/7.5.1/userguide/multi_project_builds.html
88
*/
99

10-
rootProject.name = 'openapi'
10+
rootProject.name = 'novu-java'
1111

12-
include 'openapi-spring-boot-autoconfigure'
13-
include 'openapi-spring-boot-starter'
12+
include 'novu-java-spring-boot-autoconfigure'
13+
include 'novu-java-spring-boot-starter'
1414

15-
project(':openapi-spring-boot-autoconfigure').projectDir = file('spring/openapi-spring-boot-autoconfigure')
16-
project(':openapi-spring-boot-starter').projectDir = file('spring/openapi-spring-boot-starter')
15+
project(':novu-java-spring-boot-autoconfigure').projectDir = file('spring/novu-java-spring-boot-autoconfigure')
16+
project(':novu-java-spring-boot-starter').projectDir = file('spring/novu-java-spring-boot-starter')
1717

1818
// Apply additional settings if the file exists
1919
if (file('settings-extra.gradle').exists()) {

spring/openapi-spring-boot-autoconfigure/build.gradle renamed to spring/novu-java-spring-boot-autoconfigure/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ description = 'openapi Spring Boot Auto Configuration'
44
ext {
55
publishingConfig = [
66
groupId: rootProject.group,
7-
artifactId: 'openapi-spring-boot-autoconfigure',
7+
artifactId: 'novu-java-spring-boot-autoconfigure',
88
version: rootProject.version,
9-
name: 'My Company Java SDK - Spring Boot Auto Configuration',
10-
description: 'Spring Boot auto-configuration for the My Company Java SDK.',
9+
name: 'Novu Java SDK - Spring Boot Auto Configuration',
10+
description: 'Spring Boot auto-configuration for the Novu Java SDK.',
1111
]
1212
}
1313

@@ -25,8 +25,8 @@ test {
2525

2626
jar {
2727
dependsOn 'generatePomFileForMavenPublication'
28-
archiveBaseName = 'openapi-spring-boot-autoconfigure'
29-
into("META-INF/maven/co.novu/openapi-spring-boot-autoconfigure") {
28+
archiveBaseName = 'novu-java-spring-boot-autoconfigure'
29+
into("META-INF/maven/co.novu/novu-java-spring-boot-autoconfigure") {
3030
from(layout.buildDirectory.file("pom.xml")) {
3131
// Only include if it exists to avoid build ordering issues
3232
duplicatesStrategy = DuplicatesStrategy.INCLUDE

spring/openapi-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/ConditionalOnPropertyPrefix.java renamed to spring/novu-java-spring-boot-autoconfigure/src/main/java/org/openapis/openapi/ConditionalOnPropertyPrefix.java

File renamed without changes.

0 commit comments

Comments
 (0)