diff --git a/build.gradle b/build.gradle index 38672be2df..83d4522477 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,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.1' + classpath 'net.corda.plugins:quasar-utils:0.5.2' classpath 'net.corda.plugins:cordformation:0.5.3' // Can run 'gradle dependencyUpdates' to find new versions of things. @@ -119,7 +119,7 @@ tasks.withType(Test) { } // TODO: Move fat JAR building into node subproject. -task buildCordaJAR(type: FatCapsule, dependsOn: ['quasarScan', 'buildCertSigningRequestUtilityJAR']) { +task buildCordaJAR(type: FatCapsule, dependsOn: ['jar', 'buildCertSigningRequestUtilityJAR']) { applicationClass 'net.corda.node.MainKt' archiveName "corda-${corda_version}.jar" applicationSource = files(project.tasks.findByName('jar'), 'node/build/classes/main/CordaCaplet.class', 'config/dev/log4j2.xml') @@ -178,8 +178,6 @@ task deployNodes(dependsOn: 'buildCordaJAR') << { // TODO: Verify this works for gradle plugins. task(install, dependsOn: 'publishToMavenLocal') -quasarScan.dependsOn('classes', ':node:classes', ':core:classes', ':finance:classes') - publishing { publications { corda(MavenPublication) { diff --git a/client/build.gradle b/client/build.gradle index 87a3007edf..bf04cfe540 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -80,8 +80,6 @@ dependencies { integrationTestCompile 'junit:junit:4.12' } -quasarScan.dependsOn('classes', ':core:classes', ':finance:classes') - task integrationTest(type: Test) { testClassesDir = sourceSets.integrationTest.output.classesDir classpath = sourceSets.integrationTest.runtimeClasspath diff --git a/core/build.gradle b/core/build.gradle index 59311ed3a7..6f7cc5512d 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -100,6 +100,4 @@ publishing { artifact javadocJar } } -} - -quasarScan.dependsOn('classes') \ No newline at end of file +} \ No newline at end of file diff --git a/docs/source/creating-a-cordapp.rst b/docs/source/creating-a-cordapp.rst index 4a9ea9c8bf..cae637d740 100644 --- a/docs/source/creating-a-cordapp.rst +++ b/docs/source/creating-a-cordapp.rst @@ -178,9 +178,6 @@ To build against Corda and the plugins that cordapps use, update your build.grad ... your tasks ... - // Sets the classes for Quasar to scan. Loaded by the the quasar-utils plugin. - quasarScan.dependsOn('classes', ... your dependent subprojects...) - // Standard way to publish Cordapps to maven local with the maven-publish and publish-utils plugin. publishing { publications { diff --git a/gradle-plugins/quasar-utils/README.rst b/gradle-plugins/quasar-utils/README.rst index f542385326..481d8ec66b 100644 --- a/gradle-plugins/quasar-utils/README.rst +++ b/gradle-plugins/quasar-utils/README.rst @@ -1,16 +1,4 @@ Quasar Utils ============ -Quasar utilities adds several tasks and configuration that provide a default Quasar setup and removes some boilerplate. -One line must be added to your build.gradle once you apply this plugin: - -.. code-block:: text - - quasarScan.dependsOn('classes') - -If any sub-projects are added that this project depends on then add the gradle target for that project to the depends -on statement. eg: - -.. code-block:: text - - quasarScan.dependsOn('classes', 'subproject:subsubproject', ...) +Quasar utilities adds several tasks and configuration that provide a default Quasar setup and removes some boilerplate. \ No newline at end of file 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 d8200cef7b..0ed4fe5935 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 @@ -6,8 +6,7 @@ import org.gradle.api.tasks.testing.Test import org.gradle.api.tasks.JavaExec /** - * QuasarPlugin creates a "quasar" configuration, adds quasar as a dependency and creates a "quasarScan" task that scans - * for `@Suspendable`s in the code + * QuasarPlugin creates a "quasar" configuration and adds quasar as a dependency. */ class QuasarPlugin implements Plugin { void apply(Project project) { @@ -30,32 +29,5 @@ class QuasarPlugin implements Plugin { jvmArgs "-javaagent:${project.configurations.quasar.singleFile}" jvmArgs "-Dco.paralleluniverse.fibers.verifyInstrumentation" } - - project.task("quasarScan") { - inputs.files(project.sourceSets.main.output) - outputs.files( - "$project.sourceSets.main.output.resourcesDir/META-INF/suspendables", - "$project.sourceSets.main.output.resourcesDir/META-INF/suspendable-supers" - ) - } << { - - // These lines tell gradle to run the Quasar suspendables scanner to look for unannotated super methods - // that have @Suspendable sub implementations. These tend to cause NPEs and are not caught by the verifier - // NOTE: need to make sure the output isn't on the classpath or every other run it generates empty results, so - // we explicitly delete to avoid that happening. We also need to turn off what seems to be a spurious warning in the IDE - 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" - 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 } } diff --git a/node/build.gradle b/node/build.gradle index 913ae7d6da..b337adb429 100644 --- a/node/build.gradle +++ b/node/build.gradle @@ -159,8 +159,6 @@ dependencies { testCompile "com.nhaarman:mockito-kotlin:0.6.1" } -quasarScan.dependsOn('classes', ':core:classes', ':finance:classes') - task integrationTest(type: Test) { testClassesDir = sourceSets.integrationTest.output.classesDir classpath = sourceSets.integrationTest.runtimeClasspath diff --git a/node/src/test/kotlin/net/corda/node/utilities/ClockUtilsTest.kt b/node/src/test/kotlin/net/corda/node/utilities/ClockUtilsTest.kt index 1c90ade753..5f625b0b10 100644 --- a/node/src/test/kotlin/net/corda/node/utilities/ClockUtilsTest.kt +++ b/node/src/test/kotlin/net/corda/node/utilities/ClockUtilsTest.kt @@ -134,11 +134,6 @@ class ClockUtilsTest { } } - /** - * If this test seems to hang and throw an NPE, then likely that quasar suspendables scanner has not been - * run on core module (in IntelliJ, open gradle side tab and run: - * r3prototyping -> core -> Tasks -> other -> quasarScan - */ @Test @Suspendable fun `test waiting for a deadline with multiple clock advance and incomplete JDK8 future on Fibers`() { @@ -161,11 +156,6 @@ class ClockUtilsTest { assertFalse(future.get(), "Should have reached deadline") } - /** - * If this test seems to hang and throw an NPE, then likely that quasar suspendables scanner has not been - * run on core module (in IntelliJ, open gradle side tab and run: - * r3prototyping -> core -> Tasks -> other -> quasarScan - */ @Test @Suspendable fun `test waiting for a deadline with multiple clock advance and incomplete Guava future on Fibers`() { diff --git a/samples/attachment-demo/build.gradle b/samples/attachment-demo/build.gradle index 00c68b301c..e673ef9b60 100644 --- a/samples/attachment-demo/build.gradle +++ b/samples/attachment-demo/build.gradle @@ -105,8 +105,6 @@ idea { } } -quasarScan.dependsOn('classes') - publishing { publications { jarAndSources(MavenPublication) { diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 3245933e9c..8ec1c824a4 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -110,8 +110,6 @@ idea { } } -quasarScan.dependsOn('classes') - publishing { publications { jarAndSources(MavenPublication) { diff --git a/samples/simm-valuation-demo/build.gradle b/samples/simm-valuation-demo/build.gradle index 4d602232c6..84367c356c 100644 --- a/samples/simm-valuation-demo/build.gradle +++ b/samples/simm-valuation-demo/build.gradle @@ -137,8 +137,6 @@ task installWeb(type: Copy, dependsOn: [buildWeb]) { into 'src/main/resources/simmvaluationweb' } -quasarScan.dependsOn('classes') - publishing { publications { simmvaluationdemo(MavenPublication) { diff --git a/samples/trader-demo/build.gradle b/samples/trader-demo/build.gradle index e0dd34590c..fab518ddc2 100644 --- a/samples/trader-demo/build.gradle +++ b/samples/trader-demo/build.gradle @@ -111,8 +111,6 @@ idea { } } -quasarScan.dependsOn('classes') - publishing { publications { jarAndSources(MavenPublication) { diff --git a/test-utils/build.gradle b/test-utils/build.gradle index 88f18ba4c9..9736593c7e 100644 --- a/test-utils/build.gradle +++ b/test-utils/build.gradle @@ -49,8 +49,6 @@ dependencies { compile 'com.squareup.okhttp3:okhttp:3.3.1' } -quasarScan.dependsOn('classes', ':core:classes', ':finance:classes') - publishing { publications { testutils(MavenPublication) {