mirror of
https://github.com/corda/corda.git
synced 2025-01-27 14:49:35 +00:00
quasarScan removal.
This commit is contained in:
parent
b4288cf9dc
commit
8ec21eedb3
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -101,5 +101,3 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
quasarScan.dependsOn('classes')
|
@ -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 {
|
||||
|
@ -2,15 +2,3 @@ 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', ...)
|
||||
|
@ -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<Project> {
|
||||
void apply(Project project) {
|
||||
@ -30,32 +29,5 @@ class QuasarPlugin implements Plugin<Project> {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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`() {
|
||||
|
@ -105,8 +105,6 @@ idea {
|
||||
}
|
||||
}
|
||||
|
||||
quasarScan.dependsOn('classes')
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
jarAndSources(MavenPublication) {
|
||||
|
@ -110,8 +110,6 @@ idea {
|
||||
}
|
||||
}
|
||||
|
||||
quasarScan.dependsOn('classes')
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
jarAndSources(MavenPublication) {
|
||||
|
@ -137,8 +137,6 @@ task installWeb(type: Copy, dependsOn: [buildWeb]) {
|
||||
into 'src/main/resources/simmvaluationweb'
|
||||
}
|
||||
|
||||
quasarScan.dependsOn('classes')
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
simmvaluationdemo(MavenPublication) {
|
||||
|
@ -111,8 +111,6 @@ idea {
|
||||
}
|
||||
}
|
||||
|
||||
quasarScan.dependsOn('classes')
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
jarAndSources(MavenPublication) {
|
||||
|
@ -49,8 +49,6 @@ dependencies {
|
||||
compile 'com.squareup.okhttp3:okhttp:3.3.1'
|
||||
}
|
||||
|
||||
quasarScan.dependsOn('classes', ':core:classes', ':finance:classes')
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
testutils(MavenPublication) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user