Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
22883 ashik.ali 1
apply plugin: 'java'
2
apply plugin: 'maven'
3
apply plugin: 'war'
4
apply plugin: "eclipse"
5
 
6
group = 'com.profitmandi'
7
version = '0.0.1-SNAPSHOT'
8
 
9
description = """profitmandi-admin"""
10
 
11
sourceCompatibility = 1.8
12
targetCompatibility = 1.8
13
 
14
 
15
 
16
repositories {
17
 
18
     maven { url "http://repo.maven.apache.org/maven2" }
19
     mavenLocal()
20
}
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
dependencies {
47
    compile project (':profitmandi-common')
48
    compile project (':profitmandi-dao')
49
 
50
    //compile group: 'dom4j', name: 'dom4j', version:'1.6'
51
    //compile group: 'org.springframework', name: 'spring-context-support', version:'4.3.5.RELEASE'
52
    //compile group: 'org.springframework', name: 'spring-tx', version:'4.3.5.RELEASE'
53
    //compile group: 'commons-fileupload', name: 'commons-fileupload', version:'1.3'
54
    compile (group: 'io.springfox', name: 'springfox-swagger-ui', version:'2.5.0'){ 
55
    	exclude(module: 'slf4j-api')
56
    }
57
    compile (group: 'io.springfox', name: 'springfox-swagger2', version:'2.5.0'){
58
    	exclude(module: 'slf4j-api')
59
    }
60
}