Subversion Repositories SmartDukaan

Rev

Rev 37491 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22427 ashik.ali 1
apply plugin: 'java'
2
apply plugin: 'war'
22874 ashik.ali 3
apply plugin: "eclipse"
22427 ashik.ali 4
 
5
group = 'com.profitmandi'
6
version = '0.0.1-SNAPSHOT'
7
 
8
description = """profitmandi-web"""
9
 
10
sourceCompatibility = 1.8
11
targetCompatibility = 1.8
12
 
13
 
14
 
15
repositories {
16
 
26217 amit.gupta 17
     maven { url "https://repo.maven.apache.org/maven2" }
22427 ashik.ali 18
     mavenCentral()
19
 
20
}
22531 ashik.ali 21
 
22
task run{
23
	Set environments = ["dev", "staging", "prod"]
24
	def environment = "dev"
25
    if ( project.hasProperty("env") ) {
26
    	environment = project.getProperty("env")
27
    	if(!environments.contains(environment)){ 
28
    		logger.warn("Invalid Environment value, Choose any 'dev', 'staging', 'prod'");
29
    		environment = "dev"
30
    	} 
31
    }else{ 
32
    	logger.warn("Invalid key")
33
    }
34
    ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
35
		entry( key: "profile", value: environment)
36
	}
37726 amit 37
	// Sentry/GlitchTip reports ONLY from a deliberate staging/prod build, and is
38
	// labelled with that environment. A plain local build leaves the committed
39
	// enabled=false in place, so a developer's laptop cannot post to the live board.
40
	ant.propertyfile( file: "src/main/resources/sentry.properties"){
41
	    entry( key: "enabled", value: (environment == "dev" ? "false" : "true"))
42
	    entry( key: "environment", value: environment)
43
	}
22531 ashik.ali 44
	logger.info("Build is being build by "+environment)
45
}
46
 
47
tasks.build.doLast(){
48
	ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
49
		entry( key: "profile", value: "dev")
50
	}
37726 amit 51
	ant.propertyfile( file: "src/main/resources/sentry.properties"){
52
	    entry( key: "enabled", value: "false")
53
	    entry( key: "environment", value: "dev")
54
	}
22531 ashik.ali 55
}
56
 
57
 
22427 ashik.ali 58
dependencies {
37491 amit 59
    // Ships ERROR-level log events to GlitchTip (self-hosted, Sentry protocol).
60
    // Pinned to 7.x: 8.x drops Java 8. Verified class major version 52.
61
    implementation 'io.sentry:sentry-log4j2:7.22.6'
62
 
22427 ashik.ali 63
	compile project (':profitmandi-common')
64
    compile project (':profitmandi-dao')
27028 tejbeer 65
 
66
 
67
    compile group: 'org.apache.velocity',  name: 'velocity', version: '1.7'
68
 
22427 ashik.ali 69
    compile (group: 'io.springfox', name: 'springfox-swagger-ui', version:'2.5.0'){ 
70
    	exclude(module: 'slf4j-api')
71
    }
72
    compile (group: 'io.springfox', name: 'springfox-swagger2', version:'2.5.0'){
73
    	exclude(module: 'slf4j-api')
74
    }
75
    compile group: 'com.eclipsesource.minimal-json', name: 'minimal-json', version:'0.9.4'
76
    compile group: 'com.google.code.gson', name: 'gson', version:'2.8.0'
77
    compile (group: 'eu.medsea.mimeutil', name: 'mime-util', version:'2.1.1'){ 
78
    	exclude(module: 'slf4j-api')
79
    	exclude(module: 'slf4j-log4j12')
80
    	exclude(module: 'log4j')
81
    }
23704 amit.gupta 82
   //compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.5'
23947 tejbeer 83
 
84
   compile 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6'
85
   	compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6:'
86
	compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6'
35389 amit 87
	// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api
88
	implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5'
89
 
35599 amit 90
	// HikariCP Connection Pool
91
	implementation 'com.zaxxer:HikariCP:3.4.5'
35389 amit 92
 
36418 amit 93
	testImplementation 'junit:junit:4.13.2'
94
	testImplementation 'org.mockito:mockito-core:3.12.4'
95
 
22427 ashik.ali 96
}