From 40a059a7d6aab57752266a5c5403128288b20e8b Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Tue, 18 Jan 2022 21:34:30 +0100 Subject: feat: uses java 11 toolchain and upgrades the gradle wrapper to version 7.3.3 --- build.gradle | 61 +++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 21 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index d460e2a..0a1a5b0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,52 +1,71 @@ -plugins { +plugins +{ id 'java-gradle-plugin' id 'maven-publish' } -repositories { +repositories +{ mavenCentral() } -sourceSets { - functionalTest { +dependencies +{ + def junit5Group = 'org.junit.jupiter' + def junit5Version = '5.8.1' + testImplementation group: junit5Group, name: 'junit-jupiter-api', version: junit5Version + testRuntimeOnly group: junit5Group, name: 'junit-jupiter-engine', version: junit5Version +} + +java +{ + toolchain + { + languageVersion = JavaLanguageVersion.of(11) + } +} + +sourceSets +{ + functionalTest + { compileClasspath += sourceSets.main.output + sourceSets.test.output runtimeClasspath += sourceSets.test.runtimeClasspath } } -gradlePlugin { +gradlePlugin +{ testSourceSets project.sourceSets.functionalTest - plugins { - fregePlugin { - id = 'ch.fhnw.thga.frege' + plugins + { + fregePlugin + { + id = 'ch.fhnw.thga.frege' implementationClass = 'ch.fhnw.thga.gradleplugins.FregePlugin' } } } -configurations { +configurations +{ functionalTestImplementation.extendsFrom testImplementation functionalRuntimeOnly.extendsFrom runtimeOnly } -tasks.register('functionalTest', Test) { - description = 'Runs functional tests.' - group = 'verification' +tasks.register('functionalTest', Test) +{ + description = 'Runs functional tests.' + group = 'verification' testClassesDirs = sourceSets.functionalTest.output.classesDirs - classpath = sourceSets.functionalTest.runtimeClasspath + classpath = sourceSets.functionalTest.runtimeClasspath shouldRunAfter test } check.dependsOn functionalTest -tasks.withType(Test).configureEach { +tasks.withType(Test).configureEach +{ useJUnitPlatform() maxParallelForks 6 } - -dependencies { - def junit5Group = 'org.junit.jupiter' - def junit5Version = '5.8.1' - testImplementation group: junit5Group, name: 'junit-jupiter-api', version: junit5Version - testRuntimeOnly group: junit5Group, name: 'junit-jupiter-engine', version: junit5Version -} -- cgit From 6b9ca5c143de6c28523f60ec362aef3c2e2d9a0b Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Tue, 18 Jan 2022 21:38:28 +0100 Subject: chore: updates junit jupiter 5.8.1 -> 5.8.2 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 0a1a5b0..02b545e 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ repositories dependencies { def junit5Group = 'org.junit.jupiter' - def junit5Version = '5.8.1' + def junit5Version = '5.8.2' testImplementation group: junit5Group, name: 'junit-jupiter-api', version: junit5Version testRuntimeOnly group: junit5Group, name: 'junit-jupiter-engine', version: junit5Version } -- cgit