Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <project>/build/reports/tests
  2.  
  3. <project>/build/intTest
  4.  
  5. <project>/build/reports/test
  6. <project>/build/reports/intTest
  7.  
  8. buildscript {
  9. repositories {
  10. jcenter()
  11. }
  12. dependencies {
  13. classpath 'org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:1.2.0'
  14. }
  15. }
  16.  
  17. apply plugin: 'java'
  18. apply plugin: 'org.unbroken-dome.test-sets'
  19.  
  20. defaultTasks = ['clean', 'build']
  21.  
  22. tasks.withType(Test) {
  23. reports.html.destination = new File(project.reportsDir, name)
  24.  
  25. println(it.name + 't' + reports.html.destination)
  26. }
  27.  
  28. task wrapper(type: Wrapper) {
  29. description = 'Defines the common gradle distribution for this project.'
  30. gradleVersion = '2.14.1'
  31. }
  32.  
  33. testSets {
  34. intTest
  35. }
  36.  
  37. intTest.dependsOn test
  38. check.dependsOn intTest
  39.  
  40. repositories {
  41. jcenter()
  42. }
  43.  
  44. dependencies {
  45. testCompile 'junit:junit:4.12'
  46. intTestCompile 'junit:junit:4.12'
  47. }
  48.  
  49. println('===== final config =====')
  50. println(test.name + 't' + test.reports.html.destination)
  51. println(intTest.name + 't' + intTest.reports.html.destination)
  52.  
  53. $ ls build/
  54. classes dependency-cache intTest intTest-results libs reports test-results tmp
  55.  
  56. $ ls build/reports/
  57. test
  58.  
  59. test /home/wujek/blob/build/reports/test
  60. intTest /home/wujek/blob/build/reports/intTest
  61. ===== final config =====
  62. test /home/wujek/blob/build/reports/test
  63. intTest /home/wujek/blob/build/intTest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement