Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // (ATB)
- buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.3.0'
- }
- }
- plugins {
- id "fr.putnami.gwt" version "0.4.0"
- }
- apply plugin: 'war'
- apply plugin: 'java'
- apply plugin: 'eclipse'
- apply plugin: 'jacoco'
- apply plugin: 'info.solidsoft.pitest'
- //Java version compatibility to use when compiling Java source.
- sourceCompatibility = 1.8
- //Java version to generate classes for.
- targetCompatibility = 1.8
- //Script Version
- version = '1.0'
- repositories {
- mavenCentral()
- }
- dependencies {
- testCompile 'junit:junit:4.12'
- testCompile 'org.easymock:easymock:2.5.2'
- testCompile 'com.google.gwt:gwt-dev:2.8.1'
- }
- pitest {
- targetClasses = ['pt.isep.cms.*']
- threads = 4
- outputFormats = ['HTML']
- timestampedReports = false
- }
- javadoc {
- println 'Rendering javadoc Task'
- source = sourceSets.main.allJava
- options.overview = "src/main/javadoc/overview.html" // relative to source root
- options.addStringOption("sourcepath","");
- }
- task renderPlantUml(type: RenderPlantUmlTask) {
- println 'Rendering PlantUML Task'
- }
- task generateDocs {
- dependsOn javadoc
- dependsOn renderPlantUml
- }
- // If we woant to use the default ant build inside gradle
- // ant.importBuild "build.xml"
- putnami{
- module 'pt.isep.cms.Showcase'
- //module 'com.google.gwt.sample.contacts.Contacts'
- /** add gwt nature on eclipse project. require apply plugin: 'eclipse' to work. default : false*/
- googlePluginEclipse = true
- gwtVersion='2.8.1'
- compile {
- sourceLevel = '1.8'
- }
- jetty {
- /** enable debugging. */
- debugJava = true
- /** debug port to listen. */
- debugPort = 8000
- /** wait for debugger attachment. */
- debugSuspend = false
- }
- }
- // Jacoco
- jacocoTestReport {
- reports {
- xml.enabled false
- csv.enabled false
- }
- }
- // This task generates the coverage report for the integration tests.
- // 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
- task jacocoIntegrationReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
- sourceSets sourceSets.main
- executionData = files("${buildDir}/jacoco/integrationTest.exec")
- reports {
- html.enabled = true
- xml.enabled = false
- csv.enabled = false
- }
- }
- // Integration Tests
- task integrationTest(type: Test) {
- filter {
- //all GWT unit tests, by naming convention
- includeTestsMatching "*GWTTest*"
- }
- jacoco {
- append = true
- enabled = true
- //classDumpFile = file("${buildDir}/jacoco/classpathdumps")
- excludes = ["com/steadystate/**"]
- }
- // These Properties are required to run gwt integration tests
- systemProperties['gwt.args'] = "-devMode -logLevel WARN -war www-test"
- }
- tasks.withType(Test) {
- reports.html.destination = file("${reporting.baseDir}/${name}")
- }
- // Unit Tests
- test {
- filter {
- //all JRE unit tests, by naming convention
- includeTestsMatching "*JRETest*"
- }
- jacoco {
- append = true
- enabled = true
- //classDumpFile = file("${buildDir}/jacoco/classpathdumps")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement