-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: configure publishing to Sonatype Central
- Loading branch information
1 parent
4eb2e1c
commit 72bcd49
Showing
3 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,48 @@ | ||
# wherobots-jdbc-driver | ||
JDBC Driver Implementation for the Wherobots Spatial SQL API | ||
# Wherobots Spatial SQL JDBC Driver | ||
|
||
This library provides a JDBC driver implementation for the Wherobots | ||
Spatial SQL API. It allows you to build Java/Scala/Kotlin applications | ||
that can interact with Wherobots and leverage the Spatial SQL and | ||
geospatial analytics capabilities of WherobotsDB. | ||
|
||
This JDBC driver is also directly usable from database applications like | ||
JetBrains's DataGrip or DBeaver. | ||
|
||
## Usage | ||
|
||
### As a library | ||
|
||
```gradle | ||
dependencies { | ||
implementation 'com.wherobots.jdbc:wherobots-jdbc-driver:0.1.0' | ||
} | ||
``` | ||
|
||
### In DataGrip | ||
|
||
TODO: add instructions for configuring a database connection with the | ||
Wherobots JDBC driver. | ||
|
||
## Release | ||
|
||
To publish a new release, you need an account on [Sonatype's Central | ||
Portal](https://central.sonatype.com) with permissions to publish into | ||
the `com.wherobots` namespace. From your account, create an API key, | ||
which gets you a user token and secret key pair: | ||
|
||
```sh | ||
export OSSRH_USERNAME=<user token> | ||
export OSSRH_PASSWORD=<secret key> | ||
``` | ||
|
||
You also need a GnuPG key, loaded up in `gpg-agent`, for signing the | ||
release artifacts. | ||
|
||
Then, after setting the new version in `lib/build.gradle`, publish with: | ||
|
||
```sh | ||
$ ./gradlew clean publishToCentralPortal | ||
``` | ||
|
||
You can then check the status and validation of thsi deployment at | ||
https://central.sonatype.com/publishing/deployments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ | |
|
||
org.gradle.parallel=true | ||
org.gradle.caching=true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,43 @@ | |
plugins { | ||
id 'com.github.johnrengelman.shadow' version '8.1.1' | ||
id 'java-library' | ||
id 'net.thebugmc.gradle.sonatype-central-portal-publisher' version '1.2.4' | ||
id 'signing' | ||
} | ||
|
||
description = 'JDBC driver for the Wherobots Cloud Spatial SQL API' | ||
group = 'com.wherobots.jdbc' | ||
version = '0.1.0' | ||
|
||
repositories { | ||
// Use Maven Central for resolving dependencies. | ||
mavenCentral() | ||
} | ||
|
||
centralPortal { | ||
username = System.getenv('OSSRH_USERNAME') | ||
password = System.getenv('OSSRH_PASSWORD') | ||
|
||
pom { | ||
url = 'https://www.wherobots.com' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
name = 'Wherobots Inc.' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:https://github.com/wherobots/wherobots-jdbc-driver' | ||
url = 'https://github.com/wherobots/wherobots-jdbc-driver' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
// This dependency is used internally, and not exposed to consumers on their own compile classpath. | ||
implementation 'org.apache.httpcomponents.core5:httpcore5:5.2.4' | ||
|
@@ -42,12 +70,16 @@ java { | |
} | ||
|
||
tasks.named('jar') { | ||
archiveBaseName.set('wherobots-jdbc-driver') | ||
manifest { | ||
attributes('Implementation-Title': project.name, | ||
attributes('Implementation-Title': rootProject.name, | ||
'Implementation-Version': project.version) | ||
} | ||
} | ||
|
||
tasks.withType(Jar) { | ||
archiveBaseName.set('wherobots-jdbc') | ||
} | ||
|
||
signing { | ||
useGpgCmd() | ||
} |