forked from puniverse/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
780 lines (664 loc) · 27.6 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'net.saliman:gradle-cobertura-plugin:2.3.1'
}
}
ext.java8 = System.properties['java.version'].startsWith('1.8')
subprojects {
apply plugin: 'java'
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
group = "co.paralleluniverse"
version = "0.7.8-SNAPSHOT"
status = "integration"
description = "Fibers, Channels and Actors for the JVM"
ext.url = "http://puniverse.github.com/quasar"
ext.vendor = "Parallel Universe Software Co."
ext.licenseName1 = "The GNU Lesser General Public License, version 3"
ext.licenseUrl1 = "http://www.gnu.org/licenses/lgpl-3.0.txt"
ext.licenseName2 = "Eclipse Public License - v 1.0"
ext.licenseUrl2 = "http://www.eclipse.org/legal/epl-v10.html"
ext.scmUrl = "https://github.com/puniverse/quasar"
ext.scmConnection = "https://github.com/puniverse/quasar.git"
ext.distDir = "$buildDir/dist"
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
ext.baselib = "${rootProject.projectDir}/baselib"
ext.java8 = rootProject.ext.java8
ext.jdkVer = ext.java8 ? "8" : "7"
ext.quasarJar = "${rootProject.projectDir}/quasar-core/build/libs/quasar-core-${version}${ext.java8 ? "-jdk8" : ""}.jar" // project(':quasar-core').jar.archivePath
ext.asmVer = '5.1'
ext.kotlinVer = '1.0.2'
if (!project.hasProperty("sonatypeUsername") || !project.hasProperty("sonatypePassword")) {
println "sonatype username or password not set"
ext.sonatypeUsername = ""
ext.sonatypePassword = ""
}
if (!project.hasProperty('mainClass')) { // must use project.hasProperty() rather than hasProperty in subprojects (gradle bug)
ext.mainClass = ''
}
repositories {
flatDir {
dirs baselib
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/releases" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
jcenter()
}
}
configurations.all {
resolutionStrategy {
failOnVersionConflict()
}
}
configurations {
compileOnly
provided
timewarp
// markdownDoclet
}
sourceSets {
main {
compileClasspath += configurations.compileOnly + configurations.provided
}
test {
compileClasspath += configurations.compileOnly + configurations.provided
runtimeClasspath += configurations.provided
}
jmh {
compileClasspath += main.compileClasspath + main.output + test.compileClasspath + test.output
runtimeClasspath += compileClasspath + main.runtimeClasspath + test.runtimeClasspath
}
}
compileJmhJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
dependencies {
compile("io.dropwizard.metrics:metrics-core:3.1.2") {
exclude group: 'org.slf4j', module: '*'
}
provided "org.apache.ant:ant:1.9.7"
compile "com.google.guava:guava:20.0"
timewarp 'co.paralleluniverse:timewarp:0.1.0-SNAPSHOT'
testCompile 'co.paralleluniverse:timewarp:0.1.0-SNAPSHOT'
testCompile 'junit:junit:4.12'
testCompile('com.google.truth:truth:0.30') {
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'junit', module: 'junit'
}
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile("org.mockito:mockito-all:1.10.19") {
exclude group: "org.ow2.asm", module: '*'
}
testCompile "org.ow2.asm:asm:$asmVer"
jmhCompile 'org.openjdk.jmh:jmh-core:1.17'
jmhCompile 'org.openjdk.jmh:jmh-generator-annprocess:1.17'
compileOnly 'org.kohsuke.metainf-services:metainf-services:1.7'
// compileOnly 'com.google.auto.service:auto-service:1.0-rc1' // same as metainf-services
// markdownDoclet "ch.raffael.pegdown-doclet:pegdown-doclet:1.1.1"
}
// tasks.withType(JavaCompile) {
// // options.compilerArgs << "-Xlint:unchecked"
// // options.compilerArgs << "-Xlint:deprecation"
// }
compileJava.dependsOn processResources
compileJava {
if(project.name != 'quasar-kotlin') {
doLast {
scanAndInstrument(sourceSets.main, [configurations.provided, configurations.runtime])
}
}
}
test.dependsOn jar
tasks.withType(Test) {
useJUnit()
// systemProperty 'co.paralleluniverse.fibers.verifyInstrumentation', 'true'
// systemProperty "java.util.logging.config.file", "jul.properties"
// Uncomment and add ${rootProject.projectDir}/log4j.xml, if not present, for logging
// systemProperty "log4j.configurationFile", "${rootProject.projectDir}/log4j.xml"
// systemProperty "Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"
// systemProperty 'co.paralleluniverse.debugMode', 'true'
systemProperty 'co.paralleluniverse.monitoring.flightRecorderLevel', '5'
systemProperty 'co.paralleluniverse.globalFlightRecorder', 'true'
systemProperty 'co.paralleluniverse.flightRecorderDumpFile', 'quasar.log'
systemProperty 'co.paralleluniverse.monitoring.flightRecorderSize', '200000'
if (project.name != 'quasar-core') {
jvmArgs "-javaagent:${quasarJar}" // =vdmc (verbose, debug, allow monitors, check class)
}
jvmArgs "-Xbootclasspath/a:${configurations.timewarp.singleFile}"
if (System.getenv("TRAVIS") == 'true') {
jvmArgs "-javaagent:${configurations.timewarp.singleFile}=3" // slow clock down x3
}
jvmArgs "-Xmx2048m"
if (!project.ext.java8) {
jvmArgs "-XX:MaxPermSize=512m" // Travis is having some trouble with PermGen
}
// jvmArgs "-XX:-UseCompressedOops"
beforeTest { desc ->
logger.quiet("Running test: " + desc)
}
afterTest { desc, result ->
if(result.resultType == TestResult.ResultType.FAILURE) {
logger.quiet("Failed test ${desc.name} [${desc.className}] with exception: ${result.exception}")
if(result.exception != null) {
result.exception.printStackTrace()
}
}
}
doLast() {
println "file://" + getReports().getHtml().getDestination() + "/index.html"
}
}
['run', 'debug'].each { name ->
project.task(name, type: JavaExec, dependsOn:[testClasses]) {
classpath = sourceSets.main.runtimeClasspath
if(project.hasProperty('mainClass')){
main = project.mainClass
}
if(project.hasProperty('args')){
args project.args.split('\\s+')
}
jvmArgs '-Xmx2048m'
// jvmArgs "-Xbootclasspath/p:${System.getProperty("user.home")}/jsr166.jar"
// systemProperty 'co.paralleluniverse.fibers.DefaultFiberPool.parallelism', '1'
systemProperty "log4j.configurationFile", "${rootProject.projectDir}/log4j.xml"
systemProperty "Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"
// systemProperty 'co.paralleluniverse.fibers.verifyInstrumentation', 'true'
jvmArgs "-javaagent:${quasarJar}" // =vdmc (verbose, debug, allow monitors, check class)
// jvmArgs '-XX:+UnlockCommercialFeatures', '-XX:+FlightRecorder', '-XX:StartFlightRecording=duration=60s,filename=recording.jfr,settings=heap'
}
}
debug.debug = true;
project.afterEvaluate {
run.dependsOn project(':quasar-core').tasks["jdk${project.ext.jdkVer}ShadowJar"]
}
tasks.withType(JavaExec) {
classpath += sourceSets.test.runtimeClasspath + sourceSets.test.output + sourceSets.jmh.runtimeClasspath + sourceSets.jmh.output
}
// tasks.withType(Debug) {
// classpath = sourceSets.test.runtimeClasspath
// }
configure (javadoc) {
classpath += configurations.provided
options {
// docletpath = configurations.markdownDoclet.files.asType(List)
// doclet = 'ch.raffael.doclets.pegdown.PegdownDoclet'
// addStringOption("parse-timeout", "10")
if(project.ext.java8) {
options.addStringOption('Xdoclint:none', '-quiet')
}
// stylesheetFile = rootProject.file('./baselib/javadoc.css')
links = [
"http://docs.oracle.com/javase/7/docs/api/",
"http://google.github.io/guava/releases/19.0/api/docs/"
]
}
}
defaultTasks 'build'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task artifacts {
group = "Help"
description = "Displays the artifacts associated with each configuration of " + project
doFirst {
configurations.findAll().each { config ->
println "${config}:"
// config.allArtifacts.each { file -> println "--- " + file }
config.allArtifacts.getFiles().each { file -> println "" + file }
println ' '
}
}
}
///////// Publish Artifacts
apply plugin: 'maven'
apply plugin: 'signing'
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { deployment -> signing.signPom(deployment) }
repository(
url: (isReleaseVersion ?
"https://oss.sonatype.org/service/local/staging/deploy/maven2" :
"https://oss.sonatype.org/content/repositories/snapshots")) {
// User and Password are taken from ~/.gradle/gradle.properties
authentication(userName: project.sonatypeUsername, password: project.sonatypePassword)
}
pom.project {
name project.name
packaging 'jar'
description project.description
url project.url
scm {
url project.scmUrl
connection project.scmConnection
developerConnection project.scmConnection
}
licenses {
license {
name project.licenseName1
url project.licenseUrl1
distribution 'repo'
}
license {
name project.licenseName2
url project.licenseUrl2
distribution 'repo'
}
}
developers {
developer {
id 'pron'
name 'Ron Pressler'
}
}
}
}
}
}
}
def scanAndInstrument(sset, configs) {
def cp = '' + sset.output.classesDir + ':' + sset.output.resourcesDir + ':' + configs*.asPath.join(':')
ant.taskdef(
name:'scanSuspendables', classname:'co.paralleluniverse.fibers.instrument.SuspendablesScanner',
classpath: cp)
ant.scanSuspendables(
auto: false,
supersFile:"$sset.output.resourcesDir/META-INF/suspendable-supers",
append: true) {
fileset(dir: sset.output.classesDir)
}
ant.taskdef(name:'instrumentation', classname:'co.paralleluniverse.fibers.instrument.InstrumentationTask',
classpath: cp)
ant.instrumentation(verbose:'true', check:'true', debug:'true') {
fileset(dir: sset.output.classesDir) {
exclude(name: 'co/paralleluniverse/fibers/instrument/*.class')
}
}
}
project (':quasar-core') {
/*
* see:
* https://docs.gradle.org/current/userguide/java_plugin.html
* http://examples.javacodegeeks.com/core-java/gradle/gradle-sourcesets-example/
* http://stackoverflow.com/questions/15870662/gradle-create-a-new-jar-from-each-sourceset
* http://stackoverflow.com/questions/18190614/compiling-a-project-with-different-java-source-compatibility
* https://softnoise.wordpress.com/2014/09/07/gradle-sub-project-test-dependencies-in-multi-project-builds/
*/
apply plugin: 'com.github.johnrengelman.shadow'
// remove default artifact
configurations.runtime.artifacts.with { archives ->
archives.each {
archives.remove(it)
}
}
[compileJava, compileTestJava, classes, jar]*.enabled = false
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'src/jdk7/java'
}
}
jdk7 {
java {
srcDir 'src/main/java'
srcDir 'src/jdk7/java'
}
compileClasspath += main.compileClasspath // += main.uoutput
runtimeClasspath += main.runtimeClasspath // += main.uoutput
}
jdk7test {
java {
srcDir 'src/test/java'
}
compileClasspath += jdk7.output + test.compileClasspath
runtimeClasspath += compileClasspath + test.runtimeClasspath
}
jdk8 {
java {
srcDir 'src/main/java'
srcDir 'src/jdk8/java'
}
compileClasspath += main.compileClasspath
runtimeClasspath += compileClasspath
}
jdk8test {
java {
srcDir 'src/test/java'
srcDir 'src/jdk8Test/java'
}
compileClasspath += jdk8.output + test.compileClasspath
runtimeClasspath += compileClasspath + test.runtimeClasspath
}
jmh {
java {
srcDir 'src/jmh/java'
}
compileClasspath += jdk8.output + jdk8test.compileClasspath + jdk8test.output
runtimeClasspath += compileClasspath + jdk8test.runtimeClasspath
}
classloadertest {
java {
srcDir 'src/classloadertest/java'
}
compileClasspath += jdk7.output + test.compileClasspath
runtimeClasspath += compileClasspath + test.runtimeClasspath
}
}
configurations {
jdk7Archives.extendsFrom runtime
jdk8Archives.extendsFrom runtime
}
dependencies {
jdk7Compile ":jsr166e"
compile ":high-scale-lib"
compile "org.hdrhistogram:HdrHistogram:2.1.9"
compile("org.latencyutils:LatencyUtils:2.0.3") {
exclude group: "org.hdrhistogram", module: '*'
}
compile "org.ow2.asm:asm:$asmVer"
compile "org.ow2.asm:asm-analysis:$asmVer"
compile "org.ow2.asm:asm-commons:$asmVer"
compile "org.ow2.asm:asm-util:$asmVer"
// The exclusions are needed to get asm 5.0.4 whilst Kryo still depends on 5.0.3
compile("com.esotericsoftware:kryo:4.0.0") {
exclude group: "org.ow2.asm", module: '*'
}
compile("de.javakaffee:kryo-serializers:0.41") {
exclude group: "com.esotericsoftware", module: '*'
exclude group: "com.esotericsoftware.kryo", module: '*'
}
provided 'junit:junit:4.12'
}
def ssets = [sourceSets.jdk7]
if(ext.java8) {
ssets += sourceSets.jdk8
}
ssets.each { set ->
configure(project.tasks["compile${capitalize(set.name)}Java"]) {
doLast {
rootProject.scanAndInstrument(set, [configurations["${set.name}Runtime"], configurations.provided, configurations.runtime])
}
}
def shadowJarTask = task("${set.name}ShadowJar", type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar, dependsOn: classes) {
classifier = '' // overwrite jar
destinationDir = file("$buildDir/libs")
from set.output
configurations = [project.configurations.runtime, project.configurations["${set.name}Runtime"]]
dependencies {
include(dependency('org.ow2.asm:.*:.*'))
include(dependency(':high-scale-lib'))
}
exclude 'META-INF/INDEX.LIST'
relocate 'org.objectweb.asm.', 'co.paralleluniverse.asm.'
manifest {
attributes(
"Built-By" : System.getProperty("user.name"),
"Implementation-Title" : project.name,
"Implementation-Version" : version,
"Implementation-Vendor" : vendor,
"Premain-Class" : "co.paralleluniverse.fibers.instrument.JavaAgent",
"Agent-Class" : "co.paralleluniverse.fibers.instrument.JavaAgent",
"Can-Retransform-Classes" : "true",
"Can-Redefine-Classes" : "true",
// "Class-Path" : configurations.runtime.collect { "lib/"+it.getName() }.join(',')
)
}
}
def testTask = task("${set.name}Test", type: Test, dependsOn: [shadowJarTask, compileClassloadertestJava]) {
testClassesDir = project.sourceSets["${set.name}test"].output.classesDir
classpath = project.sourceSets["${set.name}test"].runtimeClasspath
project.afterEvaluate {
jvmArgs "-javaagent:${shadowJarTask.archivePath}" // =vdc
}
}
artifacts {
archives shadowJarTask
}
assemble.dependsOn shadowJarTask
check.dependsOn testTask
}
compileJdk7Java {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}
// jdk7Jar {
// from zipTree("${baselib}/jsr166e.jar") // include non-Maven jars
// }
jdk7ShadowJar {
dependencies {
include(dependency(':jsr166e'))
}
}
artifacts {
jdk7Archives jdk7ShadowJar
}
if (ext.java8) {
compileJdk8Java {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
compileJdk8testJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
// jdk8Jar {
// classifier = 'jdk8'
// }
jdk8ShadowJar {
classifier = 'jdk8'
}
artifacts {
jdk8Archives jdk8ShadowJar
}
tasks.withType(JavaExec) {
classpath += sourceSets.jdk8test.runtimeClasspath + sourceSets.jdk8test.output
}
run.dependsOn compileJdk8Java, jdk8testClasses
} else {
tasks.withType(JavaExec) {
classpath += sourceSets.jdk7test.runtimeClasspath + sourceSets.jdk7test.output
}
run.dependsOn compileJdk7Java, jdk7testClasses
}
javadoc {
if (project.ext.java8) {
source = sourceSets.jdk8.allJava
} else {
source = sourceSets.jdk7.allJava
}
}
task shadowJar(dependsOn: tasks.withType(com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar), overwrite: true) {
}
assemble.dependsOn shadowJar
build.dependsOn shadowJar
install.dependsOn shadowJar
signArchives.dependsOn shadowJar
uploadArchives.dependsOn shadowJar
def installer = install.repositories.mavenInstaller
def deployer = uploadArchives.repositories.mavenDeployer
[installer, deployer]*.pom*.whenConfigured {
it.dependencies.removeAll { dep ->
dep.artifactId.startsWith('jsr166e') ||
dep.artifactId.startsWith('high-scale-lib') ||
dep.groupId == 'org.ow2.asm'
}
}
if (ext) {
artifacts {
archives sourcesJar
archives javadocJar
}
}
}
project (':quasar-actors') {
//project.evaluationDependsOn(':quasar-core')
dependencies {
provided project(path: ':quasar-core', configuration: "jdk${jdkVer}Archives")
// compile 'org.mutabilitydetector:MutabilityDetector:0.9.2'
compile "org.slf4j:slf4j-api:1.7.21"
compile "net.bytebuddy:byte-buddy:1.5.7"
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:2.7") {
exclude group: "org.slf4j", module: '*'
}
testRuntime "org.apache.logging.log4j:log4j-api:2.7"
testRuntime "org.apache.logging.log4j:log4j-core:2.7"
testRuntime "com.lmax:disruptor:3.3.6" // required for log4j
}
}
project (':quasar-galaxy') {
dependencies {
provided project(path: ':quasar-core', configuration: "jdk${jdkVer}Archives")
compile project(':quasar-actors')
compile ("co.paralleluniverse:galaxy:1.4") {
exclude group: 'com.lmax', module: 'disruptor'
exclude group: 'de.javakaffee', module: 'kryo-serializers'
exclude group: 'com.google.guava', module: 'guava'
exclude group: "org.slf4j", module: '*'
}
testCompile ('org.gridkit.lab:telecontrol-ssh:0.7.24'){
exclude group: 'org.ow2.asm', module: '*'
exclude group: 'org.slf4j', module: '*'
}
testRuntime files(jar.archivePath)
}
tasks.withType(Test) {
systemProperty "co.paralleluniverse.quasarJar", "${quasarJar}"
systemProperty "jgroups.bind_addr", "127.0.0.1"
systemProperty "galaxy.multicast.address", "225.0.0.1"
systemProperty "galaxy.multicast.port", "7050"
systemProperty "co.paralleluniverse.galaxy.configFile", "${sourceSets.main.output.resourcesDir}/config/peer.xml"
systemProperty "co.paralleluniverse.galaxy.autoGoOnline", "true"
}
tasks.withType(JavaExec) {
main = mainClass
systemProperty "log4j.configurationFile", "${rootProject.projectDir}/log4j.xml"
systemProperty "Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"
// systemProperty 'co.paralleluniverse.fibers.verifyInstrumentation', 'true'
// systemProperty "co.paralleluniverse.io.useJDKSerialization", "true"
jvmArgs "-javaagent:${quasarJar}" // =v, =d
jvmArgs "-ea", "-XX:MaxDirectMemorySize=100M"
systemProperty "jgroups.bind_addr", "127.0.0.1"
systemProperty "galaxy.multicast.address", "225.0.0.1"
systemProperty "galaxy.multicast.port", "7050"
systemProperty "co.paralleluniverse.galaxy.configFile", "${sourceSets.main.output.resourcesDir}/config/peer.xml"
systemProperty "co.paralleluniverse.galaxy.autoGoOnline", "true"
// systemProperty 'co.paralleluniverse.debugMode', 'true'
systemProperty 'co.paralleluniverse.monitoring.flightRecorderLevel', '5'
systemProperty 'co.paralleluniverse.globalFlightRecorder', 'true'
systemProperty 'co.paralleluniverse.flightRecorderDumpFile', 'quasar-galaxy.log'
systemProperty 'co.paralleluniverse.monitoring.flightRecorderSize', '200000'
}
}
project (':quasar-reactive-streams') {
//project.evaluationDependsOn(':quasar-core')
dependencies {
provided project(path: ':quasar-core', configuration: "jdk${jdkVer}Archives")
compile "org.reactivestreams:reactive-streams:1.0.0"
testCompile("org.reactivestreams:reactive-streams-tck:1.0.0") {
exclude group: "junit", module: "*"
exclude group: "org.testng", module: "testng"
}
testCompile('org.testng:testng:6.9.13.6') {
exclude group: "com.google.guava", module: "*"
exclude group: "junit", module: "*"
}
}
test {
useTestNG()
}
}
project (':quasar-disruptor') {
//project.evaluationDependsOn(':quasar-core')
dependencies {
provided project(path: ':quasar-core', configuration: "jdk${jdkVer}Archives")
compile "com.lmax:disruptor:3.3.6"
}
}
task javadoc(type: Javadoc, dependsOn: subprojects.javadoc) {
title = "Quasar ${project(':quasar-core').version}"
destinationDir = file("docs/javadoc")
if (project.ext.java8) {
source = project(':quasar-core').sourceSets.jdk8.allJava
} else {
source = project(':quasar-core').sourceSets.jdk7.allJava
}
source += project(':quasar-actors').sourceSets.main.allJava
source += project(':quasar-reactive-streams').sourceSets.main.allJava
classpath = files(subprojects.collect { project -> project.sourceSets.main.compileClasspath })
options {
// docletpath = project(':quasar-core').configurations.markdownDoclet.files.asType(List)
// doclet = 'ch.raffael.doclets.pegdown.PegdownDoclet'
// addStringOption("parse-timeout", "10")
// stylesheetFile = rootProject.file('./baselib/javadoc.css')
if(project.ext.java8) {
options.addStringOption('Xdoclint:none', '-quiet')
}
links = [
"http://docs.oracle.com/javase/7/docs/api/",
"http://docs.guava-libraries.googlecode.com/git-history/v18.0/javadoc/"
]
}
excludes = [
"co/paralleluniverse/actors/spi/**",
"co/paralleluniverse/actors/ActorMonitor.java",
"co/paralleluniverse/actors/GlobalRegistry.java",
"co/paralleluniverse/actors/JMXActorMonitor.java",
"co/paralleluniverse/actors/LifecycleListener.java",
"co/paralleluniverse/actors/LifecycleListenerProxy.java",
"co/paralleluniverse/actors/MutabilityTester.java",
"co/paralleluniverse/actors/RemoteActorProxyFactoryService.java",
"co/paralleluniverse/actors/RemoteActorRef.java",
"co/paralleluniverse/actors/RemoteActorProxyFactory.java",
"co/paralleluniverse/common/benchmark/**",
"co/paralleluniverse/common/classloader/**",
"co/paralleluniverse/common/logging/**",
"co/paralleluniverse/common/monitoring/**",
"co/paralleluniverse/common/reflection/**",
"co/paralleluniverse/common/test/**",
"co/paralleluniverse/common/util/**",
"co/paralleluniverse/concurrent/forkjoin/**",
"co/paralleluniverse/concurrent/util/**",
"co/paralleluniverse/data/record/DynamicGeneratedRecord.java",
"co/paralleluniverse/data/record/DynamicRecord.java",
"co/paralleluniverse/fibers/DefaultFiberPool.java",
"co/paralleluniverse/fibers/FibersMonitor.java",
"co/paralleluniverse/fibers/FiberTimedScheduler.java",
"co/paralleluniverse/fibers/Instrumented.java",
"co/paralleluniverse/fibers/NoopFibersMonitor.java",
"co/paralleluniverse/fibers/instrument/**",
"co/paralleluniverse/io/serialization/**",
"co/paralleluniverse/remote/**",
"co/paralleluniverse/strands/channels/SelectActionImpl.java",
"co/paralleluniverse/strands/channels/disruptor/**", // not ready
"co/paralleluniverse/strands/queues/**",
]
}
task clean(dependsOn: subprojects.clean) << {
delete 'docs/javadoc'
}
def capitalize(s) { s[0].toUpperCase() + s[1..-1].toLowerCase() }