@@ -27,21 +27,23 @@ dependencies {
27
27
}
28
28
*/
29
29
// in java-library mode, durian-swt.os remains as a folder of classes for gradle internally, which the osgi plugin does not like
30
- tasks. jar. dependsOn(' :durian-swt.os:jar' )
30
+ tasks. named(' jar' ). configure {
31
+ dependsOn(' :durian-swt.os:jar' )
32
+ }
31
33
32
34
// ///////////////////////
33
35
// INTERACTIVE TESTING //
34
36
// ///////////////////////
35
37
// standard `gradlew test` will autoclose after 500ms
38
+ boolean isMac = System . getProperty(" os.name" ). toLowerCase(). contains(" mac" )
36
39
test {
37
40
systemProperty ' com.diffplug.test.autoclose.milliseconds' , ' 500'
38
41
useJUnit {
39
42
// there are some tests that can't pass without a user, so we'll exclude them
40
43
excludeCategories ' com.diffplug.common.swt.InteractiveTest$FailsWithoutUser'
41
44
// SWT tests don't work in gradle on OS X (https://github.com/ReadyTalk/swt-bling/issues/4)
42
- boolean isMac = System . getProperty(" os.name" ). toLowerCase(). contains(" mac" );
43
45
if (isMac) {
44
- excludeCategories ' com.diffplug.common.swt.InteractiveTest '
46
+ jvmArgs = [ ' -XstartOnFirstThread ' ]
45
47
}
46
48
}
47
49
// log all test events
@@ -51,9 +53,12 @@ test {
51
53
}
52
54
53
55
// only run the interactive tests
54
- task interactiveTest ( type : Test ) {
56
+ tasks . register( ' interactiveTest ' , Test ) {
55
57
systemProperty ' com.diffplug.test.autoclose.milliseconds' , null
56
58
useJUnit {
57
59
includeCategories ' com.diffplug.common.swt.InteractiveTest'
60
+ if (isMac) {
61
+ jvmArgs = [' -XstartOnFirstThread' ]
62
+ }
58
63
}
59
64
}
0 commit comments