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

build.gradle 703B

1234567891011121314151617181920212223
  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 "starter" (e.g. etl).
  7. main {
  8. java.srcDirs = ["src/example/java"]
  9. }
  10. project["compileJava"].doFirst { compileTask ->
  11. println " (source = " + compileTask.source.asPath + ")"
  12. }
  13. starterSource {
  14. java.srcDirs = ["src/main/java"]
  15. }
  16. project["compileStarterSourceJava"].doFirst { compileTask ->
  17. println " (source = " + compileTask.source.asPath + ")"
  18. }
  19. }
  20. }