From 6c79ea675af91b34423dfb202c11936bed3550e7 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Fri, 18 Nov 2016 13:13:06 +0000 Subject: [PATCH] Removed plugins now published in main repo. --- .../main/groovy/DefaultPublishTasks.groovy | 20 ------- buildSrc/src/main/groovy/QuasarPlugin.groovy | 60 ------------------- 2 files changed, 80 deletions(-) delete mode 100644 buildSrc/src/main/groovy/DefaultPublishTasks.groovy delete mode 100644 buildSrc/src/main/groovy/QuasarPlugin.groovy diff --git a/buildSrc/src/main/groovy/DefaultPublishTasks.groovy b/buildSrc/src/main/groovy/DefaultPublishTasks.groovy deleted file mode 100644 index 140aeefaba..0000000000 --- a/buildSrc/src/main/groovy/DefaultPublishTasks.groovy +++ /dev/null @@ -1,20 +0,0 @@ -import org.gradle.api.* -import org.gradle.api.tasks.bundling.Jar -import org.gradle.api.tasks.javadoc.Javadoc - -/** - * A utility plugin that when applied will automatically create source and javadoc publishing tasks - */ -class DefaultPublishTasks implements Plugin { - void apply(Project project) { - project.task("sourceJar", type: Jar, dependsOn: project.classes) { - classifier = 'sources' - from project.sourceSets.main.allSource - } - - project.task("javadocJar", type: Jar, dependsOn: project.javadoc) { - classifier = 'javadoc' - from project.javadoc.destinationDir - } - } -} diff --git a/buildSrc/src/main/groovy/QuasarPlugin.groovy b/buildSrc/src/main/groovy/QuasarPlugin.groovy deleted file mode 100644 index f13b7442ae..0000000000 --- a/buildSrc/src/main/groovy/QuasarPlugin.groovy +++ /dev/null @@ -1,60 +0,0 @@ -import org.gradle.api.* -import org.gradle.api.tasks.testing.Test -import org.gradle.api.tasks.JavaExec -import java.nio.file.Files - -/** - * QuasarPlugin creates a "quasar" configuration, adds quasar as a dependency and creates a "quasarScan" task that scans - * for `@Suspendable`s in the code - */ -class QuasarPlugin implements Plugin { - void apply(Project project) { - - project.repositories { - mavenCentral() - } - - project.configurations.create("quasar") -// To add a local .jar dependency: -// project.dependencies.add("quasar", project.files("${project.rootProject.projectDir}/lib/quasar.jar")) - project.dependencies.add("quasar", "co.paralleluniverse:quasar-core:${project.rootProject.ext.quasar_version}:jdk8@jar") - project.dependencies.add("compile", project.configurations.getByName("quasar")) - - project.tasks.withType(Test) { - jvmArgs "-javaagent:${project.configurations.quasar.singleFile}" - jvmArgs "-Dco.paralleluniverse.fibers.verifyInstrumentation" - } - project.tasks.withType(JavaExec) { - 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 - } -}