Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
cache: gradle
distribution: 'oracle'

- name: Publish to Sonatype
run: ./gradlew publish closeAndReleaseSonatypeStagingRepository
- name: Upload to Central Portal
run: ./gradlew publishAllPublicationsToMavenCentral
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_PRIVATE_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Java client is hosted on Maven Central.
#### Gradle
Add the following dependency block to your `build.gradle`.
```java
implementation 'ai.chalk:chalk-java:1.2.1'
implementation 'ai.chalk:chalk-java:1.2.2'
```

#### Maven
Expand All @@ -22,7 +22,7 @@ Add the following dependency block to your `pom.xml`.
<dependency>
<groupId>ai.chalk</groupId>
<artifactId>chalk-java</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
</dependency>
</dependencies>
```
Expand Down
73 changes: 28 additions & 45 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id "io.freefair.lombok" version "8.6"
id "signing"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
id 'com.vanniktech.maven.publish' version '0.30.0'
}

group 'ai.chalk'
Expand Down Expand Up @@ -52,18 +53,6 @@ java {
targetCompatibility = JavaVersion.VERSION_17
}

// Required for OSSRH publishing
task javadocJar(type: Jar) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}

// Required for OSSRH publishing
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}

def configurePom = { pom ->
pom.name = 'Chalk Java'
pom.description = 'The Java client for Chalk'
Expand Down Expand Up @@ -91,45 +80,39 @@ def configurePom = { pom ->
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
import com.vanniktech.maven.publish.SonatypeHost

artifact sourcesJar
artifact javadocJar
mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)

pom.with configurePom
}
}
signAllPublications()

repositories {
maven {
name = 'OSSRH'
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
coordinates(project.group.toString(), project.name, project.version.toString())

credentials {
username = System.getenv("SONATYPE_USERNAME") ?: project.findProperty("sonatypeUsername")
password = System.getenv("SONATYPE_PASSWORD") ?: project.findProperty("sonatypePassword")
pom {
name = 'Chalk Java'
description = 'The Java client for Chalk'
url = 'https://github.com/chalk-ai/chalk-java'

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
}

nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("SONATYPE_USERNAME") ?: project.findProperty("sonatypeUsername")
password = System.getenv("SONATYPE_PASSWORD") ?: project.findProperty("sonatypePassword")
developers {
developer {
id = 'chalk-ai'
name = 'Chalk'
email = 'support@chalk.ai'
}
}
}
}

signing {
def signingKey = System.getenv("SIGNING_PRIVATE_KEY") ?: project.findProperty("signingPrivateKey")
def signingPassword = System.getenv("SIGNING_PASSWORD") ?: project.findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}
scm {
connection = 'scm:git:git://github.com/chalk-ai/chalk-java.git'
developerConnection = 'scm:git:ssh://github.com:chalk-ai/chalk-java.git'
url = 'https://github.com/chalk-ai/chalk-java/'
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.2.1
version=1.2.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Aug 30 10:32:23 PDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading