Skip to content

Commit

Permalink
Merge pull request #55 from RADAR-base/release-0.9.0
Browse files Browse the repository at this point in the history
Release 0.9.0
  • Loading branch information
blootsvoets authored Jul 3, 2018
2 parents a9acb95 + 3e8659c commit ce7c553
Show file tree
Hide file tree
Showing 72 changed files with 1,212 additions and 481 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ build/
/src/avroSources/java/

# Generated compile files
/out/
out/
backend.log
local.properties
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ deploy:
api_key: ${GH_TOKEN}
file_glob: true
file:
- "build/libs/*.jar"
- "testing/build/libs/*.jar"
- "*/build/libs/*.jar"
skip_cleanup: true
on:
tags: true
Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RADAR-Commons
[![Build Status](https://travis-ci.org/RADAR-CNS/radar-commons.svg?branch=master)](https://travis-ci.org/RADAR-CNS/radar-commons)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9fe7a419c83e4798af671e468c7e91cf)](https://www.codacy.com/app/RADAR-CNS/RADAR-Commons?utm_source=github.com&utm_medium=referral&utm_content=RADAR-CNS/RADAR-Commons&utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.org/RADAR-base/radar-commons.svg?branch=master)](https://travis-ci.org/RADAR-base/radar-commons)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9fe7a419c83e4798af671e468c7e91cf)](https://www.codacy.com/app/RADAR-base/radar-commons?utm_source=github.com&utm_medium=referral&utm_content=RADAR-base/radar-commons&utm_campaign=Badge_Grade)

Common utilities library containing basic schemas, streaming features, testing bridges and utils.

Expand All @@ -14,7 +14,14 @@ repositories {
}
dependencies {
compile group: 'org.radarcns', name: 'radar-commons', version: '0.8.2'
implementation group: 'org.radarcns', name: 'radar-commons', version: '0.9.0'
}
```

For server utilities, include `radar-commons-server`:
```gradle
dependencies {
implementation group: 'org.radarcns', name: 'radar-commons-server', version: '0.9.0'
}
```

Expand All @@ -26,7 +33,14 @@ repositories {
}
dependencies {
testCompile group: 'org.radarcns', name: 'radar-commons-testing', version: '0.8.2'
testImplementation group: 'org.radarcns', name: 'radar-commons-testing', version: '0.9.0'
}
```

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
dependencies {
runtimeOnly group: 'org.radarcns', name: 'radar-commons-unsafe', version: '0.9.0'
}
```

Expand Down
206 changes: 10 additions & 196 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

plugins {
// Get bintray version
id 'com.jfrog.bintray' version '1.8.0'
id 'com.jfrog.bintray' version '1.7.3'
id 'com.jfrog.artifactory' version '4.5.4'
}

allprojects {
subprojects {
// Apply the plugins
apply plugin: 'java'
apply plugin: 'java-library'
Expand All @@ -36,21 +36,21 @@ allprojects {
// Configuration //
//---------------------------------------------------------------------------//

version = '0.8.2'
version = '0.9.0'
group = 'org.radarcns'
ext.githubRepoName = 'RADAR-CNS/RADAR-Commons'

ext.slf4jVersion = '1.7.25'
ext.kafkaVersion = '0.11.0.1'
ext.kafkaVersion = '1.1.1-cp1'
ext.avroVersion = '1.8.2'
ext.confluentVersion = '3.3.1'
ext.jacksonVersion = '2.9.3'
ext.okhttpVersion = '3.9.1'
ext.confluentVersion = '4.1.1'
ext.jacksonVersion = '2.9.6'
ext.okhttpVersion = '3.10.0'
ext.junitVersion = '4.12'
ext.mockitoVersion = '2.13.0'
ext.hamcrestVersion = '1.3'
ext.codacyVersion = '2.0.1'
ext.radarSchemasVersion = '0.2.3'
ext.radarSchemasVersion = '0.3.4'
ext.orgJsonVersion = '20170516'

ext.githubUrl = 'https://github.com/' + githubRepoName + '.git'
Expand Down Expand Up @@ -178,192 +178,6 @@ allprojects {
}
}

targetCompatibility = '1.7'
sourceCompatibility = '1.7'

ext.description = 'RADAR Common utilities library containing streaming features and utils.'

//---------------------------------------------------------------------------//
// Sources and classpath configurations //
//---------------------------------------------------------------------------//

configurations {
codacy
}

configurations.compile {
resolutionStrategy.cacheChangingModulesFor 0, 'SECONDS'
}

// In this section you declare where to find the dependencies of your project
repositories {
maven { url 'https://jitpack.io' }
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
}

// In this section you declare the dependencies for your production and test code
dependencies {
api (group: 'org.apache.avro', name: 'avro', version: avroVersion) {
exclude group: 'org.xerial.snappy', module: 'snappy-java'
exclude group: 'com.thoughtworks.paranamer', module: 'paranamer'
exclude group: 'org.apache.commons', module: 'commons-compress'
exclude group: 'org.tukaani', module: 'xz'
}

// to implement producers and consumers
api group: 'org.apache.kafka', name: 'kafka-clients', version: kafkaVersion
api group: 'com.squareup.okhttp3', name: 'okhttp', version: okhttpVersion

// For POJO classes and ConfigLoader
implementation group: 'com.fasterxml.jackson.core' , name: 'jackson-databind' , version: jacksonVersion
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: jacksonVersion
implementation group: 'org.json', name: 'json', version: orgJsonVersion

// The production code uses the SLF4J logging API at compile time
implementation group: 'org.slf4j', name:'slf4j-api', version: slf4jVersion

// Direct producer uses KafkaAvroSerializer if initialized
testImplementation (group: 'io.confluent', name: 'kafka-avro-serializer', version: confluentVersion) {
exclude group: 'com.101tec'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
testImplementation group: 'org.radarcns', name: 'radar-schemas-commons', version: radarSchemasVersion
testImplementation group: 'junit', name: 'junit', version: junitVersion
testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: hamcrestVersion
testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: okhttpVersion
testRuntime group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion

codacy group: 'com.github.codacy', name: 'codacy-coverage-reporter', version: codacyVersion
}

//---------------------------------------------------------------------------//
// Testing //
//---------------------------------------------------------------------------//
checkstyle {
// ignore tests
sourceSets = [sourceSets.main]
}

pmd {
// ignore tests
sourceSets = [sourceSets.main]
}

jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled false
}
}

task downloadDependencies(type: Exec) {
configurations.testRuntime.files
configurations.codacy.files
configurations.jacocoAnt.files
commandLine 'echo', 'Downloaded all dependencies'
}

task sendCoverageToCodacy(type: JavaExec, dependsOn: jacocoTestReport) {
main = 'com.codacy.CodacyCoverageReporter'
classpath = configurations.codacy
args = ['-l', 'Java', '-r', "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"]
}

//---------------------------------------------------------------------------//
// Build system metadata //
//---------------------------------------------------------------------------//

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

jar {
manifest.from sharedManifest
}
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
manifest.from sharedManifest
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
manifest.from sharedManifest
}

// add javadoc/source jar tasks as artifacts
artifacts {
archives javadocJar
archives sourcesJar
}

publishing {
publications {
RadarCommonsPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId rootProject.name
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', description)
root.appendNode('name', rootProject.name)
root.appendNode('url', githubUrl)
root.children().last() + pomConfig
}
}
}
}

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 = ['RadarCommonsPublication']
pkg {
repo = project.group
name = rootProject.name
userOrg = 'radar-cns'
desc = description
licenses = ['Apache-2.0']
websiteUrl = website
issueTrackerUrl = issueUrl
vcsUrl = githubUrl
githubRepo = githubRepoName
githubReleaseNotesFile = 'README.md'
version {
name = project.version
desc = description
vcsTag = System.getenv('TRAVIS_TAG')
released = new Date()
}
}
}

artifactory {
contextUrl = 'https://oss.jfrog.org/artifactory'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
password = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
maven = true
}
}
}

artifactoryPublish {
publications('RadarCommonsPublication')
}

task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionType 'all'
wrapper {
gradleVersion '4.8'
}
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-4.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
Loading

0 comments on commit ce7c553

Please sign in to comment.