Skip to content

Commit

Permalink
0.9.19
Browse files Browse the repository at this point in the history
* Update jars
* Add code coverage
  • Loading branch information
pambrose authored Dec 22, 2019
1 parent 1d61384 commit 21faedc
Show file tree
Hide file tree
Showing 17 changed files with 102 additions and 174 deletions.
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ jdk:
#- openjdk11
- openjdk8

branches:
only:
- master
#branches:
# only:
# - master

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand All @@ -24,7 +24,14 @@ services:
before_install:
- docker run --detach -p 2379:2379 -p 2380:2380 --name etcd quay.io/coreos/etcd:latest /usr/local/bin/etcd --advertise-client-urls http://0.0.0.0:2379 --listen-client-urls http://0.0.0.0:2379

before_script:
- chmod +x gradlew

script:
- ./gradlew check jacocoTestReport

after_success:
- bash <(curl -s https://codecov.io/bash)
- ./gradlew jacocoTestReport coveralls

notifications:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ compile:
build: compile

tests:
./gradlew check
./gradlew check jacocoTestReport

refresh:
./gradlew build --refresh-dependencies
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

[![JitPack](https://jitpack.io/v/pambrose/etcd-recipes.svg)](https://jitpack.io/#pambrose/etcd-recipes)
[![Build Status](https://travis-ci.org/pambrose/etcd-recipes.svg?branch=master)](https://travis-ci.org/pambrose/etcd-recipes)
[![Coverage Status](https://coveralls.io/repos/github/pambrose/etcd-recipes/badge.svg)](https://coveralls.io/github/pambrose/etcd-recipes)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e185b9c637b040bab55bdecf38b0de76)](https://www.codacy.com/manual/pambrose/etcd-recipes?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=pambrose/etcd-recipes&amp;utm_campaign=Badge_Grade)
[![codebeat badge](https://codebeat.co/badges/d61556d4-22e8-44c3-b8f8-db7613fae7fc)](https://codebeat.co/projects/github-com-pambrose-etcd-recipes-master)
[![codecov](https://codecov.io/gh/pambrose/etcd-recipes/branch/master/graph/badge.svg)](https://codecov.io/gh/pambrose/etcd-recipes)
[![Coverage Status](https://coveralls.io/repos/github/pambrose/etcd-recipes/badge.svg)](https://coveralls.io/github/pambrose/etcd-recipes)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pambrose_etcd-recipes&metric=alert_status)](https://sonarcloud.io/dashboard?id=pambrose_etcd-recipes)
[![Maintainability](https://api.codeclimate.com/v1/badges/b183ced841479fbdb242/maintainability)](https://codeclimate.com/github/pambrose/etcd-recipes/maintainability)
[![Known Vulnerabilities](https://snyk.io/test/github/pambrose/etcd-recipes/badge.svg)](https://snyk.io/test/github/pambrose/etcd-recipes)
[![Java](https://img.shields.io/badge/%20language-Java-red.svg)](https://kotlinlang.org/)
[![Kotlin](https://img.shields.io/badge/%20language-Kotlin-red.svg)](https://kotlinlang.org/)

[![Java](https://img.shields.io/badge/%20language-Java-red.svg)](https://kotlinlang.org/)

[etcd-recipes](https://github.com/pambrose/etcd-recipes) is a Kotlin/Java/JVM client library
for [etcd](https://etcd.io) v3, a distributed, reliable key-value store. It attempts to provide the same
Expand Down Expand Up @@ -53,7 +52,7 @@ repositories {
}
dependencies {
implementation "com.github.pambrose.etcd-recipes:etcd-recipes:0.9.18"
implementation "com.github.pambrose.etcd-recipes:etcd-recipes:0.9.19"
}
```

Expand All @@ -77,7 +76,7 @@ dependencies {
<dependency>
<groupId>com.github.pambrose.etcd-recipes</groupId>
<artifactId>etcd-recipes</artifactId>
<version>0.9.18</version>
<version>0.9.19</version>
</dependency>
</dependencies>
```
128 changes: 71 additions & 57 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,68 +1,62 @@
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.60' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.3.60' apply false
id 'org.jetbrains.kotlin.jvm' version '1.3.61' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.3.61' apply false
id "com.github.ben-manes.versions" version "0.27.0" apply false
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.4' apply false
}

repositories {
mavenCentral()
jcenter()
}

allprojects {
group 'com.github.pambrose.etcd-recipes'
version '0.9.19'

}

subprojects {
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jetbrains.kotlin.plugin.serialization'
apply plugin: 'com.github.ben-manes.versions'

group 'com.github.pambrose.etcd-recipes'
version '0.9.18'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
maven { url "https://kotlin.bintray.com/kotlinx" }
mavenCentral()
maven { url = 'https://maven-central.storage-download.googleapis.com/repos/central/data/' }
jcenter()
maven { url 'https://jitpack.io' }
}

ext {
def kotlinVersion = '1.3.60'
def serializationVersion = '0.13.0'
def jetcdVersion = '0.4.1'
def guavaVersion = '28.1-android'
def utilsVersion = '1.1.8'
def loggingVersion = '1.7.7'
def slf4jVersion = '1.7.28'
def kluentVersion = '1.57'
def junitVersion = '5.5.2'

libraries = [
stdlib : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}",
reflect : "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}",
serialization : "org.jetbrains.kotlinx:kotlinx-serialization-runtime:${serializationVersion}",

jetcd : "io.etcd:jetcd-all:${jetcdVersion}",
guava : "com.google.guava:guava:${guavaVersion}",
core_utils : "com.github.pambrose.common-utils:core-utils:${utilsVersion}",
guava_utils : "com.github.pambrose.common-utils:guava-utils:${utilsVersion}",

logging : "io.github.microutils:kotlin-logging:${loggingVersion}",
slf4j_simple : "org.slf4j:slf4j-simple:${slf4jVersion}",

kluent : "org.amshove.kluent:kluent:$kluentVersion",
jupiter_api : "org.junit.jupiter:junit-jupiter-api:$junitVersion",
jupiter_engine: "org.junit.jupiter:junit-jupiter-engine:$junitVersion"

]
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
}

subprojects {
def guavaVersion = '28.1-jre'
def jetcdVersion = '0.4.1'
def junitVersion = '5.5.2'
def kluentVersion = '1.58'
def loggingVersion = '1.7.8'
def serializationVersion = '0.13.0'
def slf4jVersion = '1.7.28'
def utilsVersion = '1.1.14'

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlin:kotlin-reflect"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:${serializationVersion}"

implementation "io.etcd:jetcd-all:${jetcdVersion}"
implementation "com.google.guava:guava:${guavaVersion}"
implementation "com.github.pambrose.common-utils:core-utils:${utilsVersion}"
implementation "com.github.pambrose.common-utils:guava-utils:${utilsVersion}"

implementation "io.github.microutils:kotlin-logging:${loggingVersion}"
implementation "org.slf4j:slf4j-simple:${slf4jVersion}"

testImplementation "org.amshove.kluent:kluent:${kluentVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}

task sourcesJar(type: Jar, dependsOn: classes) {
Expand All @@ -75,26 +69,46 @@ subprojects {
from javadoc.destinationDir
}

sourceSets {
main {
java {
srcDirs 'src/main/java'
srcDirs 'src/main/kotlin'
}
}
}

jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}

}
check.dependsOn jacocoTestReport

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
artifacts {
archives sourcesJar
}

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += ['-Xuse-experimental=kotlin.time.ExperimentalTime',
'-Xuse-experimental=kotlin.ExperimentalUnsignedTypes',
'-Xuse-experimental=kotlinx.serialization.ImplicitReflectionSerializer',
'-Xuse-experimental=kotlinx.serialization.UnstableDefault']
}
}

compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += ['-Xuse-experimental=kotlin.time.ExperimentalTime',
'-Xuse-experimental=kotlin.ExperimentalUnsignedTypes',
'-Xuse-experimental=kotlinx.serialization.ImplicitReflectionSerializer',
'-Xuse-experimental=kotlinx.serialization.UnstableDefault']
}
}

test {
useJUnitPlatform()

testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat "full"
showStandardStreams = true
}
}
}
39 changes: 1 addition & 38 deletions etcd-recipe-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,6 @@

description = 'etcd-recipe-examples'

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
implementation project(':etcd-recipes')

implementation libraries.stdlib
implementation libraries.reflect
implementation libraries.serialization

implementation libraries.jetcd
implementation libraries.core_utils
implementation libraries.guava_utils
implementation libraries.guava

implementation libraries.logging
implementation libraries.slf4j_simple

testImplementation libraries.kluent
testImplementation libraries.jupiter_api
testRuntimeOnly libraries.jupiter_engine
}

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += ['-Xuse-experimental=kotlin.time.ExperimentalTime',
'-Xuse-experimental=kotlinx.serialization.ImplicitReflectionSerializer',
'-Xuse-experimental=kotlinx.serialization.UnstableDefault']
}
implementation project(':etcd-recipes')
}

compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += ['-Xuse-experimental=kotlin.time.ExperimentalTime',
'-Xuse-experimental=kotlinx.serialization.ImplicitReflectionSerializer',
'-Xuse-experimental=kotlinx.serialization.UnstableDefault']
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.ClientUtils.connectToEtcd;
import static java.lang.String.format;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.ClientUtils.connectToEtcd;
import static io.etcd.recipes.common.KVUtils.getValue;
import static io.etcd.recipes.common.KVUtils.putValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.ByteSequenceUtils.getAsString;
import static io.etcd.recipes.common.ClientUtils.connectToEtcd;
import static io.etcd.recipes.common.KVUtils.putValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.ClientUtils.connectToEtcd;
import static io.etcd.recipes.common.KeepAliveUtils.putValueWithKeepAlive;
import static io.etcd.recipes.common.WatchUtils.getKeyAsString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.BuilderUtils.putOption;
import static io.etcd.recipes.common.ClientUtils.connectToEtcd;
import static io.etcd.recipes.common.KVUtils.getValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import java.util.List;

import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.BuilderUtils.watchOption;
import static io.etcd.recipes.common.ByteSequenceUtils.getAsByteSequence;
import static io.etcd.recipes.common.ChildrenUtils.getChildCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.ClientUtils.connectToEtcd;
import static io.etcd.recipes.examples.discovery.ServiceDiscoveryExample.urls;
import static java.lang.String.format;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import java.util.List;

import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.ClientUtils.connectToEtcd;

public class ServiceDiscoveryExample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

import java.util.List;

import static com.github.pambrose.common.util.JavaFuncs.random;
import static com.github.pambrose.common.util.JavaFuncs.sleepSecs;
import static com.github.pambrose.common.util.MiscJavaFuncs.random;
import static com.github.pambrose.common.util.MiscJavaFuncs.sleepSecs;
import static io.etcd.recipes.common.ClientUtils.connectToEtcd;
import static java.lang.String.format;

Expand Down
Loading

0 comments on commit 21faedc

Please sign in to comment.