Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. // (ATB)
  2. buildscript {
  3. repositories {
  4. jcenter()
  5. }
  6. dependencies {
  7. classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.3.0'
  8. }
  9. }
  10.  
  11. plugins {
  12. id "fr.putnami.gwt" version "0.4.0"
  13. }
  14.  
  15. apply plugin: 'war'
  16. apply plugin: 'java'
  17. apply plugin: 'eclipse'
  18. apply plugin: 'jacoco'
  19. apply plugin: 'info.solidsoft.pitest'
  20.  
  21. //Java version compatibility to use when compiling Java source.
  22. sourceCompatibility = 1.8
  23. //Java version to generate classes for.
  24. targetCompatibility = 1.8
  25. //Script Version
  26. version = '1.0'
  27.  
  28. repositories {
  29. mavenCentral()
  30. }
  31.  
  32. dependencies {
  33. testCompile 'junit:junit:4.12'
  34. testCompile 'org.easymock:easymock:2.5.2'
  35. testCompile 'com.google.gwt:gwt-dev:2.8.1'
  36. }
  37.  
  38. pitest {
  39. targetClasses = ['pt.isep.cms.*']
  40. threads = 4
  41. outputFormats = ['HTML']
  42. timestampedReports = false
  43. }
  44.  
  45. javadoc {
  46. println 'Rendering javadoc Task'
  47. source = sourceSets.main.allJava
  48. options.overview = "src/main/javadoc/overview.html" // relative to source root
  49. options.addStringOption("sourcepath","");
  50. }
  51.  
  52. task renderPlantUml(type: RenderPlantUmlTask) {
  53. println 'Rendering PlantUML Task'
  54. }
  55.  
  56. task generateDocs {
  57. dependsOn javadoc
  58. dependsOn renderPlantUml
  59. }
  60.  
  61. // If we woant to use the default ant build inside gradle
  62. // ant.importBuild "build.xml"
  63.  
  64. putnami{
  65.  
  66. module 'pt.isep.cms.Showcase'
  67. //module 'com.google.gwt.sample.contacts.Contacts'
  68.  
  69. /** add gwt nature on eclipse project. require apply plugin: 'eclipse' to work. default : false*/
  70. googlePluginEclipse = true
  71.  
  72. gwtVersion='2.8.1'
  73.  
  74. compile {
  75. sourceLevel = '1.8'
  76. }
  77.  
  78. jetty {
  79. /** enable debugging. */
  80. debugJava = true
  81. /** debug port to listen. */
  82. debugPort = 8000
  83. /** wait for debugger attachment. */
  84. debugSuspend = false
  85. }
  86. }
  87.  
  88. // Jacoco
  89. jacocoTestReport {
  90. reports {
  91. xml.enabled false
  92. csv.enabled false
  93. }
  94. }
  95.  
  96. // This task generates the coverage report for the integration tests.
  97. // Notice that it only includes data about the server code sice Jaccoco is not able to get data about cliente code that is transpiled to javascript
  98. task jacocoIntegrationReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
  99. sourceSets sourceSets.main
  100.  
  101. executionData = files("${buildDir}/jacoco/integrationTest.exec")
  102.  
  103. reports {
  104. html.enabled = true
  105. xml.enabled = false
  106. csv.enabled = false
  107. }
  108. }
  109.  
  110. // Integration Tests
  111. task integrationTest(type: Test) {
  112. filter {
  113. //all GWT unit tests, by naming convention
  114. includeTestsMatching "*GWTTest*"
  115. }
  116. jacoco {
  117. append = true
  118. enabled = true
  119. //classDumpFile = file("${buildDir}/jacoco/classpathdumps")
  120.  
  121. excludes = ["com/steadystate/**"]
  122. }
  123. // These Properties are required to run gwt integration tests
  124. systemProperties['gwt.args'] = "-devMode -logLevel WARN -war www-test"
  125. }
  126.  
  127. tasks.withType(Test) {
  128. reports.html.destination = file("${reporting.baseDir}/${name}")
  129. }
  130.  
  131. // Unit Tests
  132. test {
  133. filter {
  134. //all JRE unit tests, by naming convention
  135. includeTestsMatching "*JRETest*"
  136. }
  137. jacoco {
  138. append = true
  139. enabled = true
  140. //classDumpFile = file("${buildDir}/jacoco/classpathdumps")
  141. }
  142. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement