diff --git a/java/README.md b/java/README.md index 9f19374828..69b38c9cde 100644 --- a/java/README.md +++ b/java/README.md @@ -1,7 +1,7 @@ # Summary - Java Wrapper -This module contains a Java-client wrapper that connects to the `Babushka`-rust-client. The rust client connects to -redis, while this wrapper provides Java-language binding. The objective of this wrapper is to provide a thin-wrapper +This module contains a Java-client wrapper that connects to the `Babushka`-rust-client. The rust client connects to +redis, while this wrapper provides Java-language binding. The objective of this wrapper is to provide a thin-wrapper language api to enhance performance and limit cpu cycles at scale. ## Organization @@ -16,9 +16,17 @@ The Java client (javabushka) contains the following parts: You can assemble the Java clients benchmarks by compiling using `./gradlew build`. +## Code style + +Code style is enforced by spotless with Google Java Format. The build fails if code formatted incorrectly, but you can auto-format code with `./gradlew spotlessApply`. +Run this command before every commit to keep code in the same style. +These IDE plugins can auto-format code on file save or by single click: +* [For Intellij IDEA](https://plugins.jetbrains.com/plugin/18321-spotless-gradle) +* [For VS Code](https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle) + ## Benchmarks -You can run benchmarks using `./gradlew run`. You can set arguments using the args flag like: +You can run benchmarks using `./gradlew run`. You can set arguments using the args flag like: ```shell ./gradlew run --args="--clients lettuce" diff --git a/java/jabushka/build.gradle b/java/jabushka/build.gradle index 3df55bde0d..340f2c98cb 100644 --- a/java/jabushka/build.gradle +++ b/java/jabushka/build.gradle @@ -8,13 +8,11 @@ plugins { repositories { mavenCentral() - mavenLocal() } subprojects { repositories { mavenCentral() - mavenLocal() } // minimal java compatibility level plugins.withId('java') { @@ -28,7 +26,7 @@ subprojects { events "started", "skipped", "passed", "failed" showStandardStreams true } - // Temporary suspend jacoco + // TODO: add jacoco with code coverage // finalizedBy jacocoTestReport, jacocoTestCoverageVerification } } @@ -81,7 +79,7 @@ jacocoTestCoverageVerification { })) } } -// Temporary suspend jacoco +// TODO: add jacoco with code coverage // check.dependsOn jacocoTestCoverageVerification // End of JaCoCo section diff --git a/java/jabushka/settings.gradle b/java/jabushka/settings.gradle index 901c56c17e..f549b8010a 100644 --- a/java/jabushka/settings.gradle +++ b/java/jabushka/settings.gradle @@ -2,8 +2,4 @@ rootProject.name = 'babushka' include 'jabushka' include 'integTest' - -// Run benchmarking by adding `-Pbenchmark` switch to gradlew command line -if (hasProperty('benchmark')) { - include 'benchmarks' -} +include 'benchmarks'