Subversion Repositories SmartDukaan

Rev

Rev 22426 | Rev 22860 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22426 Rev 22530
Line 15... Line 15...
15
repositories {
15
repositories {
16
        
16
        
17
     maven { url "http://repo.maven.apache.org/maven2" }
17
     maven { url "http://repo.maven.apache.org/maven2" }
18
     mavenLocal()
18
     mavenLocal()
19
}
19
}
-
 
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
 
20
dependencies {
46
dependencies {
21
    compile project (':profitmandi-common')
47
    compile project (':profitmandi-common')
22
    compile project (':profitmandi-dao')
48
    compile project (':profitmandi-dao')
23
    compile (group: 'org.apache.velocity', name: 'velocity', version:'1.7'){ 
49
    compile (group: 'org.apache.velocity', name: 'velocity', version:'1.7'){ 
24
    	exclude(module: 'commons-logging')
50
    	exclude(module: 'commons-logging')