Skip to content

Commit

Permalink
Merge pull request #82 from RADAR-base/release-0.13.1
Browse files Browse the repository at this point in the history
Release 0.13.1
  • Loading branch information
blootsvoets committed Mar 16, 2021
2 parents 25b4308 + 03815cd commit 53a8bec
Show file tree
Hide file tree
Showing 19 changed files with 249 additions and 104 deletions.
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,3 @@ deploy:
skip_cleanup: true
on:
tags: true
- provider: script
script: ./gradlew publish
skip_cleanup: true
on:
branch: dev
- provider: script
script: ./gradlew bintrayUpload
skip_cleanup: true
on:
tags: true
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Add the RADAR-Commons library to your project with Gradle by updating your `buil

```gradle
repositories {
jcenter()
mavenCentral()
}
dependencies {
implementation group: 'org.radarbase', name: 'radar-commons', version: '0.13.0'
implementation group: 'org.radarbase', name: 'radar-commons', version: '0.13.1'
}
```

Expand Down Expand Up @@ -64,39 +64,37 @@ Note that this code above does not include any flows for registering a source wi
For server utilities, include `radar-commons-server`:
```gradle
repositories {
jcenter()
mavenCentral()
maven { url 'https://packages.confluent.io/maven/' }
}
dependencies {
implementation group: 'org.radarbase', name: 'radar-commons-server', version: '0.13.0'
implementation group: 'org.radarbase', name: 'radar-commons-server', version: '0.13.1'
}
```

For mocking clients of the RADAR-base infrastructure, use that 'radar-commons-testing' repository:

```gradle
repositories {
jcenter()
mavenCentral()
maven { url 'https://packages.confluent.io/maven/' }
maven { url 'https://dl.bintray.com/radar-base/org.radarbase' }
}
dependencies {
testImplementation group: 'org.radarbase', name: 'radar-commons-testing', version: '0.13.0'
testImplementation group: 'org.radarbase', name: 'radar-commons-testing', version: '0.13.1'
}
```

Finally, if the schema registry is losing old schemas and your code is not recovering, include `radar-commons-unsafe`. Ensure that it comes in the classpath before any Confluent code. This will override the Confluent Avro deserializer to recover from failure when a message with unknown schema ID is passed.
```gradle
repositories {
jcenter()
mavenCentral()
maven { url 'https://packages.confluent.io/maven/' }
maven { url 'https://dl.bintray.com/radar-base/org.radarbase' }
}
dependencies {
runtimeOnly group: 'org.radarbase', name: 'radar-commons-unsafe', version: '0.13.0'
runtimeOnly group: 'org.radarbase', name: 'radar-commons-unsafe', version: '0.13.1'
}
```

Expand All @@ -112,7 +110,7 @@ For latest code use `dev` branch. This is released on JFrog's OSS Artifactory. T

```gradle
repositories {
maven { url 'https://repo.thehyve.nl/content/repositories/snapshots' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
configurations.all {
Expand All @@ -121,7 +119,7 @@ configurations.all {
}
dependencies {
compile group: 'org.radarbase', name: 'radar-commons', version: '0.13.1-SNAPSHOT'
compile group: 'org.radarbase', name: 'radar-commons', version: '0.13.2-SNAPSHOT'
}
```

Expand Down
24 changes: 11 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/
plugins {
// Get bintray version
id 'com.jfrog.bintray' version '1.8.5' apply false
id 'com.commercehub.gradle.plugin.avro' version '0.19.1'
}

Expand All @@ -29,23 +27,23 @@ subprojects {
// Configuration //
//---------------------------------------------------------------------------//

version = '0.13.0'
version = '0.13.1'
group = 'org.radarbase'
ext.githubRepoName = 'RADAR-base/radar-commons'

ext.slf4jVersion = '1.7.30'
ext.kafkaVersion = '2.5.0'
ext.kafkaVersion = '2.7.0'
ext.avroVersion = '1.9.2'
ext.confluentVersion = '5.5.0'
ext.jacksonVersion = '2.11.0'
ext.jacksonYamlVersion = '2.11.0'
ext.okhttpVersion = '4.7.2'
ext.junitVersion = '4.13'
ext.mockitoVersion = '3.3.3'
ext.confluentVersion = '5.5.3'
ext.jacksonVersion = '2.12.1'
ext.jacksonYamlVersion = '2.12.1'
ext.okhttpVersion = '4.9.1'
ext.junitVersion = '4.13.2'
ext.mockitoVersion = '3.7.7'
ext.hamcrestVersion = '1.3'
ext.codacyVersion = '7.9.0'
ext.radarSchemasVersion = '0.5.9'
ext.orgJsonVersion = '20200518'
ext.radarSchemasVersion = '0.5.15'
ext.orgJsonVersion = '20201115'

ext.githubUrl = "https://github.com/$githubRepoName"
ext.issueUrl = "https://github.com/$githubRepoName/issues"
Expand Down Expand Up @@ -111,5 +109,5 @@ subprojects {
}

wrapper {
gradleVersion '6.3'
gradleVersion '6.8.3'
}
57 changes: 19 additions & 38 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'signing'

def sharedManifest = manifest {
attributes("Implementation-Title": project.name,
"Implementation-Version": version)
}

jar {
archiveBaseName.set(project.name)
manifest.from sharedManifest
}

// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
archiveBaseName.set(project.name)
archiveClassifier.set('sources')
from sourceSets.main.allSource
manifest.from sharedManifest
}

task javadocJar(type: Jar, dependsOn: javadoc) {
archiveBaseName.set(project.name)
archiveClassifier.set('javadoc')
from javadoc.destinationDir
manifest.from sharedManifest
}

ext.nexusRepoBase = 'https://repo.thehyve.nl/content/repositories'

// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
assemble.dependsOn(javadocJar, sourcesJar)

publishing {
publications {
Expand Down Expand Up @@ -80,40 +72,29 @@ publishing {
}
}
}

repositories {
maven {
def releasesRepoUrl = "$nexusRepoBase/releases"
def snapshotsRepoUrl = "$nexusRepoBase/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
name = "OSSRH"
credentials {
username = project.hasProperty('nexusUser') ? project.property('nexusUser') : System.getenv('NEXUS_USER')
password = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : System.getenv('NEXUS_PASSWORD')
username = project.hasProperty("ossrh.user") ? project.property("ossrh.user") : System.getenv("OSSRH_USER")
password = project.hasProperty("ossrh.password") ? project.property("ossrh.password") : System.getenv("OSSRH_PASSWORD")
}

def releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
def snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
url = version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
}
}
}

bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
override = false
publications 'mavenJar'
pkg {
repo = project.group
name = project.name
userOrg = 'radar-base'
desc = project.description
licenses = ['Apache-2.0']
websiteUrl = website
issueTrackerUrl = issueUrl
vcsUrl = githubUrl
githubRepo = githubRepoName
githubReleaseNotesFile = 'README.md'
version {
name = project.version
desc = project.description
vcsTag = System.getenv('TRAVIS_TAG')
released = new Date()
}
}
signing {
useGpgCmd()
required { true }
sign(tasks["sourcesJar"], tasks["javadocJar"])
sign(publishing.publications["mavenJar"])
}

tasks.withType(Sign).configureEach {
onlyIf { gradle.taskGraph.hasTask("${project.path}:publish") }
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand Down Expand Up @@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
Expand Down
22 changes: 4 additions & 18 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -64,28 +64,14 @@ echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
3 changes: 2 additions & 1 deletion radar-commons-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies {
api group: 'org.apache.avro', name: 'avro', version: avroVersion
api group: 'org.radarcns', name: 'radar-schemas-commons', version: radarSchemasVersion

implementation group: 'com.opencsv', name: 'opencsv', version: '5.2'
implementation group: 'com.opencsv', name: 'opencsv', version: '5.3'
implementation group: 'com.fasterxml.jackson.core' , name: 'jackson-databind' , version: jacksonVersion
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: kafkaVersion
implementation (group: 'io.confluent', name: 'kafka-avro-serializer', version: confluentVersion) {
Expand All @@ -59,6 +59,7 @@ dependencies {
// Direct producer uses KafkaAvroSerializer if initialized
testImplementation group: 'junit', name: 'junit', version: junitVersion
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: hamcrestVersion
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion
}

apply from: '../gradle/publishing.gradle'
Expand Down
2 changes: 2 additions & 0 deletions radar-commons-testing/mock/light.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
projectId,userId,sourceId,time,timeReceived,light
radar,d90c8b88-5793-438a-b27d-6c87580cc3d9,mock,1613658505.0,1613658505.1,1.0
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,11 @@ public void send() throws IOException {
throw new IOException("Failed to read CSV file", e);
}
}

@Override
public String toString() {
return "MockFileSender{"
+ "parser=" + parser
+ '}';
}
}
Loading

0 comments on commit 53a8bec

Please sign in to comment.