ddimitrov
(Dimitar Dimitrov)
1
When replacing this deprecated method, which shall we prefer:
testClassesDirs = files(sourceSets.integrationTest.output.classesDir)
or
testClassesDirs = sourceSets.integrationTest.output
Strictly speaking, the latter will also bring the resources into the classpath. Is that a good thing?
sterling
(Sterling Greene)
2
Neither
testClassesDirs = sourceSets.integrationTest.output.classesDirs
If you used multiple languages for the same source set, they could use separate output directories.
4 Likes
ddimitrov
(Dimitar Dimitrov)
3
Would be nice going forward to have the typical replacements mentioned in the deprecated methods javadoc.
2 Likes
vorburger
(Michael Vorburger)
4
I had a similar problem when bumping from an old Gradle 2.10 to current 5.2.1 :
task integrationTest(type:Test) {
testClassesDir = project.sourceSets.integrationTest.output.classesDir
Could not get unknown property ‘classesDir’ for integration test classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.
And this fixed it:
testClassesDirs = project.sourceSets.integrationTest.output.classesDirs
1 Like
sachin
(sachin)
5
Thank you So Much for this post.