Subversion Repositories SmartDukaan

Rev

Rev 22427 | Rev 22874 | Go to most recent revision | 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: 'maven'
3
apply plugin: 'war'
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
 
17
     maven { url "http://repo.maven.apache.org/maven2" }
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
	}
37
	logger.info("Build is being build by "+environment)
38
}
39
 
40
tasks.build.doLast(){
41
	ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
42
		entry( key: "profile", value: "dev")
43
	}
44
}
45
 
46
 
22427 ashik.ali 47
dependencies {
48
	compile project (':profitmandi-common')
49
    compile project (':profitmandi-dao')
50
    compile (group: 'io.springfox', name: 'springfox-swagger-ui', version:'2.5.0'){ 
51
    	exclude(module: 'slf4j-api')
52
    }
53
    compile (group: 'io.springfox', name: 'springfox-swagger2', version:'2.5.0'){
54
    	exclude(module: 'slf4j-api')
55
    }
56
    compile group: 'com.eclipsesource.minimal-json', name: 'minimal-json', version:'0.9.4'
57
    compile group: 'com.google.code.gson', name: 'gson', version:'2.8.0'
58
    compile (group: 'eu.medsea.mimeutil', name: 'mime-util', version:'2.1.1'){ 
59
    	exclude(module: 'slf4j-api')
60
    	exclude(module: 'slf4j-log4j12')
61
    	exclude(module: 'log4j')
62
    }
63
}