From 2e73b1645475ec0ad892345fefb650c2b097f4d8 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Mon, 21 Nov 2016 13:46:30 +0000 Subject: [PATCH 1/3] Removed redundant configuration in samples that misled developers. Fixed the dependency on Cordformation plugin. --- build.gradle | 2 +- gradle-plugins/build.gradle | 6 +++++- gradle-plugins/publish-utils/build.gradle | 2 -- gradle-plugins/quasar-utils/build.gradle | 2 -- samples/attachment-demo/build.gradle | 17 ----------------- samples/irs-demo/build.gradle | 15 --------------- samples/network-visualiser/build.gradle | 13 ------------- samples/simm-valuation-demo/build.gradle | 13 ------------- samples/trader-demo/build.gradle | 15 --------------- 9 files changed, 6 insertions(+), 79 deletions(-) diff --git a/build.gradle b/build.gradle index 37c2ce53de..d81060bf8e 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ buildscript { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' classpath 'net.corda.plugins:publish-utils:0.5' classpath 'net.corda.plugins:quasar-utils:0.5' - classpath 'net.corda.plugins:cordformation:0.5' + classpath 'net.corda.plugins:cordformation:0.5.1' // Can run 'gradle dependencyUpdates' to find new versions of things. classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0' diff --git a/gradle-plugins/build.gradle b/gradle-plugins/build.gradle index c123d21948..ffc80eb9dd 100644 --- a/gradle-plugins/build.gradle +++ b/gradle-plugins/build.gradle @@ -20,7 +20,11 @@ apply plugin: 'maven-publish' allprojects { group 'net.corda' - version "$corda_published_version" + version "$corda_version" +} + +subprojects { + task(install, dependsOn: 'publishToMavenLocal') } // Aliasing the publishToMavenLocal for simplicity. diff --git a/gradle-plugins/publish-utils/build.gradle b/gradle-plugins/publish-utils/build.gradle index 9392af6ce4..04eef5b496 100644 --- a/gradle-plugins/publish-utils/build.gradle +++ b/gradle-plugins/publish-utils/build.gradle @@ -34,8 +34,6 @@ bintray { } } -task(install, dependsOn: 'publishToMavenLocal') - publishing { publications { publishUtils(MavenPublication) { diff --git a/gradle-plugins/quasar-utils/build.gradle b/gradle-plugins/quasar-utils/build.gradle index 1a90eca1c2..727f00d352 100644 --- a/gradle-plugins/quasar-utils/build.gradle +++ b/gradle-plugins/quasar-utils/build.gradle @@ -25,8 +25,6 @@ bintray { } } -task(install, dependsOn: 'publishToMavenLocal') - publishing { publications { quasarUtils(MavenPublication) { diff --git a/samples/attachment-demo/build.gradle b/samples/attachment-demo/build.gradle index 56a54e87a8..00c68b301c 100644 --- a/samples/attachment-demo/build.gradle +++ b/samples/attachment-demo/build.gradle @@ -1,20 +1,3 @@ -buildscript { - ext.corda_version = "0.6-SNAPSHOT" - - repositories { - mavenLocal() - mavenCentral() - jcenter() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "net.corda.plugins:quasar-utils:$corda_version" - classpath "net.corda.plugins:publish-utils:$corda_version" - classpath "net.corda.plugins:cordformation:$corda_version" - } -} - apply plugin: 'java' apply plugin: 'kotlin' apply plugin: 'idea' diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index b0e4283c84..3245933e9c 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -1,18 +1,3 @@ -buildscript { - repositories { - mavenLocal() - mavenCentral() - jcenter() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "net.corda.plugins:quasar-utils:$corda_version" - classpath "net.corda.plugins:publish-utils:$corda_version" - classpath "net.corda.plugins:cordformation:$corda_version" - } -} - apply plugin: 'java' apply plugin: 'kotlin' apply plugin: 'idea' diff --git a/samples/network-visualiser/build.gradle b/samples/network-visualiser/build.gradle index 7b493afc1a..b910a94b59 100644 --- a/samples/network-visualiser/build.gradle +++ b/samples/network-visualiser/build.gradle @@ -1,16 +1,3 @@ -buildscript { - repositories { - mavenLocal() - mavenCentral() - jcenter() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "net.corda.plugins:quasar-utils:$corda_version" - } -} - apply plugin: 'java' apply plugin: 'kotlin' apply plugin: 'idea' diff --git a/samples/simm-valuation-demo/build.gradle b/samples/simm-valuation-demo/build.gradle index 4ab0260310..4d602232c6 100644 --- a/samples/simm-valuation-demo/build.gradle +++ b/samples/simm-valuation-demo/build.gradle @@ -1,18 +1,5 @@ buildscript { ext.strata_version = '1.0.0' - - repositories { - mavenLocal() - mavenCentral() - jcenter() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "net.corda.plugins:quasar-utils:$corda_version" - classpath "net.corda.plugins:publish-utils:$corda_version" - classpath "net.corda.plugins:cordformation:$corda_version" - } } apply plugin: 'java' diff --git a/samples/trader-demo/build.gradle b/samples/trader-demo/build.gradle index 11503e7c30..e0dd34590c 100644 --- a/samples/trader-demo/build.gradle +++ b/samples/trader-demo/build.gradle @@ -1,18 +1,3 @@ -buildscript { - repositories { - mavenLocal() - mavenCentral() - jcenter() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "net.corda.plugins:quasar-utils:$corda_version" - classpath "net.corda.plugins:publish-utils:$corda_version" - classpath "net.corda.plugins:cordformation:$corda_version" - } -} - apply plugin: 'java' apply plugin: 'kotlin' apply plugin: 'idea' From 1f81ac2cc07a01cfd68ec6933f1d6d4dc4b7bbc0 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Mon, 21 Nov 2016 13:47:54 +0000 Subject: [PATCH 2/3] Fixed an exception caused when quasar plugin runs on root. --- .../groovy/net/corda/plugins/QuasarPlugin.groovy | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gradle-plugins/quasar-utils/src/main/groovy/net/corda/plugins/QuasarPlugin.groovy b/gradle-plugins/quasar-utils/src/main/groovy/net/corda/plugins/QuasarPlugin.groovy index 852ff69b25..d8200cef7b 100644 --- a/gradle-plugins/quasar-utils/src/main/groovy/net/corda/plugins/QuasarPlugin.groovy +++ b/gradle-plugins/quasar-utils/src/main/groovy/net/corda/plugins/QuasarPlugin.groovy @@ -46,13 +46,14 @@ class QuasarPlugin implements Plugin { ant.taskdef(name:'scanSuspendables', classname:'co.paralleluniverse.fibers.instrument.SuspendablesScanner', classpath: "${project.sourceSets.main.output.classesDir}:${project.sourceSets.main.output.resourcesDir}:${project.configurations.runtime.asPath}") project.delete "$project.sourceSets.main.output.resourcesDir/META-INF/suspendables", "$project.sourceSets.main.output.resourcesDir/META-INF/suspendable-supers" - ant.scanSuspendables( - auto:false, - suspendablesFile: "$project.sourceSets.main.output.resourcesDir/META-INF/suspendables", - supersFile: "$project.sourceSets.main.output.resourcesDir/META-INF/suspendable-supers") { - fileset(dir: project.sourceSets.main.output.classesDir) + if(project.sourceSets.main.output.classesDir.exists()) { + ant.scanSuspendables( + auto:false, + suspendablesFile: "$project.sourceSets.main.output.resourcesDir/META-INF/suspendables", + supersFile: "$project.sourceSets.main.output.resourcesDir/META-INF/suspendable-supers") { + fileset(dir: project.sourceSets.main.output.classesDir) + } } - } project.jar.dependsOn project.quasarScan From 38f7a10b627ae943ad63f15bdd85704a79cc0e76 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Mon, 21 Nov 2016 13:49:04 +0000 Subject: [PATCH 3/3] Updated quasar utils to newest version. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d81060bf8e..8fc19d166c 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ buildscript { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' classpath 'net.corda.plugins:publish-utils:0.5' - classpath 'net.corda.plugins:quasar-utils:0.5' + classpath 'net.corda.plugins:quasar-utils:0.5.1' classpath 'net.corda.plugins:cordformation:0.5.1' // Can run 'gradle dependencyUpdates' to find new versions of things.