'is there any difference between test {useJUnitPlatform()} and tasks.withType(Test) {useJUnitPlatform()}

Is there any difference between specifying in build.gradle

test {
   useJUnitPlatform()
}

and

tasks.withType(Test) {
   useJUnitPlatform()
}

?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source