File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,35 @@ tasks.withType(JavaCompile).configureEach {
1919 options. encoding = ' UTF-8'
2020}
2121
22+ sourceSets {
23+ main {
24+ java {
25+ srcDirs = [' src/main/java' ]
26+ }
27+ resources {
28+ srcDirs = [' src/main/resources' ]
29+ }
30+ output. classesDirs = files(" $buildDir /classes/java/main" )
31+ output. resourcesDir = file(" $buildDir /resources/main" )
32+ }
33+
34+ test {
35+ java {
36+ srcDirs = [' test/java/src/' ]
37+ }
38+ resources {
39+ srcDirs = [' test/resources' ]
40+ }
41+ output. classesDirs = files(" $buildDir /classes/java/test" )
42+ output. resourcesDir = file(" $buildDir /resources/test" )
43+
44+ // Test compile classpath includes main output
45+ compileClasspath + = main. output
46+ // Test runtime classpath includes main output
47+ runtimeClasspath + = main. output
48+ }
49+ }
50+
2251// java {
2352// toolchain {
2453// languageVersion = JavaLanguageVersion.of(17)
You can’t perform that action at this time.
0 commit comments