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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build/
.#*
*.iml
.idea/
confidential.properties

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# RethinkDB Java Driver

[ ![Download](https://api.bintray.com/packages/rethinkdb/maven/rethinkdb-driver/images/download.svg) ](https://bintray.com/rethinkdb/maven/rethinkdb-driver/_latestVersion)
[![Maven Central](https://img.shields.io/maven-central/v/com.rethinkdb/rethinkdb-driver)](https://search.maven.org/artifact/com.rethinkdb/rethinkdb-driver)
[![Bintray](https://img.shields.io/bintray/v/rethinkdb/maven/rethinkdb-driver)](https://bintray.com/rethinkdb/maven/rethinkdb-driver/_latestVersion)
[![Travis-CI.org](https://img.shields.io/travis/rethinkdb/rethinkdb-java)](https://travis-ci.org/rethinkdb/rethinkdb-java)
[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Frethinkdb%2Frethinkdb-java)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Frethinkdb%2Frethinkdb-java)

This is the official [RethinkDB](https://rethinkdb.com/) client driver for Java and other JVM languages.

Expand Down Expand Up @@ -94,7 +97,8 @@ These are also checked into git, so you don't need to run the conversion script

## Deploying a release or snapshot

To deploy you'll need to create a file called `gradle.properties` at `~/.gradle` (`%USERPROFILE%\.gradle` on Windows) with the following:
To deploy, you'll need to create a file called `confidential.properties` in the same directory as `build.gradle.kts`
(Alternatively, you can do the same`gradle.properties` at `~/.gradle` (`%USERPROFILE%\.gradle` on Windows) with the following:

```
signing.keyId=<KEY_ID>
Expand All @@ -106,7 +110,8 @@ ossrhPassword=<SONATYPE_PASSWORD>
```

You should note that there's a `gradle.properties` in this repository, but you shouldn't add the above into it,
otherwise your credentials can be checked back into git. Create the file in the `.gradle` folder to prevent accidents.
otherwise your credentials can be checked back into git. Create the `confidential.properties` file, which is added into
`.gitignore`, or create the file in the `.gradle` folder, in order to prevent accidents.

You'll need to add your gpg signing key id and keyring file. Usually, the keyring file is located at`~/.gnupg/secring.gpg`,
but Gradle won't expand home-dirs in the config file so you have to put the absolute path to your keyring file.
Expand Down
11 changes: 9 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import java.util.Properties
import java.io.File

plugins {
java
maven
Expand All @@ -7,8 +10,6 @@ plugins {
version = "2.4.0"
group = "com.rethinkdb"

val isReleaseVersion = !version.toString().endsWith("-SNAPSHOT")

java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8

Expand All @@ -25,6 +26,12 @@ dependencies {
compile("com.fasterxml.jackson.core:jackson-databind:2.0.1")
}

file("confidential.properties").takeIf(File::exists)?.let {
val properties = Properties()
it.inputStream().use(properties::load)
allprojects { properties.forEach { name, value -> extra.set(name.toString(), value) } }
}

signing {
// Don't sign unless this is a release version
sign(configurations.archives.get())
Expand Down