@@ -3,6 +3,8 @@ plugins {
33 id ' idea'
44 id ' eclipse'
55 alias libs. plugins. licenser
6+ alias libs. plugins. gradleutils
7+ alias testLibs. plugins. aggregate
68}
79
810java. toolchain. languageVersion = JavaLanguageVersion . of(16 )
@@ -13,6 +15,21 @@ license {
1315 exclude ' **/*.properties'
1416}
1517
18+ aggregateTesting {
19+ final bulkTests = providers. gradleProperty(' bulk_tests' ). < boolean > map { ' true' . equalsIgnoreCase(it) }. getOrElse(false )
20+ jvms = (! bulkTests ? [ ' Adoptium' : [16 ] ] : [
21+ ' Adoptium' : [16 , 17 , 18 , 19 , 20 , 21 ],
22+ ' Amazon' : [16 , 17 , 18 , 19 , 20 , 21 ],
23+ ' Azul' : (16 .. 21 ),
24+ ' BellSoft' : (16 .. 21 ),
25+ ' GraalVM' : [ 21 ],
26+ // 'IBM': [16, 17, 18, 19, 20 ],
27+ ' Microsoft' : [16 , 17 , 21 ],
28+ ' Oracle' : (16 .. 21 ),
29+ ' SAP' : (16 .. 20 )
30+ ]) as Map<String , List<Integer > >
31+ }
32+
1633tasks. named(' test' , Test ) {
1734 useJUnitPlatform()
1835 reports. html. outputLocation = rootProject. layout. buildDirectory. dir(' reports' )
@@ -36,39 +53,3 @@ dependencies {
3653 testRuntimeOnly testLibs. bundles. junit. runtime
3754 testCompileOnly libs. nulls
3855}
39-
40- final testAll = tasks. register(' testAll' , AggregateTest ) {
41- input = file(' build/test-results/' )
42- output = rootProject. file(' test_results.html' )
43- }
44-
45- def testFor (String javaVendor , int javaVersion , File output ) {
46- tasks. < Test > register(" test${ javaVendor}${ javaVersion} " , Test ) {
47- useJUnitPlatform()
48- classpath = sourceSets. test. runtimeClasspath
49- testClassesDirs = sourceSets. test. output. classesDirs
50- javaLauncher = javaToolchains. launcherFor {
51- vendor = JvmVendorSpec . of(javaVendor. toUpperCase(Locale . ROOT ))
52- languageVersion = JavaLanguageVersion . of(javaVersion)
53- implementation = JvmImplementation . VENDOR_SPECIFIC
54- }
55- reports. html. outputLocation = layout. buildDirectory. dir(" test-reports/${ javaVendor} -${ javaVersion} " )
56- reports. junitXml. outputLocation = output
57- }
58- }
59-
60- (VALID_VMS as Map<String , List<Integer > > ). each { javaVendor, javaVersions ->
61- javaVersions. each { javaVersion ->
62- def output = file(" build/test-results/${ javaVendor} -${ javaVersion} /" )
63- output. mkdirs()
64- def task = testFor(javaVendor, javaVersion, output)
65- testAll. configure {
66- inputs. dir(output)
67- dependsOn(task)
68- mustRunAfter(task)
69- }
70- }
71- }
72-
73- idea. module { downloadSources = downloadJavadoc = true }
74- eclipse. classpath { downloadSources = downloadJavadoc = true }
0 commit comments