Subversion Repositories SmartDukaan

Rev

Rev 23114 | Rev 23951 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'war'
apply plugin: "eclipse"

group = 'com.profitmandi'
version = '0.0.1-SNAPSHOT'

description = """profitmandi-fofo"""

sourceCompatibility = 1.8
targetCompatibility = 1.8



repositories {
        
     maven { url "http://repo.maven.apache.org/maven2" }
     mavenLocal()
}


task run{
        Set environments = ["dev", "staging", "prod"]
        def environment = "dev"
    if ( project.hasProperty("env") ) {
        environment = project.getProperty("env")
        if(!environments.contains(environment)){ 
                logger.warn("Invalid Environment value, Choose any 'dev', 'staging', 'prod'");
                environment = "dev"
        } 
    }else{ 
        logger.warn("Invalid key")
    }
    ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
                entry( key: "profile", value: environment)
        }
        logger.info("Build is being build by "+environment)
}

tasks.build.doLast(){
        ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
                entry( key: "profile", value: "dev")
        }
}

dependencies {
    compile project (':profitmandi-common')
    compile project (':profitmandi-dao')
    compile (group: 'org.apache.velocity', name: 'velocity', version:'1.7'){ 
        exclude(module: 'commons-logging')
        exclude(module: 'commons-digester')
    }
    
    compile (group: 'org.apache.velocity', name: 'velocity-tools', version:'2.0'){ 
        exclude(module: 'commons-logging')
        exclude(module: 'commons-digester')
        //exclude(module: 'commons-collections')
        exclude(module: 'dom4j')
        exclude(module: 'antlr')
        exclude(module: 'velocity')
        
    }
    testCompile "junit:junit:4.12"
}

test {
    testLogging.showStandardStreams = true
    // for enable or disable test cases
    
    exclude 'com/spice/profitmandi/service/generic/GenericServiceTest.class'
}