2016-02-16 14:10:51 +00:00
|
|
|
group 'com.r3cev.prototyping'
|
|
|
|
version '1.0-SNAPSHOT'
|
|
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
|
2016-02-18 12:43:15 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// apply plugin: 'org.jetbrains.dokka'
|
|
|
|
|
2016-02-16 14:10:51 +00:00
|
|
|
repositories {
|
2016-03-02 13:45:53 +00:00
|
|
|
mavenLocal()
|
2016-02-16 14:10:51 +00:00
|
|
|
mavenCentral()
|
2016-03-02 13:45:53 +00:00
|
|
|
jcenter()
|
|
|
|
maven {
|
|
|
|
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
|
|
|
}
|
2016-02-16 14:10:51 +00:00
|
|
|
}
|
|
|
|
|
2016-05-19 13:01:38 +00:00
|
|
|
//noinspection GroovyAssignabilityCheck
|
|
|
|
configurations {
|
|
|
|
quasar
|
|
|
|
}
|
|
|
|
|
2016-02-16 14:10:51 +00:00
|
|
|
dependencies {
|
2016-02-24 13:50:21 +00:00
|
|
|
testCompile 'junit:junit:4.12'
|
2016-05-19 09:25:18 +00:00
|
|
|
testCompile 'org.assertj:assertj-core:3.4.1'
|
2016-05-19 13:01:38 +00:00
|
|
|
testCompile "commons-fileupload:commons-fileupload:1.3.1"
|
2016-02-23 17:17:46 +00:00
|
|
|
|
2016-05-20 13:10:34 +00:00
|
|
|
// Guava: Google test library (collections test suite)
|
|
|
|
testCompile "com.google.guava:guava-testlib:19.0"
|
|
|
|
|
2016-02-16 14:10:51 +00:00
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
|
|
compile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
|
|
|
|
2016-04-14 15:51:53 +00:00
|
|
|
// Thread safety annotations
|
|
|
|
compile "com.google.code.findbugs:jsr305:3.0.1"
|
|
|
|
|
2016-05-16 09:54:25 +00:00
|
|
|
// AssertJ: for fluent assertions for testing
|
|
|
|
testCompile "org.assertj:assertj-core:3.4.1"
|
|
|
|
|
2016-02-23 17:17:46 +00:00
|
|
|
// SLF4J: Logging framework.
|
2016-02-16 14:10:51 +00:00
|
|
|
compile "org.slf4j:slf4j-jdk14:1.7.13"
|
|
|
|
|
2016-02-23 17:17:46 +00:00
|
|
|
// Guava: Google utilities library.
|
|
|
|
compile "com.google.guava:guava:19.0"
|
|
|
|
|
|
|
|
// RxJava: observable streams of events.
|
2016-03-10 16:37:10 +00:00
|
|
|
compile "io.reactivex:rxjava:1.0.17"
|
2016-02-16 14:10:51 +00:00
|
|
|
|
2016-03-02 13:45:53 +00:00
|
|
|
// Kryo: object graph serialization.
|
|
|
|
compile "com.esotericsoftware:kryo:3.0.3"
|
|
|
|
compile "de.javakaffee:kryo-serializers:0.37"
|
|
|
|
|
2016-02-16 14:10:51 +00:00
|
|
|
// Quasar: for the bytecode rewriting for state machines.
|
2016-02-29 17:56:03 +00:00
|
|
|
compile "co.paralleluniverse:quasar-core:${quasar_version}:jdk8"
|
|
|
|
|
|
|
|
// 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.
|
|
|
|
compile "org.apache.commons:commons-jexl3:3.0"
|
2016-03-23 11:15:09 +00:00
|
|
|
|
|
|
|
// For JSON
|
|
|
|
compile "com.fasterxml.jackson.core:jackson-databind:2.5.5"
|
2016-05-19 13:01:38 +00:00
|
|
|
|
|
|
|
// Quasar: for the bytecode rewriting for state machines.
|
|
|
|
quasar "co.paralleluniverse:quasar-core:${quasar_version}:jdk8@jar"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tasks.withType(Test) {
|
|
|
|
jvmArgs "-javaagent:${configurations.quasar.singleFile}"
|
|
|
|
jvmArgs "-Dco.paralleluniverse.fibers.verifyInstrumentation"
|
2016-02-16 14:10:51 +00:00
|
|
|
}
|
2016-05-19 13:01:38 +00:00
|
|
|
tasks.withType(JavaExec) {
|
|
|
|
jvmArgs "-javaagent:${configurations.quasar.singleFile}"
|
|
|
|
jvmArgs "-Dco.paralleluniverse.fibers.verifyInstrumentation"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
//
|
|
|
|
// TODO: Make this task incremental, as it can be quite slow.
|
|
|
|
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
|
|
|
task quasarScan(dependsOn: ['classes']) << {
|
|
|
|
ant.taskdef(name:'scanSuspendables', classname:'co.paralleluniverse.fibers.instrument.SuspendablesScanner',
|
|
|
|
classpath: "${sourceSets.main.output.classesDir}:${sourceSets.main.output.resourcesDir}:${configurations.runtime.asPath}")
|
|
|
|
delete "$sourceSets.main.output.resourcesDir/META-INF/suspendables", "$sourceSets.main.output.resourcesDir/META-INF/suspendable-supers"
|
|
|
|
ant.scanSuspendables(
|
|
|
|
auto:false,
|
|
|
|
suspendablesFile: "$sourceSets.main.output.resourcesDir/META-INF/suspendables",
|
|
|
|
supersFile: "$sourceSets.main.output.resourcesDir/META-INF/suspendable-supers") {
|
|
|
|
fileset(dir: sourceSets.main.output.classesDir)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jar.dependsOn quasarScan
|