Skip to content
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

chore: Update build.gradle to include publish script (box/box-codegen#654) #199

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "1965ba0", "specHash": "1fdcbef", "version": "0.3.0" }
{ "engineHash": "7d9d62d", "specHash": "1fdcbef", "version": "0.3.0" }
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Box Java SDK GENERATED

We are excited to introduce the Early Access Release of the latest generation of Box Java SDK, designed to elevate the developer experience and streamline your integration with the Box Content Cloud.
We are excited to introduce the Beta Release of the latest generation of Box Java SDK, designed to elevate the developer experience and streamline your integration with the Box Content Cloud.

With this SDK, you’ll have access to:

Expand Down Expand Up @@ -61,6 +61,44 @@ BoxClient client = new BoxClient(auth);

Browse the [docs](docs/README.md) or see [API Reference](https://developer.box.com/reference/) for more information.

## 3rd Party Libraries & Licenses

The Java SDK Gen uses third-party libraries that are required for usage. Their licenses are listed below:

1. [jackson-annotations v2.17.2](https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations/2.17.2)
Maven: `com.fasterxml.jackson.core:jackson-annotations:2.17.2`
Licence: [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
2. [jackson-core v2.17.2](https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core/2.17.2)
Maven: `com.fasterxml.jackson.core:jackson-core:2.17.2`
Licence: [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
3. [jackson-databind v2.17.2](https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.17.2)
Maven: `com.fasterxml.jackson.core:jackson-databind:2.17.2`
Licence: [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
4. [okhttp v4.12.0](https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/4.12.0)
Maven: `com.squareup.okhttp3:okhttp:4.12.0`
Licence: [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
5. [okio v3.5.0](https://mvnrepository.com/artifact/com.squareup.okio/okio/3.5.0)
Maven: `com.squareup.okio:okio:3.5.0`
Licence: [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
6. [jose4j v0.9.6](https://mvnrepository.com/artifact/org.bitbucket.b_c/jose4j/0.9.6)
Maven: `org.bitbucket.b_c:jose4j:0.9.6`
Licence: [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
7. [bcprov-jdk18on v1.78.1](https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on/1.78.1)
Maven: `org.bouncycastle:bcprov-jdk18on:1.78.1`
Licence: [MIT](https://opensource.org/licenses/MIT)
8. [bcpkix-jdk18on v1.78.1](https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.78.1)
Maven: `org.bouncycastle:bcpkix-jdk18on:1.78.1`
Licence: [MIT](https://opensource.org/licenses/MIT)

The following libraries are required for running tests:

1. [junit-jupiter-api v5.10.0](https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api/5.10.0)
Maven: `org.junit.jupiter:junit-jupiter-api:5.10.0`
Licence: [EPL 2.0](https://www.eclipse.org/legal/epl-2.0/)
2. [junit-jupiter-engine v5.10.0](https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine/5.10.0)
Maven: `org.junit.jupiter:junit-jupiter-engine:5.10.0`
Licence: [EPL 2.0](https://www.eclipse.org/legal/epl-2.0/)

# Questions, Bugs, and Feature Requests?

Need to contact us directly? [Browse the issues
Expand Down
67 changes: 67 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id "java"
id "com.diffplug.spotless" version "${spotlessVersion}"
id "maven-publish"
id "signing"
}
group = "com.box"
archivesBaseName = "box-java-sdk-gen"
Expand Down Expand Up @@ -50,3 +52,68 @@ test {
}

}
publishing {
publications {
boxJavaSdkGen(MavenPublication) {
from components.java
pom {
artifactId = project.getArchivesBaseName()
name = "Box Java SDK Gen"
description = "Official Box Java Generated SDK."
url = "https://opensource.box.com/box-java-sdk-gen/"
packaging = "jar"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}

}

developers {
developer {
id = "box"
name = "box"
email = "sdks@box.com"
}

}

scm {
connection = "scm:git:https://github.com/box/box-java-sdk-gen.git"
developerConnection = "scm:git:https://github.com/box/box-java-sdk-gen.git"
url = "https://github.com/box/box-java-sdk-gen"
}

}

}

}

repositories {
maven {
name = "sonatype"
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")) {
credentials {
username = ossrhUsername
password = ossrhPassword
}

}
}

}

}
signing {
required { !version.endsWith("SNAPSHOT") && gradle.taskGraph.hasTask("publish") }
// we are switching to gpg-agent and not using Java-based implementation because of
// org.bouncycastle:bc-fips:1.0.2.1 libray preset in our Docker machines which is
// not compatible with Gradle implementation
useGpgCmd()
sign publishing.publications.boxJavaSdkGen
}