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

build.gradle 899B

12345678910111213141516171819202122232425262728293031323334
  1. subprojects { project ->
  2. apply plugin: "java"
  3. apply plugin: "eclipse"
  4. apply plugin: "idea"
  5. repositories {
  6. mavenCentral()
  7. }
  8. dependencies {
  9. testCompile "junit:junit:4.12"
  10. testCompile 'org.assertj:assertj-core:2.2.0'
  11. }
  12. sourceSets {
  13. // Verify that the tests are working by running them against the example code.
  14. // By replacing the "main" sourceSet with the example code we avoid any collisions
  15. // with solution code that may have been included as a "starter" (e.g. etl).
  16. main {
  17. java.srcDirs = ["src/example/java"]
  18. }
  19. project["compileJava"].doFirst { compileTask ->
  20. println " (source = " + compileTask.source.asPath + ")"
  21. }
  22. starterSource {
  23. java.srcDirs = ["src/main/java"]
  24. }
  25. project["compileStarterSourceJava"].doFirst { compileTask ->
  26. println " (source = " + compileTask.source.asPath + ")"
  27. }
  28. }
  29. }