Skip to content

Commit

Permalink
Updated Gradle and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
blootsvoets committed Jul 24, 2018
1 parent 18e0a4e commit 4994171
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 99 deletions.
61 changes: 28 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
// Apply the java plugin to add support for Java
id 'java'
id 'application'
id 'com.jfrog.bintray' version '1.7.3' apply false
id 'com.jfrog.bintray' version '1.8.1' apply false

}

Expand All @@ -13,39 +13,40 @@ plugins {
group = 'org.radarcns'
version = '0.3.1-SNAPSHOT'

ext.description = 'Kafka backend for processing device data.'

mainClassName = 'org.radarcns.RadarBackend'
applicationDefaultJvmArgs = ["-Dlog4j.configuration=log4j.properties"]

ext.githubRepoName = 'RADAR-CNS/RADAR-Backend'

targetCompatibility = '1.8'
sourceCompatibility = '1.8'

ext.boundaryVersion = '1.0.6'
ext.codacyVersion = '1.0.10'
ext.confluentVersion = '4.1.0'
ext.hamcrestVersion = '1.3'
ext.kafkaVersion = '1.1.0'
ext.jacksonVersion='2.8.5'
ext.javaMailVersion = '1.5.6'
ext.junitVersion = '4.12'
ext.mathVersion = '3.0'
ext.findbugVersion = '3.0.1'
ext.commonsCliVersion = '1.2'
ext.mockitoVersion = '2.2.29'
ext.radarCommonsVersion = '0.8.2'
ext.radarSchemasVersion = '0.3.2'
ext.subethamailVersion = '3.1.7'
ext.jsoupVersion = '1.10.2'
ext.slf4jVersion = '1.7.25'
ext.log4jVersion = '1.2.17'
ext.avroVersion = '1.8.2'

ext.githubUrl = 'https://github.com/' + githubRepoName + '.git'
ext.issueUrl = 'https://github.com/' + githubRepoName + '/issues'
ext.website = 'http://radar-cns.org'
ext {
moduleDescription = 'Kafka backend for processing device data.'
githubRepoName = 'RADAR-Base/RADAR-Backend'


githubUrl = 'https://github.com/' + githubRepoName + '.git'
issueUrl = 'https://github.com/' + githubRepoName + '/issues'
website = 'http://radar-base.org'

codacyVersion = '4.0.2'
confluentVersion = '4.1.1'
hamcrestVersion = '1.3'
kafkaVersion = '1.1.1-cp1'
jacksonVersion = '2.9.6'
javaMailVersion = '1.6.1'
junitVersion = '4.12'
findbugVersion = '3.0.2'
commonsCliVersion = '1.4'
mockitoVersion = '2.19.1'
radarCommonsVersion = '0.9.0'
radarSchemasVersion = '0.3.4'
subethamailVersion = '3.1.7'
jsoupVersion = '1.11.3'
slf4jVersion = '1.7.25'
log4jVersion = '1.2.17'
avroVersion = '1.8.2'
}

//---------------------------------------------------------------------------//
// Sources and classpath configurations //
Expand Down Expand Up @@ -100,12 +101,6 @@ dependencies {
runtimeOnly group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jVersion
}

run {
if ( project.hasProperty("appArgs") ) {
args Eval.me(appArgs)
}
}

if (!hasProperty('profile')) {
ext.profile = 'dev'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/codacy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jacocoTestReport {
task sendCoverageToCodacy(type: JavaExec, dependsOn: jacocoTestReport) {
main = 'com.codacy.CodacyCoverageReporter'
classpath = configurations.codacy
args = ['-l', 'Java', '-r', "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"]
args = ['report', '-l', 'Java', '-r', "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"]
}
103 changes: 42 additions & 61 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
@@ -1,48 +1,6 @@
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

def 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 'nivemaham'
name 'Nivethika Mahasivam'
email 'nivethika@thehyve.nl'
organization 'The Hyve'
}
developer {
id 'fnobilia'
name 'Francesco Nobilia'
email 'francesco.nobilia@kcl.ac.uk'
organization 'King\'s College London'
}
developer {
id 'blootsvoets'
name 'Joris Borgdorff'
email 'joris@thehyve.nl'
organization 'The Hyve'
}
}
issueManagement {
system 'GitHub'
url issueUrl
}
organization {
name 'RADAR-CNS'
url website
}
scm {
connection 'scm:git:' + githubUrl
url githubUrl
}
}

ext.sharedManifest = manifest {
attributes(
"Implementation-Title": rootProject.name,
Expand Down Expand Up @@ -89,39 +47,62 @@ artifacts {

publishing {
publications {
RadarBackendPublication(MavenPublication) {
mavenJar(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.dependencies.'*'.findAll() {
it.artifactId.text() in ['log4j', 'slf4j-log4j12']
}.each() {
it.parent().remove(it)
pom {
description = moduleDescription
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 = 'joris@thehyve.nl'
organization = 'The Hyve'
}
developer {
id = 'nivemaham'
name = 'Nivethika Mahasivam'
email = 'nivethika@thehyve.nl'
organization = 'The Hyve'
}
}
issueManagement {
system = 'GitHub'
url = issueUrl
}
organization {
name = 'RADAR-Base'
url = website
}
scm {
connection = 'scm:git:' + githubUrl
url = githubUrl
}
root.children().last() + pomConfig
}
}
}
}

bintray {
user System.getenv('BINTRAY_USER')? System.getenv('BINTRAY_USER') : project.property('bintrayUser')
key System.getenv('BINTRAY_API_KEY') ? System.getenv('BINTRAY_API_KEY') : project.property('bintrayApiKey')
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 'RadarBackendPublication'
publications 'mavenJar'
pkg {
repo = project.group
name = rootProject.name
userOrg = 'radar-cns'
desc = description
desc = moduleDescription
licenses = ['Apache-2.0']
websiteUrl = website
issueTrackerUrl = issueUrl
Expand All @@ -130,7 +111,7 @@ bintray {
githubReleaseNotesFile = 'README.md'
version {
name = project.version
desc = description
desc = moduleDescription
vcsTag = System.getenv('TRAVIS_TAG')
released = new Date()
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/utilities.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ idea {
}
}

task wrapper(type: Wrapper) {
gradleVersion '4.4'
wrapper {
gradleVersion '4.9'
}

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.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rootProject.name = 'radar-backend'
rootProject.name = 'radar-backend'
enableFeaturePreview('STABLE_PUBLISHING')

0 comments on commit 4994171

Please sign in to comment.