From 4eb2e1c069273b4e81d17565b6c1feb585c6ce34 Mon Sep 17 00:00:00 2001 From: Maxime Petazzoni Date: Sun, 25 Aug 2024 12:26:34 -0700 Subject: [PATCH 1/2] feat: add Vim swap files to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 31f98de..32fbf2f 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ build # IntelliJ .idea/ + +# Vim +*.swp From 72bcd494033ce8ae2bcd2e5d50864a2a12a9c7ba Mon Sep 17 00:00:00 2001 From: Maxime Petazzoni Date: Sun, 25 Aug 2024 12:38:04 -0700 Subject: [PATCH 2/2] feat: configure publishing to Sonatype Central --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++-- gradle.properties | 1 - lib/build.gradle | 38 ++++++++++++++++++++++++++++++++--- 3 files changed, 83 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cfc71aa..4c55c2a 100644 --- a/README.md +++ b/README.md @@ -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= +export OSSRH_PASSWORD= +``` + +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 diff --git a/gradle.properties b/gradle.properties index 18f452c..76dc27b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,4 +3,3 @@ org.gradle.parallel=true org.gradle.caching=true - diff --git a/lib/build.gradle b/lib/build.gradle index bafe764..d2bddf6 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -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 = 'info@wherobots.com' + } + } + 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() }