Rev 37491 | Blame | Compare with Previous | Last modification | View Log | RSS feed
apply plugin: 'java'apply plugin: 'war'apply plugin: "eclipse"group = 'com.profitmandi'version = '0.0.1-SNAPSHOT'description = """profitmandi-web"""sourceCompatibility = 1.8targetCompatibility = 1.8repositories {maven { url "https://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)}// Sentry/GlitchTip reports ONLY from a deliberate staging/prod build, and is// labelled with that environment. A plain local build leaves the committed// enabled=false in place, so a developer's laptop cannot post to the live board.ant.propertyfile( file: "src/main/resources/sentry.properties"){entry( key: "enabled", value: (environment == "dev" ? "false" : "true"))entry( key: "environment", 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")}ant.propertyfile( file: "src/main/resources/sentry.properties"){entry( key: "enabled", value: "false")entry( key: "environment", value: "dev")}}dependencies {// Ships ERROR-level log events to GlitchTip (self-hosted, Sentry protocol).// Pinned to 7.x: 8.x drops Java 8. Verified class major version 52.implementation 'io.sentry:sentry-log4j2:7.22.6'compile project (':profitmandi-common')compile project (':profitmandi-dao')compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'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')}//compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.5'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'// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-apiimplementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5'// HikariCP Connection Poolimplementation 'com.zaxxer:HikariCP:3.4.5'testImplementation 'junit:junit:4.13.2'testImplementation 'org.mockito:mockito-core:3.12.4'}