buildscript { repositories { mavenLocal() maven { url 'http://workhorse.lemanscorp.com/nexus/content/groups/public/' } } dependencies { classpath "org.grails:grails-gradle-plugin:$grailsVersion" classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}" classpath "org.grails.plugins:views-gradle:1.2.9" //Lemans classpath 'net.saliman:gradle-cobertura-plugin:2.3.2' } } group 'com.lemans.services' defaultTasks 'clean', 'check', 'cobertura' apply plugin:"eclipse" apply plugin:"idea" apply plugin:"war" apply plugin:"org.grails.grails-web" apply plugin:"org.grails.plugins.views-json" apply plugin:"org.grails.grails-gsp" apply plugin: "jacoco" //Lemans apply plugin: 'net.saliman.cobertura' apply plugin: 'codenarc' repositories { mavenLocal() maven { url 'http://workhorse.lemanscorp.com/nexus/content/groups/public/' } } dependencyManagement { imports { mavenBom "org.grails:grails-bom:$grailsVersion" } applyMavenExclusions false } //Lemans configurations { compile.exclude module: 'commons-logging' } dependencies { testCompile "org.springframework.boot:spring-boot-starter-logging" //Lemans compile "org.springframework.boot:spring-boot-autoconfigure" compile "org.grails:grails-core" compile "org.springframework.boot:spring-boot-starter-actuator" compile "org.springframework.boot:spring-boot-actuator-docs" //Lemans provided "org.springframework.boot:spring-boot-starter-tomcat" //Lemans compile "org.grails:grails-plugin-url-mappings" compile "org.grails:grails-plugin-rest" compile "org.grails:grails-plugin-codecs" compile "org.grails:grails-plugin-interceptors" compile "org.grails:grails-plugin-services" compile "org.grails:grails-plugin-datasource" compile "org.grails:grails-plugin-databinding" compile "org.grails:grails-web-boot" compile "org.grails:grails-logging" compile "org.grails.plugins:cache" compile "org.grails.plugins:async" compile "org.grails.plugins:events" compile "org.grails.plugins:hibernate5" compile "org.hibernate:hibernate-core:5.1.16.Final" compile "org.hibernate:hibernate-ehcache:5.1.16.Final" compile "org.grails.plugins:views-json" compile "org.grails.plugins:views-json-templates" console "org.grails:grails-console" profile "org.grails.profiles:rest-api" compile 'org.grails.plugins:gsp' provided "org.slf4j:slf4j-api:1.7.20" provided "org.slf4j:jcl-over-slf4j:1.7.21" provided "org.slf4j:jul-to-slf4j:1.7.21" provided "org.slf4j:log4j-over-slf4j:1.7.21" provided "ch.qos.logback:logback-core" provided "ch.qos.logback:logback-classic" compile 'lemans:xml-json:0.14' compile 'org.apache.httpcomponents:httpclient:4.5.3' compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.2' compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.3' testCompile "org.grails:grails-test-mixins:3.3.0" compile 'com.lemans.grails.plugins:lemans-core:0.2.0a' compile 'com.lemans.grails.plugins:lemans-security:0.2.0a' compile 'com.lemans.grails.plugins:lemans-rest:0.2.0a' compile 'org.grails.plugins:rendering:2.0.3' testCompile 'com.lemans.grails.plugins:lemans-testing:0.2.0a' provided 'net.sourceforge.jtds:jtds:1.3.1' compile 'org.apache.tika:tika-core:1.4' runtime "org.springframework:spring-test" compile group: 'org.spockframework', name: 'spock-grails-support', version: '0.7-groovy-2.0' } /*bootRun { jvmArgs('-Dspring.output.ansi.enabled=always') addResources = true String springProfilesActive = 'spring.profiles.active' systemProperty springProfilesActive, System.getProperty(springProfilesActive) } tasks.withType(Test) { systemProperty "geb.env", System.getProperty('geb.env') systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest") systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver') systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver') }*/ task wrapper(type: Wrapper) { gradleVersion = gradleWrapperVersion } codenarc { toolVersion = '1.0' configFile = file("${project.projectDir}/codenarc/rules.groovy") maxPriority1Violations = 1000 maxPriority2Violations = 1000 maxPriority3Violations = 1000 } //Extra Lemans Config Section: grails { // deals with 'command line too long' issue when running Grails commands in Idea pathingJar = true } tasks.withType(Test) { testLogging { showStandardStreams = true } systemProperties System.properties } tasks.withType(JavaExec) { systemProperties System.properties } cobertura { coverageExcludes = ['.*Application.*'] // NOTE: It looks like coverage has false negatives. This may fix it - kkrebs coverageMergeDatafiles = [file("${project.buildDir.path}/cobertura/cobertura.ser"), file("${project.buildDir.path}/cobertura/coberturaInput.ser")] } // Investigating using JaCoCo instead of Cobertura - kkrebs // This is experimental. Results leave a lot to be desired at this time, 2016-09-29 // Execute task jacocoTestReport to try it. test { jacoco { includes ['com/lemans/**'] } } jacocoTestReport.dependsOn test, integrationTest jacocoTestReport.doFirst{ classDirectories = files('build/classes/main/com/lemans') } jacocoTestReport { // executionData files('build/jacoco/unitTest.exec', 'build/jacoco/integrationTest.exec') executionData integrationTest, test // sourceSets sourceSets.main }