Skip to content

Revert "Revert ":herb: Fern Regeneration -- April 15, 2025"" #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -54,8 +54,7 @@ jobs:

- name: Publish to maven
run: |
./.publish/prepare.sh
./gradlew publish
./gradlew sonatypeCentralUpload
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
65 changes: 53 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ plugins {
id 'maven-publish'
id 'com.diffplug.spotless' version '6.11.0'
id 'signing'
id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3'
}

repositories {
@@ -14,9 +15,9 @@ repositories {

dependencies {
api 'com.squareup.okhttp3:okhttp:4.12.0'
api 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.3'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3'
api 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}
@@ -25,26 +26,52 @@ dependencies {
sourceCompatibility = 1.8
targetCompatibility = 1.8

tasks.withType(Javadoc) {
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
}

spotless {
java {
palantirJavaFormat()
}
}


java {
withSourcesJar()
withJavadocJar()
}


group = 'com.cohere'

version = '1.7.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
archiveBaseName = "cohere-java"
}

sourcesJar {
archiveBaseName = "cohere-java"
}

javadocJar {
archiveBaseName = "cohere-java"
}

signing {
sign(publishing.publications)
}

test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}

publishing {
publications {
maven(MavenPublication) {
@@ -75,14 +102,28 @@ publishing {
}
}
}
repositories {
maven {
url "$System.env.MAVEN_PUBLISH_REGISTRY_URL"
credentials {
username "$System.env.MAVEN_USERNAME"
password "$System.env.MAVEN_PASSWORD"
}
}
}
}

sonatypeCentralUpload {
username = "$System.env.MAVEN_USERNAME"
password = "$System.env.MAVEN_PASSWORD"

archives = files(
"$buildDir/libs/cohere-java-" + version + ".jar",
"$buildDir/libs/cohere-java-" + version + "-sources.jar",
"$buildDir/libs/cohere-java-" + version + "-javadoc.jar"
)

pom = file("$buildDir/publications/maven/pom-default.xml")
signingKey = "$System.env.MAVEN_SIGNATURE_SECRET_KEY"
signingKeyPassphrase = "$System.env.MAVEN_SIGNATURE_PASSWORD"
}

signing {
def signingKeyId = "$System.env.MAVEN_SIGNATURE_SECRET_KEY"
def signingPassword = "$System.env.MAVEN_SIGNATURE_PASSWORD"
useInMemoryPgpKeys(signingKeyId, signingPassword)
sign publishing.publications.maven
}

sonatypeCentralUpload.dependsOn build
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
rootProject.name = 'cohere-java'

include 'sample-app'