249 lines
9.1 KiB
Groovy
249 lines
9.1 KiB
Groovy
description = '''\
|
|
Run as:
|
|
gradle clean tomcatrunwar
|
|
'''
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
mavenRepo(name: 'zt-public-snapshots',
|
|
url: 'http://repos.zeroturnaround.com/nexus/content/groups/zt-public/')
|
|
}
|
|
|
|
dependencies {
|
|
classpath group: 'org.zeroturnaround', name: 'gradle-jrebel-plugin', version: '1.0.2-SNAPSHOT'
|
|
}
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:0.9.7'
|
|
}
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.5.0'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'rebel'
|
|
apply plugin: 'license'
|
|
apply plugin: 'war'
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'tomcat'
|
|
apply plugin: 'project-report'
|
|
|
|
/* define the valid syntax level for source files */
|
|
sourceCompatibility = JavaVersion.VERSION_1_6
|
|
/* define binary compatiblity version */
|
|
targetCompatibility = JavaVersion.VERSION_1_6
|
|
|
|
project.ext.springVersion = '3.2.1.RELEASE'
|
|
project.ext.springSecurityVersion = '3.1.3.RELEASE'
|
|
project.ext.hibernateValidatorVersion = '4.3.1.Final'
|
|
project.ext.hibernateCoreVersion = '4.1.9.Final'
|
|
project.ext.jerseyVersion = '1.17'
|
|
project.ext.springDataJpaVersion = '1.2.1.RELEASE'
|
|
|
|
group = 'org.mifosplatform'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven {
|
|
url "http://maven.springframework.org/release"
|
|
}
|
|
maven {
|
|
url "http://download.java.net/maven/2"
|
|
}
|
|
maven {
|
|
url "http://repository.pentaho.org/artifactory/pentaho/"
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
providedCompile
|
|
compile
|
|
runtime
|
|
all*.exclude group: 'commons-logging'
|
|
}
|
|
|
|
dependencies {
|
|
def tomcatVersion = '7.0.37'
|
|
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
|
|
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}"
|
|
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
|
|
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
|
|
}
|
|
tomcat "org.apache.tomcat:tomcat-dbcp:${tomcatVersion}"
|
|
|
|
providedCompile(
|
|
[group: 'javax.servlet', name: 'servlet-api', version: '2.5'],
|
|
)
|
|
|
|
compile(
|
|
[group: 'org.springframework', name: 'spring-core', version: springVersion],
|
|
[group: 'org.springframework', name: 'spring-aspects', version: springVersion],
|
|
[group: 'org.springframework', name: 'spring-web', version: springVersion],
|
|
[group: 'org.springframework.security', name: 'spring-security-core', version: springSecurityVersion],
|
|
[group: 'org.springframework.security', name: 'spring-security-web', version: springSecurityVersion],
|
|
[group: 'org.springframework.security', name: 'spring-security-config', version: springSecurityVersion],
|
|
[group: 'org.aspectj', name: 'aspectjrt', version: '1.7.0.RELEASE'],
|
|
|
|
[group: 'org.hibernate', name: 'hibernate-core', version: hibernateCoreVersion],
|
|
[group: 'org.hibernate', name: 'hibernate-entitymanager', version: hibernateCoreVersion],
|
|
[group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.0-api', version: '1.0.1.Final'],
|
|
|
|
[group: 'javax.ws.rs', name: 'jsr311-api', version: '1.1.1'],
|
|
[group: 'com.sun.jersey', name: 'jersey-core', version: jerseyVersion],
|
|
[group: 'com.sun.jersey', name: 'jersey-servlet', version: jerseyVersion],
|
|
[group: 'com.sun.jersey', name: 'jersey-server', version: jerseyVersion],
|
|
[group: 'com.sun.jersey', name: 'jersey-json', version: jerseyVersion],
|
|
[group: 'com.sun.jersey.contribs', name: 'jersey-spring', version: jerseyVersion],
|
|
[group: 'com.sun.jersey.contribs', name: 'jersey-multipart', version: jerseyVersion],
|
|
|
|
[group: 'com.google.code.gson', name: 'gson', version: '2.2.2'],
|
|
[group: 'com.google.guava', name: 'guava', version: '14.0-rc2'],
|
|
|
|
[group: 'org.springframework.data', name: 'spring-data-jpa', version: springDataJpaVersion],
|
|
|
|
[group: 'joda-time', name: 'joda-time', version: '2.1'],
|
|
[group: 'net.sourceforge.javacsv', name: 'javacsv', version: '2.0'],
|
|
[group: 'org.apache.commons', name: 'commons-email', version: '1.2'],
|
|
[group: 'commons-lang', name: 'commons-lang', version: '2.4'],
|
|
|
|
[group: 'org.slf4j', name: 'slf4j-api', version: '1.7.2'],
|
|
[group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.2'],
|
|
|
|
[group: 'ch.qos.logback', name: 'logback-core', version: '1.0.9'],
|
|
[group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.9'],
|
|
|
|
[group: 'mysql', name: 'mysql-connector-java', version: '5.1.22'],
|
|
[group: 'org.apache.tomcat', name: 'tomcat-jdbc', version: '7.0.34'],
|
|
|
|
[group: 'pentaho-reporting-engine', name: 'pentaho-reporting-engine-classic-core', version: '3.9.1.1'],
|
|
[group: 'pentaho-reporting-engine', name: 'pentaho-reporting-engine-classic-extensions', version: '3.9.1-GA'],
|
|
[group: 'pentaho-reporting-engine', name: 'pentaho-reporting-engine-classic-extensions-scripting', version: '3.9.1-GA'],
|
|
[group: 'pentaho-reporting-engine', name: 'pentaho-reporting-engine-wizard-core', version: '3.9.1-GA'],
|
|
[group: 'pentaho-report-designer', name: 'pentaho-reporting-engine-wizard-xul', version: '3.9.1-GA'],
|
|
|
|
[group: 'pentaho-library', name: 'libbase', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'libdocbundle', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'libfonts', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'libformat', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'libformula', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'libloader', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'librepository', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'libserializer', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'libsparkline', version: '1.2.8'],
|
|
[group: 'pentaho-library',name: 'libxml', version: '1.2.8'],
|
|
|
|
[group: 'org.apache.poi',name: 'poi', version: '3.9'],
|
|
[group: 'org.apache.poi',name: 'poi-ooxml', version: '3.9'],
|
|
[group: 'org.apache.poi',name: 'poi-ooxml-schemas', version: '3.9'],
|
|
|
|
[group: 'com.lowagie', name: 'itext', version: '2.1.7'],
|
|
[group: 'com.lowagie', name: 'itext-rtf', version: '2.1.7'],
|
|
[group: 'org.mnode.ical4j', name: 'ical4j', version: '1.0.4'],
|
|
[group: 'com.googlecode.flyway', name: 'flyway-maven-plugin', version: '2.1.1']
|
|
)
|
|
|
|
testCompile 'junit:junit:4.10',
|
|
'org.mockito:mockito-all:1.9.0',
|
|
'org.hamcrest:hamcrest-all:1.1',
|
|
'com.jayway.restassured:rest-assured:1.7.2'
|
|
|
|
}
|
|
|
|
task dist(type:Zip){
|
|
baseName= 'mifosplatform'
|
|
version = qualifyVersionIfNecessary(releaseVersion)
|
|
from('src/main/pentahoReports/') {
|
|
fileMode = 0755
|
|
include '*'
|
|
into('pentahoReports')
|
|
}
|
|
from jar.outputs.files
|
|
from war.outputs.files
|
|
}
|
|
|
|
task deployPentahoReports() {
|
|
def pentahoReportDir = System.properties['user.home'] + System.properties['file.separator'] + '.mifosx' + System.properties['file.separator'] + 'pentahoReports'
|
|
println ":deployPentahoReports - moving pentaho reports under: " + pentahoReportDir
|
|
copy {
|
|
from "src/main/pentahoReports"
|
|
into pentahoReportDir
|
|
}
|
|
}
|
|
|
|
war {
|
|
it.dependsOn deployPentahoReports
|
|
}
|
|
|
|
license {
|
|
header rootProject.file('../LICENSE.MD')
|
|
strictCheck true
|
|
}
|
|
|
|
tomcatRun {
|
|
httpPort = 8080
|
|
httpsPort = 8443
|
|
stopPort = 8081
|
|
enableSSL = true
|
|
configFile = file('src/test/resources/META-INF/context.xml')
|
|
}
|
|
|
|
tomcatRunWar {
|
|
httpPort = 8080
|
|
httpsPort = 8443
|
|
stopPort = 8081
|
|
enableSSL = true
|
|
configFile = file('src/test/resources/META-INF/context.xml')
|
|
}
|
|
|
|
|
|
sourceSets {
|
|
integrationTest {
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
integrationTestCompile.extendsFrom testCompile
|
|
integrationTestRuntime.extendsFrom testRuntime
|
|
}
|
|
|
|
task integrationTest(type:Test){
|
|
description = "Run integration tests (located in src/integrationTest/java). Requires server to be running."
|
|
testClassesDir = project.sourceSets.integrationTest.output.classesDir
|
|
classpath = project.sourceSets.integrationTest.runtimeClasspath
|
|
}
|
|
|
|
|
|
/*
|
|
* Support publication of artifacts versioned by topic branch.
|
|
* CI builds supply `-P BRANCH_NAME=<TOPIC>` to gradle at build time.
|
|
* If <TOPIC> starts with 'MIFOSX-', change version
|
|
* from BUILD-SNAPSHOT => <TOPIC>-SNAPSHOT
|
|
* e.g. 1.1.0.BUILD-SNAPSHOT => 1.0.0.MIFOSX-1234-SNAPSHOT
|
|
*/
|
|
def qualifyVersionIfNecessary(version) {
|
|
|
|
if (rootProject.hasProperty("BRANCH_NAME")) {
|
|
def qualifier = rootProject.getProperty("BRANCH_NAME")
|
|
if (qualifier.startsWith("MIFOSX-")) {
|
|
return version.replace('BUILD', qualifier)
|
|
}
|
|
}
|
|
return version
|
|
} |