lots of exercises in java... from https://github.com/exercism/java

build.gradle 544B

123456789101112131415161718
  1. subprojects { project ->
  2. apply plugin: "java"
  3. sourceSets {
  4. // Verify that the tests are working by running them against the example code.
  5. // By replacing the "main" sourceSet with the example code we avoid any collisions
  6. // with solution code that may have been included as a jumpstart (e.g. etl).
  7. main {
  8. java.srcDirs = ["src/example/java"]
  9. }
  10. println "Source directory for " + project.name + "'s main source set: " + main.java.srcDirs
  11. starterSource {
  12. java.srcDirs = ["src/main/java"]
  13. }
  14. }
  15. }