Rev 24434 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
buildscript {ext {springBootVersion = '2.0.2.RELEASE'}repositories {mavenCentral()}dependencies {classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")}}apply plugin: 'java'apply plugin: 'eclipse'apply plugin: 'org.springframework.boot'apply plugin: 'io.spring.dependency-management'group = 'com.smartdukaan'version = '0.0.1-SNAPSHOT'sourceCompatibility = 1.8repositories {maven { url "http://repo.maven.apache.org/maven2" }mavenLocal()}task copyEnv{Set environments = ["dev", "staging", "prod"]def environment = "dev"if ( project.hasProperty("env") ) {if (environments.contains(project.getProperty("env"))) {environment = project.getProperty("env");} else {logger.warn("Invalid Environment value, Choose any 'dev', 'staging', 'prod'");logger.info("Environment set to dev");}} else {logger.info("Environment set to dev");}copy {from "src/main/resources/META-INF"into "src/main/resources/META-INF"include("${environment}.properties")rename "${environment}.properties", "env.properties"}logger.info("Build is being build by "+environment)}dependencies {compile('org.springframework.boot:spring-boot-starter') {exclude (module: 'logback-classic')exclude (module: 'spring-boot-starter-logging')}compile 'org.springframework.boot:spring-boot-starter-log4j2'compile ('org.springframework.boot:spring-boot-starter-cache'){exclude (module: 'logback-classic')exclude (module: 'spring-boot-starter-logging')}compile project (':profitmandi-common')compile project (':profitmandi-dao')}defaultTasks 'copyEnv', 'build'