Subversion Repositories SmartDukaan

Rev

Rev 22531 | Rev 23704 | 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-web"""

sourceCompatibility = 1.8
targetCompatibility = 1.8



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

}

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: 'io.springfox', name: 'springfox-swagger-ui', version:'2.5.0'){ 
        exclude(module: 'slf4j-api')
    }
    compile (group: 'io.springfox', name: 'springfox-swagger2', version:'2.5.0'){
        exclude(module: 'slf4j-api')
    }
    compile group: 'com.eclipsesource.minimal-json', name: 'minimal-json', version:'0.9.4'
    compile group: 'com.google.code.gson', name: 'gson', version:'2.8.0'
    compile (group: 'eu.medsea.mimeutil', name: 'mime-util', version:'2.1.1'){ 
        exclude(module: 'slf4j-api')
        exclude(module: 'slf4j-log4j12')
        exclude(module: 'log4j')
    }
}