Subversion Repositories SmartDukaan

Rev

Rev 33265 | 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'
//apply plugin: 'nebula.provided-base'


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

description = """profitmandi-fofo"""

sourceCompatibility = 1.8
targetCompatibility = 1.8
ext['log4j2.version'] = '2.15.0'


repositories {

    mavenCentral()
    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.warn("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-engine-core', version: '2.3') {
        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')

    }
    compile 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6'
    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6:'
    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6'
    compile group: 'org.apache.commons', name: 'commons-csv', version: '1.5'
    compile 'org.apache.poi:poi-ooxml:3.16'
    // https://mvnrepository.com/artifact/org.xhtmlrenderer/core-renderer
    compile group: 'org.xhtmlrenderer', name: 'core-renderer', version: 'R8'

    // Add HikariCP dependency
    implementation 'com.zaxxer:HikariCP:3.4.5' // Use the latest version

    testCompile "junit:junit:4.12"
    //provided 'org.projectlombok:lombok:1.18.2'
}

test {
    testLogging.showStandardStreams = true
    // for enable or disable test cases

    exclude 'com/spice/profitmandi/service/generic/GenericServiceTest.class'
}