Subversion Repositories SmartDukaan

Rev

Rev 22426 | Rev 22860 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22426 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-fofo"""
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
     mavenLocal()
19
}
22530 ashik.ali 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
 
22426 ashik.ali 46
dependencies {
47
    compile project (':profitmandi-common')
48
    compile project (':profitmandi-dao')
49
    compile (group: 'org.apache.velocity', name: 'velocity', version:'1.7'){ 
50
    	exclude(module: 'commons-logging')
51
    	exclude(module: 'commons-digester')
52
    }
53
 
54
    compile (group: 'org.apache.velocity', name: 'velocity-tools', version:'2.0'){ 
55
    	exclude(module: 'commons-logging')
56
    	exclude(module: 'commons-digester')
57
    	//exclude(module: 'commons-collections')
58
    	exclude(module: 'dom4j')
59
    	exclude(module: 'antlr')
60
    	exclude(module: 'velocity')
61
 
62
    }
63
}