Skip to content

Commit

Permalink
Merge pull request #7 from rethinkdb/develop/experimental
Browse files Browse the repository at this point in the history
Breaking changes to the Java driver
  • Loading branch information
gabor-boros authored Mar 4, 2020
2 parents 7a90cba + e9f76e6 commit c312908
Show file tree
Hide file tree
Showing 308 changed files with 3,852 additions and 4,197 deletions.
34 changes: 34 additions & 0 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Deploying a release or snapshot to Bintray

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:

```
bintray.user=<BINTRAY_USERNAME>
bintray.key=<BINTRAY_API_KEY>
ossrhUsername=<SONATYPE_USERNAME>
ossrhPassword=<SONATYPE_PASSWORD>
signing.keyId=<SIGNING_KEY_ID>
signing.password=<SIGNING_KEY_PASSWORD>
signing.secretKeyRingFile=<SIGNING_KEY_FILE>
```

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 `confidential.properties` file, which is added into `.gitignore`, or create the file in the `.gradle` folder, in order to prevent accidents.

When releasing through Bintray, gpg signing is done by the person who does the release. The reason for not letting Bintray sign the packages is simply security consideration. 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. If you don't have the private key for package signing, ask one of the **@rethinkdb/team-java** members to help you deploy.

You must use gpg 2.0 or below, since gpg 2.1 and greater doesn't use the `secring.gpg` file anymore. This is a limitation on Gradle's end and there's an [issue regarding that](https://github.com/gradle/gradle/issues/888).

To upload a new release, run `./gradlew assemble signArchives bintrayUpload`. This should upload the package to the bintray repository. the version looks like `2.2` or `2.2-SNAPSHOT`, so this is important to get right or it won't go to the right place.

## Maven Central Integration

If you are doing a release, you also need a Sonatype username and password, that you may get from [Sonatype's JIRA](https://issues.sonatype.org/secure/Signup!default.jspa), with access to the `com.rethinkdb` group. Some RethinkDB maintainer may already have it.

To upload a new release directly to Sonatype, run the Gradle task `uploadArchives`. This should sign and upload the package to the release repository. This is for official releases/betas etc. If you just want to upload a snapshot, add the suffix `-SNAPSHOT` to the `version` value in `build.gradle`. The gradle maven plugin decides which repo to upload to depending on whether the version looks like `2.2` or `2.2-SNAPSHOT`, so this is important to get right or it won't go to the right place.

After release, you may need to go to https://oss.sonatype.org/#stagingRepositories and search for "rethinkdb" in the search box, find the release that is in status `open`. Select it and then click the `Close` button. This will check it and make it ready for release. If that stage passes you can click the `Release` button.

For full instructions see: http://central.sonatype.org/pages/releasing-the-deployment.html
50 changes: 11 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ This is the official [RethinkDB](https://rethinkdb.com/) client driver for Java

The driver has official docs that you can read at [the RethinkDB documentation](http://rethinkdb.com/api/java/).

## What changed in Version 2.4.1?

This version is **full of breaking changes**, and is equivalent to a **major release**, but being compatible with RethinkDB v2.4.0

Please read the [release notes](https://github.com/rethinkdb/rethinkdb-java/releases) for v2.4.1 to know what changed.

## Building from source

To build from source you just need JDK 8 or greater.
Expand All @@ -21,7 +27,7 @@ Run `./gradlew assemble` to build the jar or `./gradlew install` to install it i

Besides JDK 8, to be able to contribute to the driver, you must also install:

* Python *3.6* or *3.7*
* Python **3.6** or **3.7**
* PIP3 libraries:
* mako
* rethinkdb
Expand All @@ -39,7 +45,7 @@ You can invoke any task by running `./gradlew taskName` (or `gradlew.bat` in Win
| `genMainJava`* | Using all the JSON files, regenerates the files on the `com.rethinkdb.gen` package at `src/main/java` |
| `genTestJava` | Using the downloaded YAML test files, regenerates the tests on the `com.rethinkdb.gen` package at `src/test/java` |

[*] Currently, `genMainJava` task is disabled because the `generatedJsonFiles` python scripts are generating invalid JSON files.
[*] Currently, `genMainJava` task is enabled only for local files because the `generatedJsonFiles` python scripts are generating invalid JSON files.

To setup your environiment to be able to generate driver classes and test files, run the `downloadProtoAndTests` and `generateJsonFiles` tasks.

Expand Down Expand Up @@ -97,42 +103,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 `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>
signing.password=
signing.secretKeyRingFile=<KEYRING_LOCATION>
ossrhUsername=<SONATYPE_USERNAME>
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 `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.
If you don't have a password on your private key for package signing, leave the `signing.password=` line **empty**.

You must use gpg 2.0 or below, since gpg 2.1 and greater doesn't use the `secring.gpg` file anymore. This is a limitation
on Gradle's end and there's an [issue regarding that](https://github.com/gradle/gradle/issues/888).

You also neeed a Sonatype username and password, that you may get from [Sonatype's JIRA](https://issues.sonatype.org/secure/Signup!default.jspa),
with access to the `com.rethinkdb` group. Some RethinkDB maintainer may already have it.

To upload a new release, run the Gradle task `uploadArchives`. This should sign and upload the package to the release
repository. This is for official releases/betas etc. If you just want to upload a snapshot, add the suffix `-SNAPSHOT`
to the `version` value in `build.gradle`. The gradle maven plugin decides which repo to upload to depending on whether
the version looks like `2.2` or `2.2-SNAPSHOT`, so this is important to get right or it won't go to the right place.

If you just want to do a snapshot: if `gradle uploadArchives` succeeds, you're done. The snapshot will be located at
https://oss.sonatype.org/content/repositories/snapshots/com/rethinkdb/rethinkdb-driver/ with the version you gave it.
This section was moved to separate documentation:

If you are doing a full release, you need to go to https://oss.sonatype.org/#stagingRepositories and search for
"rethinkdb" in the search box, find the release that is in status `open`. Select it and then click the `Close` button.
This will check it and make it ready for release. If that stage passes you can click the `Release` button.
> [How to deploy this repository to Bintray](DEPLOYING-BINTRAY.md)
For full instructions see: http://central.sonatype.org/pages/releasing-the-deployment.html
> [How to deploy this repository to Maven Central (Sonatype)](DEPLOYING-SONATYPE.md)
Loading

0 comments on commit c312908

Please sign in to comment.