buildscript { repositories { mavenLocal() maven { url 'https://workhorse.lemanscorp.com/nexus/repository/public/' } } dependencies { classpath "org.grails:grails-gradle-plugin:$grailsVersion" classpath "org.grails.plugins:hibernate5:6.0.5" classpath "org.grails.plugins:views-gradle:1.1.2" // Lemans classpath 'net.saliman:gradle-cobertura-plugin:2.3.2' } } //version "0.1" - leave this out to get no version no. in the war filename - kkrebs 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: "jacoco" // Lemans apply plugin: 'net.saliman.cobertura' apply plugin: 'codenarc' repositories { mavenLocal() maven { url 'https://workhorse.lemanscorp.com/nexus/repository/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-plugin-async" compile "org.grails:grails-web-boot" compile "org.grails:grails-logging" compile "org.grails.plugins:cache" compile "org.grails.plugins:hibernate5" compile "org.hibernate:hibernate-core:5.1.2.Final" compile "org.hibernate:hibernate-ehcache:5.1.2.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 group: 'com.opencsv', name: 'opencsv', version: '4.5' compile 'org.apache.poi:poi:3.14' compile 'org.apache.poi:poi-ooxml:3.14' compile 'org.apache.poi:poi-ooxml-schemas:3.13' compile 'org.gsheets.kktec:gsheets:0.4.2' compile 'org.grails.plugins:quartz:2.0.12' 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" testCompile "org.grails:grails-plugin-testing" // testCompile "org.grails:grails-datastore-rest-client" // Lemans compile 'org.apache.poi:poi-ooxml-schemas:3.13' compile 'org.apache.poi:ooxml-schemas:1.3' compile 'org.apache.poi:poi:3.14' compile ('org.apache.poi:poi-ooxml:3.14') { transitive = false } compile 'org.gsheets.kktec:gsheets:0.4.2' 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 'org.apache.tika:tika-core:1.4' provided 'com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11' // RabbitMQ compile "org.grails.plugins:rabbitmq-native:3.4.4" compile 'com.lemans.grails.plugins:lemans-core:0.2.0c' compile 'com.lemans.grails.plugins:lemans-security:0.1.2c' compile 'com.lemans.grails.plugins:lemans-rest:0.1.0d' testCompile 'com.lemans.grails.plugins:lemans-testing:0.1.0' compile group: 'org.apache.solr', name: 'solr-solrj', version: '7.4.0' compile 'javax.mail:mail:1.4.5' compile 'dumbster:dumbster:1.6' } task wrapper(type: Wrapper) { gradleVersion = gradleWrapperVersion } //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 } codenarc { toolVersion = '1.0' configFile = file("${project.projectDir}/codenarc/rules.groovy") } 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 }