Skip to content

Commit

Permalink
Merge pull request #255 from RADAR-base/release-0.5.16
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
mpgxvii authored Apr 8, 2021
2 parents 134b0f2 + 35bda48 commit 118ffe9
Show file tree
Hide file tree
Showing 66 changed files with 680 additions and 422 deletions.
10 changes: 6 additions & 4 deletions java-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# RADAR Schemas Java SDK

The Java SDKs are published as JARs on bintray. To use them in Gradle, add the following code to your `build.gradle`:
The Java SDKs are published as JARs on Maven Central. To use them in Gradle, add the following code to your `build.gradle`:

```gradle
repositories {
maven { url 'http://dl.bintray.com/radar-cns/org.radarcns' }
mavenCentral()
maven { url 'https://packages.confluent.io/maven/' }
maven { url "https://jitpack.io" }
}
dependencies {
// Commons schemas (backend, passive remote monitoring app)
compile 'org.radarcns:radar-schemas-commons:0.5.13'
compile 'org.radarcns:radar-schemas-commons:<release version>'
// Questionnaire schemas (active remote monitoring app)
compile 'org.radarcns:radar-schemas-tools:0.5.13'
compile 'org.radarcns:radar-schemas-tools:<release version>'
}
```
Usually, you only need to include the schemas you actually need in your dependencies.
Expand Down
71 changes: 3 additions & 68 deletions java-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@

plugins {
id 'com.commercehub.gradle.plugin.avro-base' version '0.19.1'
id 'com.jfrog.bintray' version '1.8.5' apply false
id 'com.jfrog.artifactory' version '4.15.2' apply false
}

subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.commercehub.gradle.plugin.avro-base'
apply plugin: 'maven-publish'
apply plugin: 'idea'

// Configuration
version = '0.5.15'
group = 'org.radarcns'
version = '0.6.0'
group = 'org.radarbase'
ext.githubRepoName = 'RADAR-base/RADAR-Schemas'

ext.avroVersion = '1.9.2'

ext.githubUrl = "https://github.com/${githubRepoName}.git"
ext.issueUrl = "https://github.com/${githubRepoName}/issues"
ext.website = 'http://radar-cns.org'
ext.website = 'http://radar-base.org'

targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -41,68 +38,6 @@ subprojects {
}
}

// publishing
ext.pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution 'repo'
}
}
developers {
developer {
id 'blootsvoets'
name 'Joris Borgdorff'
email '[email protected]'
organization 'The Hyve'
}
developer {
id 'yatharthranjan'
name 'Yatharth Ranjan'
email '[email protected]'
organization 'King\'s College London'
}
}
issueManagement {
system 'GitHub'
url issueUrl
}
organization {
name 'RADAR-base'
url website
}
scm {
connection 'scm:git:' + githubUrl
url githubUrl
}
}
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) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
manifest.from sharedManifest
}

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

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

// Generated avro files
ext.avroOutputDir = file('src/generated/java')

Expand Down
100 changes: 100 additions & 0 deletions java-sdk/gradle/publishing.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
apply plugin: 'maven-publish'
apply plugin: 'signing'

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

jar {
manifest.from sharedManifest
}

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

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

assemble.dependsOn(javadocJar, sourcesJar)

publishing {
publications {
mavenJar(MavenPublication) { publication ->
from components.java
artifact sourcesJar
artifact javadocJar

pom {
name = project.name
description = project.description
url = githubUrl
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'blootsvoets'
name = 'Joris Borgdorff'
email = '[email protected]'
organization = 'The Hyve'
}
developer {
id = 'yatharthranjan'
name = 'Yatharth Ranjan'
email = '[email protected]'
organization = 'King\'s College London'
}
}
issueManagement {
system = 'GitHub'
url = githubUrl + '/issues'
}
organization {
name = 'RADAR-base'
url = website
}
scm {
connection = 'scm:git:' + githubUrl
url = githubUrl
}
}
}
}

repositories {
maven {
name = "OSSRH"
credentials {
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
}
}
}

signing {
useGpgCmd()
required { true }
sign(tasks["sourcesJar"], tasks["javadocJar"])
sign(publishing.publications["mavenJar"])
}

tasks.withType(Sign).configureEach {
onlyIf { gradle.taskGraph.hasTask("${project.path}:publish") }
}
66 changes: 4 additions & 62 deletions java-sdk/radar-schemas-commons/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
apply plugin: 'com.jfrog.artifactory'

ext.artifactName = 'radar-schemas-commons'
ext.description = 'RADAR Schemas Commons SDK'
description = 'RADAR Schemas Commons SDK'

sourceSets {
main {
Expand All @@ -10,8 +8,8 @@ sourceSets {
}

repositories {
jcenter()
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
mavenCentral()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
}

//---------------------------------------------------------------------------//
Expand All @@ -37,60 +35,4 @@ compileJava.dependsOn generateAvro
// Publishing //
//---------------------------------------------------------------------------//

publishing {
publications {
RadarCommonsPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
artifactId artifactName
pom.withXml {
def root = asNode()
root.appendNode('description', description)
root.appendNode('name', artifactName)
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 = artifactName
userOrg = 'radar-cns'
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')
}
apply from: "$rootDir/gradle/publishing.gradle"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.radarcns.schema;
package org.radarbase.schema;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Locale;

public enum Scope {
ACTIVE, KAFKA, CATALOGUE, MONITOR, PASSIVE, STREAM, CONNECTOR;
ACTIVE, KAFKA, CATALOGUE, MONITOR, PASSIVE, STREAM, CONNECTOR, PUSH;

private final String lower;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.radarcns.stream;
package org.radarbase.stream;

import java.util.concurrent.TimeUnit;
import org.radarcns.catalogue.TimeWindow;
Expand Down
Loading

0 comments on commit 118ffe9

Please sign in to comment.