From 119d00c384e6829ec4e59eb96131750b03947a8c Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 3 Jan 2017 15:15:23 +0100 Subject: [PATCH] Upgrade dependencies and centralise some more version numbers in the root gradle file --- build.gradle | 36 +++++++++++++++-------- buildSrc/build.gradle | 3 +- client/build.gradle | 8 ++--- core/build.gradle | 17 ++++++----- docs/source/example-code/build.gradle | 2 +- experimental/build.gradle | 2 +- experimental/sandbox/build.gradle | 4 +-- finance/build.gradle | 4 +-- gradle-plugins/build.gradle | 4 +-- gradle-plugins/cordformation/build.gradle | 3 +- gradle-plugins/quasar-utils/build.gradle | 2 +- node/build.gradle | 29 +++++++++--------- node/capsule/build.gradle | 2 +- samples/attachment-demo/build.gradle | 4 +-- samples/bank-of-corda-demo/build.gradle | 4 +-- samples/irs-demo/build.gradle | 6 ++-- samples/network-visualiser/build.gradle | 4 +-- samples/raft-notary-demo/build.gradle | 2 +- samples/simm-valuation-demo/build.gradle | 4 +-- samples/trader-demo/build.gradle | 4 +-- test-utils/build.gradle | 8 ++--- tools/explorer/build.gradle | 8 ++--- tools/loadtest/build.gradle | 3 +- 23 files changed, 89 insertions(+), 74 deletions(-) diff --git a/build.gradle b/build.gradle index b619f77eee..1cd1c535cb 100644 --- a/build.gradle +++ b/build.gradle @@ -6,17 +6,29 @@ buildscript { // Our version: bump this on release. ext.corda_version = "0.7-SNAPSHOT" ext.gradle_plugins_version = props.getProperty("gradlePluginsVersion") + + // Dependency versions. Can run 'gradle dependencyUpdates' to find new versions of things. + // + // TODO: Sort this alphabetically. ext.kotlin_version = '1.0.5-2' - ext.quasar_version = '0.7.6' + ext.quasar_version = '0.7.6' // TODO: Upgrade to 0.7.7+ when Quasar bug 238 is resolved. ext.asm_version = '0.5.3' - ext.artemis_version = '1.4.0' - ext.jackson_version = '2.8.0.rc2' + ext.artemis_version = '1.5.1' + ext.jackson_version = '2.8.5' ext.jetty_version = '9.3.9.v20160517' - ext.jersey_version = '2.23.1' - ext.jolokia_version = '2.0.0-M1' - ext.assertj_version = '3.5.1' - ext.log4j_version = '2.6.2' - ext.bouncycastle_version = '1.54' + ext.jersey_version = '2.25' + ext.jolokia_version = '2.0.0-M3' + ext.assertj_version = '3.6.1' + ext.log4j_version = '2.7' + ext.bouncycastle_version = '1.56' + ext.guava_version = '19.0' + ext.quickcheck_version = '0.7' + ext.okhttp_version = '3.5.0' + ext.typesafe_config_version = '1.3.1' + ext.junit_version = '4.12' + ext.jopt_simple_version = '5.0.2' + ext.jansi_version = '1.14' + ext.hibernate_version = '5.2.6.Final' repositories { mavenLocal() @@ -33,9 +45,7 @@ buildscript { classpath "net.corda.plugins:publish-utils:$gradle_plugins_version" classpath "net.corda.plugins:quasar-utils:$gradle_plugins_version" classpath "net.corda.plugins:cordformation:$gradle_plugins_version" - - // Can run 'gradle dependencyUpdates' to find new versions of things. - classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0' + classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0' } } @@ -95,7 +105,7 @@ repositories { // Required for building out the fat JAR. dependencies { compile project(':node') - compile "com.google.guava:guava:19.0" + compile "com.google.guava:guava:$guava_version" runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') } @@ -177,4 +187,4 @@ bintrayConfig { name = 'R3' email = 'dev@corda.net' } -} \ No newline at end of file +} diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 225d2b829e..fb34bb0911 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -5,5 +5,6 @@ repositories { } dependencies { - compile "com.google.guava:guava:19.0" + // Cannot use ext.guava_version here :( + compile "com.google.guava:guava:20.0" } diff --git a/client/build.gradle b/client/build.gradle index 1748bef18d..4878aede15 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -51,7 +51,7 @@ dependencies { compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}" compile "org.apache.logging.log4j:log4j-core:${log4j_version}" - compile "com.google.guava:guava:19.0" + compile "com.google.guava:guava:$guava_version" // ReactFX: Functional reactive UI programming. compile 'org.reactfx:reactfx:2.0-M5' @@ -61,16 +61,16 @@ dependencies { compile "org.apache.activemq:artemis-core-client:${artemis_version}" // Unit testing helpers. - testCompile 'junit:junit:4.12' + testCompile "junit:junit:$junit_version" testCompile "org.assertj:assertj-core:${assertj_version}" testCompile project(':test-utils') // Integration test helpers - integrationTestCompile 'junit:junit:4.12' + integrationTestCompile "junit:junit:$junit_version" } task integrationTest(type: Test) { testClassesDir = sourceSets.integrationTest.output.classesDir classpath = sourceSets.integrationTest.runtimeClasspath -} \ No newline at end of file +} diff --git a/core/build.gradle b/core/build.gradle index 2265ea4402..f437155d1e 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -31,11 +31,11 @@ sourceSets { } dependencies { - testCompile 'junit:junit:4.12' + testCompile "junit:junit:$junit_version" testCompile "commons-fileupload:commons-fileupload:1.3.2" // Guava: Google test library (collections test suite) - testCompile "com.google.guava:guava-testlib:19.0" + testCompile "com.google.guava:guava-testlib:$guava_version" // Bring in the MockNode infrastructure for writing protocol unit tests. testCompile project(":node") @@ -43,7 +43,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "org.jetbrains.kotlinx:kotlinx-support-jdk8:0.2" + compile "org.jetbrains.kotlinx:kotlinx-support-jdk8:0.3" compile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" // Thread safety annotations @@ -56,18 +56,19 @@ dependencies { // AssertJ: for fluent assertions for testing testCompile "org.assertj:assertj-core:${assertj_version}" - compile 'com.pholser:junit-quickcheck-core:0.6' - compile 'com.pholser:junit-quickcheck-generators:0.6' + compile "com.pholser:junit-quickcheck-core:$quickcheck_version" + compile "com.pholser:junit-quickcheck-generators:$quickcheck_version" // Guava: Google utilities library. - compile "com.google.guava:guava:19.0" + compile "com.google.guava:guava:$guava_version" // RxJava: observable streams of events. + // TODO: We can't upgrade past 1.1.6 due to a behaviour change in RxJava breaking our code. See PR #99 for discussion. Resolve. compile "io.reactivex:rxjava:1.1.6" // Kryo: object graph serialization. compile "com.esotericsoftware:kryo:4.0.0" - compile "de.javakaffee:kryo-serializers:0.38" + compile "de.javakaffee:kryo-serializers:0.41" // Apache JEXL: An embeddable expression evaluation library. // This may be temporary until we experiment with other ways to do on-the-fly contract specialisation via an API. @@ -88,4 +89,4 @@ dependencies { // RS API: Response type and codes for ApiUtils. compile "javax.ws.rs:javax.ws.rs-api:2.0" -} \ No newline at end of file +} diff --git a/docs/source/example-code/build.gradle b/docs/source/example-code/build.gradle index 9bc0aeb012..a650f2fa40 100644 --- a/docs/source/example-code/build.gradle +++ b/docs/source/example-code/build.gradle @@ -98,4 +98,4 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) { 'permissions' : ["StartFlow.net.corda.flows.CashFlow"]] ] } -} \ No newline at end of file +} diff --git a/experimental/build.gradle b/experimental/build.gradle index e76a5c995c..8c55819c4d 100644 --- a/experimental/build.gradle +++ b/experimental/build.gradle @@ -28,6 +28,6 @@ dependencies { compile project(':core') compile project(':finance') - testCompile 'junit:junit:4.12' + testCompile "junit:junit:$junit_version" testCompile project(':test-utils') } diff --git a/experimental/sandbox/build.gradle b/experimental/sandbox/build.gradle index 5f2bcd6ffc..5965890f85 100644 --- a/experimental/sandbox/build.gradle +++ b/experimental/sandbox/build.gradle @@ -22,10 +22,10 @@ dependencies { compile "org.ow2.asm:asm-commons:$asm_version" // JOptSimple: command line option parsing - compile "net.sf.jopt-simple:jopt-simple:5.0.1" + compile "net.sf.jopt-simple:jopt-simple:$jopt_simple_version" // Simple Logging Facade: makes the code independent of the chosen logging framework. compile "org.slf4j:slf4j-api:1.7.21" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" } diff --git a/finance/build.gradle b/finance/build.gradle index 656e4e0b1a..4445138d1d 100644 --- a/finance/build.gradle +++ b/finance/build.gradle @@ -21,7 +21,7 @@ dependencies { compile project(':core') testCompile project(':test-utils') - testCompile 'junit:junit:4.12' + testCompile "junit:junit:$junit_version" } sourceSets { @@ -30,4 +30,4 @@ sourceSets { srcDir "../config/test" } } -} \ No newline at end of file +} diff --git a/gradle-plugins/build.gradle b/gradle-plugins/build.gradle index f961d7f4e0..ec25663802 100644 --- a/gradle-plugins/build.gradle +++ b/gradle-plugins/build.gradle @@ -16,7 +16,7 @@ buildscript { dependencies { classpath "net.corda.plugins:publish-utils:$gradle_plugins_version" - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' } } @@ -48,4 +48,4 @@ bintrayConfig { name = 'R3' email = 'dev@corda.net' } -} \ No newline at end of file +} diff --git a/gradle-plugins/cordformation/build.gradle b/gradle-plugins/cordformation/build.gradle index 80b92a58dc..57123ce702 100644 --- a/gradle-plugins/cordformation/build.gradle +++ b/gradle-plugins/cordformation/build.gradle @@ -11,6 +11,7 @@ dependencies { compile gradleApi() compile localGroovy() - compile "com.typesafe:config:1.3.0" + // TypeSafe Config: for simple and human friendly config files. + compile "com.typesafe:config:$typesafe_config_version" } diff --git a/gradle-plugins/quasar-utils/build.gradle b/gradle-plugins/quasar-utils/build.gradle index ad4a10ecff..e4bba19bcf 100644 --- a/gradle-plugins/quasar-utils/build.gradle +++ b/gradle-plugins/quasar-utils/build.gradle @@ -11,4 +11,4 @@ repositories { dependencies { compile gradleApi() compile localGroovy() -} \ No newline at end of file +} diff --git a/node/build.gradle b/node/build.gradle index 7e39c1b5e6..b917a63935 100644 --- a/node/build.gradle +++ b/node/build.gradle @@ -66,10 +66,10 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" - compile "com.google.guava:guava:19.0" + compile "com.google.guava:guava:$guava_version" // JOpt: for command line flags. - compile "net.sf.jopt-simple:jopt-simple:5.0.2" + compile "net.sf.jopt-simple:jopt-simple:$jopt_simple_version" // Artemis: for reliable p2p message queues. compile "org.apache.activemq:artemis-server:${artemis_version}" @@ -77,7 +77,7 @@ dependencies { runtime "org.apache.activemq:artemis-amqp-protocol:${artemis_version}" // JAnsi: for drawing things to the terminal in nicely coloured ways. - compile "org.fusesource.jansi:jansi:1.13" + compile "org.fusesource.jansi:jansi:$jansi_version" // GraphStream: For visualisation testCompile "org.graphstream:gs-core:1.3" @@ -95,7 +95,7 @@ dependencies { compile "org.eclipse.jetty:jetty-servlet:${jetty_version}" compile "org.eclipse.jetty:jetty-webapp:${jetty_version}" compile "javax.servlet:javax.servlet-api:3.1.0" - compile "org.jolokia:jolokia-agent-war:2.0.0-M1" + compile "org.jolokia:jolokia-agent-war:$jolokia_version" compile "commons-fileupload:commons-fileupload:1.3.2" // Jersey for JAX-RS implementation for use in Jetty @@ -121,26 +121,27 @@ dependencies { compile "com.google.jimfs:jimfs:1.1" // TypeSafe Config: for simple and human friendly config files. - compile "com.typesafe:config:1.3.0" + compile "com.typesafe:config:$typesafe_config_version" // Unit testing helpers. - testCompile 'junit:junit:4.12' + testCompile "junit:junit:$junit_version" testCompile "org.assertj:assertj-core:${assertj_version}" - testCompile 'com.pholser:junit-quickcheck-core:0.6' + testCompile "com.pholser:junit-quickcheck-core:$quickcheck_version" // For H2 database support in persistence - compile "com.h2database:h2:1.4.192" + compile "com.h2database:h2:1.4.193" // Exposed: Kotlin SQL library - under evaluation + // TODO: Upgrade to Exposed 0.7 (has API changes) compile "org.jetbrains.exposed:exposed:0.5.0" // SQL connection pooling library - compile "com.zaxxer:HikariCP:2.4.7" + compile "com.zaxxer:HikariCP:2.5.1" // Hibernate: an object relational mapper for writing state objects to the database automatically. - compile "org.hibernate:hibernate-core:5.2.2.Final" - compile "org.hibernate:hibernate-java8:5.2.2.Final" + compile "org.hibernate:hibernate-core:$hibernate_version" + compile "org.hibernate:hibernate-java8:$hibernate_version" // Capsule is a library for building independently executable fat JARs. compile 'co.paralleluniverse:capsule:1.0.3' @@ -151,12 +152,12 @@ dependencies { compile 'io.atomix.catalyst:catalyst-netty:1.1.1' // Integration test helpers - integrationTestCompile 'junit:junit:4.12' + integrationTestCompile "junit:junit:$junit_version" - testCompile "com.nhaarman:mockito-kotlin:0.6.1" + testCompile "com.nhaarman:mockito-kotlin:1.1.0" } task integrationTest(type: Test) { testClassesDir = sourceSets.integrationTest.output.classesDir classpath = sourceSets.integrationTest.runtimeClasspath -} \ No newline at end of file +} diff --git a/node/capsule/build.gradle b/node/capsule/build.gradle index 33bd23f51e..52e5e91e11 100644 --- a/node/capsule/build.gradle +++ b/node/capsule/build.gradle @@ -80,4 +80,4 @@ artifacts { publish { name = 'corda' disableDefaultJar = true -} \ No newline at end of file +} diff --git a/samples/attachment-demo/build.gradle b/samples/attachment-demo/build.gradle index 5c80cc3649..860c0f6aad 100644 --- a/samples/attachment-demo/build.gradle +++ b/samples/attachment-demo/build.gradle @@ -42,7 +42,7 @@ configurations { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" // Corda integration dependencies runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') @@ -127,4 +127,4 @@ task runRecipient(type: JavaExec) { main = 'net.corda.attachmentdemo.AttachmentDemoKt' args '--role' args 'RECIPIENT' -} \ No newline at end of file +} diff --git a/samples/bank-of-corda-demo/build.gradle b/samples/bank-of-corda-demo/build.gradle index 2cb4dfae63..c9e3b021d8 100644 --- a/samples/bank-of-corda-demo/build.gradle +++ b/samples/bank-of-corda-demo/build.gradle @@ -42,7 +42,7 @@ configurations { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" // Corda integration dependencies runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') @@ -146,4 +146,4 @@ task runWebCashIssue(type: JavaExec) { args 30000 args '--currency' args 'GBP' -} \ No newline at end of file +} diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 85d30012fb..409eedb86a 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -45,7 +45,7 @@ configurations { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" // Corda integration dependencies runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') @@ -58,7 +58,7 @@ dependencies { // Cordapp dependencies // Specify your cordapp's dependencies below, including dependent cordapps - compile 'com.squareup.okhttp3:okhttp:3.3.1' + compile "com.squareup.okhttp3:okhttp:$okhttp_version" } task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) { @@ -118,4 +118,4 @@ publishing { artifact javadocJar } } -} \ No newline at end of file +} diff --git a/samples/network-visualiser/build.gradle b/samples/network-visualiser/build.gradle index d3db156d44..e259cd0c54 100644 --- a/samples/network-visualiser/build.gradle +++ b/samples/network-visualiser/build.gradle @@ -18,7 +18,7 @@ dependencies { compile project(':samples:irs-demo') compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" // Corda integration dependencies runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') @@ -52,4 +52,4 @@ task deployVisualiser(type: FatCapsule) { minJavaVersion = '1.8.0' javaAgents = [configurations.quasar.singleFile.name] } -} \ No newline at end of file +} diff --git a/samples/raft-notary-demo/build.gradle b/samples/raft-notary-demo/build.gradle index c0ed340679..0ec1fb3b49 100644 --- a/samples/raft-notary-demo/build.gradle +++ b/samples/raft-notary-demo/build.gradle @@ -42,7 +42,7 @@ configurations { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" // Corda integration dependencies runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') diff --git a/samples/simm-valuation-demo/build.gradle b/samples/simm-valuation-demo/build.gradle index 2463df37a0..daae6bb799 100644 --- a/samples/simm-valuation-demo/build.gradle +++ b/samples/simm-valuation-demo/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.strata_version = '1.0.0' + ext.strata_version = '1.1.2' } apply plugin: 'java' @@ -38,7 +38,7 @@ sourceSets { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" // Corda integration dependencies runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') diff --git a/samples/trader-demo/build.gradle b/samples/trader-demo/build.gradle index 766bbe2652..4d7c5ee1c3 100644 --- a/samples/trader-demo/build.gradle +++ b/samples/trader-demo/build.gradle @@ -42,7 +42,7 @@ configurations { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" // Corda integration dependencies runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') @@ -145,4 +145,4 @@ task runSeller(type: JavaExec) { main = 'net.corda.traderdemo.TraderDemoKt' args '--role' args 'SELLER' -} \ No newline at end of file +} diff --git a/test-utils/build.gradle b/test-utils/build.gradle index b220b3ce4b..0f2ffbe060 100644 --- a/test-utils/build.gradle +++ b/test-utils/build.gradle @@ -35,17 +35,17 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" - compile "com.google.guava:guava:19.0" + compile "com.google.guava:guava:$guava_version" // Force commons logging to version 1.2 to override Artemis, which pulls in 1.1.3 (ARTEMIS-424) compile "commons-logging:commons-logging:1.2" // Unit testing helpers. - compile 'junit:junit:4.12' + compile "junit:junit:$junit_version" // Guava: Google test library (collections test suite) compile "com.google.guava:guava-testlib:19.0" // OkHTTP: Simple HTTP library. - compile 'com.squareup.okhttp3:okhttp:3.3.1' -} \ No newline at end of file + compile "com.squareup.okhttp3:okhttp:$okhttp_version" +} diff --git a/tools/explorer/build.gradle b/tools/explorer/build.gradle index a34a09d4bb..d47b5e269d 100644 --- a/tools/explorer/build.gradle +++ b/tools/explorer/build.gradle @@ -45,10 +45,10 @@ repositories { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile group: 'junit', name: 'junit', version: '4.11' + testCompile "junit:junit:$junit_version" // TornadoFX: A lightweight Kotlin framework for working with JavaFX UI's. - compile 'no.tornado:tornadofx:1.5.7' + compile 'no.tornado:tornadofx:1.5.9' // Corda Core: Data structures and basic types needed to work with Corda. compile project(':core') @@ -57,7 +57,7 @@ dependencies { compile project(':finance') // FontAwesomeFX: The "FontAwesome" icon library. - compile 'de.jensd:fontawesomefx-fontawesome:4.6.1-2' + compile 'de.jensd:fontawesomefx-fontawesome:4.7.0' // ReactFX: Functional reactive UI programming. compile 'org.reactfx:reactfx:2.0-M5' @@ -86,4 +86,4 @@ task(runSimulationNodes, dependsOn: 'classes', type: JavaExec) { main = 'net.corda.explorer.MainKt' classpath = sourceSets.main.runtimeClasspath args '-S' -} \ No newline at end of file +} diff --git a/tools/loadtest/build.gradle b/tools/loadtest/build.gradle index e120c8413b..9f72c4e23b 100644 --- a/tools/loadtest/build.gradle +++ b/tools/loadtest/build.gradle @@ -35,7 +35,8 @@ dependencies { // https://mvnrepository.com/artifact/de.danielbechler/java-object-diff compile group: 'de.danielbechler', name: 'java-object-diff', version: '0.10.2' - compile "com.typesafe:config:1.3.0" + // TypeSafe Config: for simple and human friendly config files. + compile "com.typesafe:config:$typesafe_config_version" } run {