------------------------------------------------------------
Root project 'elephas'
------------------------------------------------------------
Root project 'elephas'
\--- Project ':modules'
+--- Project ':modules:adder'
+--- Project ':modules:divider'
+--- Project ':modules:multiplier'
\--- Project ':modules:subtracter'
Each subproject contains a unit test which test their respective function (adding, subtracting, multiplying, dividing).
PS ~/git/elephas> gradle test
MainTest > mainPrintHelloWorld() "PASSED"
AdderTest > testAdd() "PASSED"
DividerTest > testDivide() "PASSED"
DividerTest > testWhenDiscNull() "PASSED"
MultiplierTest > testMultiply() "PASSED"
SubtracterTest > testSubtract() "PASSED"Each subproject applies the dev.sirtimme.java-convention plugin. The plugin configures the appropiate java configurations. The plugin looks the following:
package dev.sirtimme.gradle
plugins {
java
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}Each subproject applies the dev.sirtimme.test-convention plugin. The plugin configures the necessary Gradle tasks to make the project JUnit compatible. The plugin looks the following:
package dev.sirtimme.gradle
tasks.named<Test>("test") {
testLogging {
events("started", "passed", "skipped", "failed")
}
useJUnitPlatform()
}