Subversion Repositories SmartDukaan

Rev

Blame | 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-admin"""

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: 'dom4j', name: 'dom4j', version:'1.6'
    //compile group: 'org.springframework', name: 'spring-context-support', version:'4.3.5.RELEASE'
    //compile group: 'org.springframework', name: 'spring-tx', version:'4.3.5.RELEASE'
    //compile group: 'commons-fileupload', name: 'commons-fileupload', version:'1.3'
    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')
    }
}