| 22426 |
ashik.ali |
1 |
apply plugin: 'java'
|
|
|
2 |
apply plugin: 'maven'
|
|
|
3 |
apply plugin: 'war'
|
| 24313 |
amit.gupta |
4 |
apply plugin: 'eclipse'
|
|
|
5 |
//apply plugin: 'nebula.provided-base'
|
| 22426 |
ashik.ali |
6 |
|
| 24313 |
amit.gupta |
7 |
|
| 22426 |
ashik.ali |
8 |
group = 'com.profitmandi'
|
| 36878 |
aman |
9 |
version = '0.0.1-SNAPSHOT'
|
| 22426 |
ashik.ali |
10 |
|
|
|
11 |
description = """profitmandi-fofo"""
|
|
|
12 |
|
|
|
13 |
sourceCompatibility = 1.8
|
|
|
14 |
targetCompatibility = 1.8
|
| 29901 |
amit.gupta |
15 |
ext['log4j2.version'] = '2.15.0'
|
| 22426 |
ashik.ali |
16 |
|
|
|
17 |
|
|
|
18 |
repositories {
|
| 33258 |
ranu |
19 |
|
|
|
20 |
mavenCentral()
|
|
|
21 |
mavenLocal()
|
| 22426 |
ashik.ali |
22 |
}
|
| 22530 |
ashik.ali |
23 |
|
|
|
24 |
|
| 35433 |
amit |
25 |
task run{
|
| 33265 |
ranu |
26 |
Set environments = ["dev", "staging", "prod"]
|
|
|
27 |
def environment = "dev"
|
| 35433 |
amit |
28 |
if ( project.hasProperty("env") ) {
|
| 33258 |
ranu |
29 |
environment = project.getProperty("env")
|
| 35433 |
amit |
30 |
if(!environments.contains(environment)){
|
| 33258 |
ranu |
31 |
logger.warn("Invalid Environment value, Choose any 'dev', 'staging', 'prod'");
|
|
|
32 |
environment = "dev"
|
|
|
33 |
}
|
| 35433 |
amit |
34 |
}else{
|
| 33258 |
ranu |
35 |
logger.warn("Invalid key")
|
| 22530 |
ashik.ali |
36 |
}
|
| 35433 |
amit |
37 |
ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
|
|
|
38 |
entry( key: "profile", value: environment)
|
| 33265 |
ranu |
39 |
}
|
| 35433 |
amit |
40 |
logger.warn("Build is being build by "+environment)
|
| 22530 |
ashik.ali |
41 |
}
|
|
|
42 |
|
| 35433 |
amit |
43 |
tasks.build.doLast(){
|
|
|
44 |
ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
|
|
|
45 |
entry( key: "profile", value: "dev")
|
| 33265 |
ranu |
46 |
}
|
| 22530 |
ashik.ali |
47 |
}
|
|
|
48 |
|
| 22426 |
ashik.ali |
49 |
dependencies {
|
| 35433 |
amit |
50 |
compile project (':profitmandi-common')
|
|
|
51 |
compile project (':profitmandi-dao')
|
| 30471 |
amit.gupta |
52 |
|
| 37337 |
amit |
53 |
// PDF table extraction for the Pine Labs affordability circular. Lives here because
|
|
|
54 |
// the parse now runs in this application rather than in profitmandi-cron; keep it
|
|
|
55 |
// out of profitmandi-common, or PDFBox reaches the web WAR too (common deliberately
|
|
|
56 |
// keeps pdfbox at test scope).
|
|
|
57 |
// - bouncycastle is only for encrypted PDFs (ours are not) and its
|
|
|
58 |
// bcprov-jdk15on:1.69 clashes with the bcprov already on this classpath
|
|
|
59 |
// - slf4j-simple would bind as a second SLF4J provider against log4j2
|
|
|
60 |
// - jai-imageio is image decoding; we read text and rulings only
|
|
|
61 |
implementation('technology.tabula:tabula:1.0.5') {
|
|
|
62 |
exclude group: 'org.bouncycastle'
|
|
|
63 |
exclude group: 'org.slf4j', module: 'slf4j-simple'
|
|
|
64 |
exclude group: 'com.github.jai-imageio'
|
|
|
65 |
}
|
|
|
66 |
|
|
|
67 |
|
| 35433 |
amit |
68 |
compile(group: 'org.apache.velocity', name: 'velocity-tools', version: '1.3') {
|
| 33265 |
ranu |
69 |
exclude(module: 'commons-logging')
|
|
|
70 |
exclude(module: 'commons-digester')
|
|
|
71 |
//exclude(module: 'commons-collections')
|
|
|
72 |
exclude(module: 'dom4j')
|
|
|
73 |
exclude(module: 'antlr')
|
|
|
74 |
exclude(module: 'velocity')
|
| 30471 |
amit.gupta |
75 |
|
| 33265 |
ranu |
76 |
}
|
| 33258 |
ranu |
77 |
compile 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6'
|
|
|
78 |
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6:'
|
| 33265 |
ranu |
79 |
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6'
|
|
|
80 |
compile group: 'org.apache.commons', name: 'commons-csv', version: '1.5'
|
|
|
81 |
compile 'org.apache.poi:poi-ooxml:3.16'
|
| 34687 |
amit.gupta |
82 |
// Add HikariCP dependency
|
|
|
83 |
implementation 'com.zaxxer:HikariCP:3.4.5' // Use the latest version
|
| 35433 |
amit |
84 |
// https://mvnrepository.com/artifact/org.xhtmlrenderer/core-renderer
|
|
|
85 |
compile (group: 'org.xhtmlrenderer', name: 'core-renderer', version: 'R8') {
|
|
|
86 |
exclude(module : 'bcprov-jdk14')
|
|
|
87 |
}
|
| 29901 |
amit.gupta |
88 |
|
| 35433 |
amit |
89 |
|
|
|
90 |
|
|
|
91 |
|
| 22860 |
ashik.ali |
92 |
testCompile "junit:junit:4.12"
|
| 33265 |
ranu |
93 |
//provided 'org.projectlombok:lombok:1.18.2'
|
| 35879 |
ranu |
94 |
|
|
|
95 |
// Selenium for Knowlarity scraping (Java 8 compatible versions)
|
|
|
96 |
compile 'org.seleniumhq.selenium:selenium-java:3.141.59'
|
|
|
97 |
compile 'io.github.bonigarcia:webdrivermanager:4.4.3'
|
| 22426 |
ashik.ali |
98 |
}
|
| 22860 |
ashik.ali |
99 |
|
|
|
100 |
test {
|
|
|
101 |
testLogging.showStandardStreams = true
|
| 23114 |
ashik.ali |
102 |
// for enable or disable test cases
|
| 33258 |
ranu |
103 |
|
| 23175 |
ashik.ali |
104 |
exclude 'com/spice/profitmandi/service/generic/GenericServiceTest.class'
|
| 33265 |
ranu |
105 |
}
|
| 37337 |
amit |
106 |
|
|
|
107 |
// Writes this module's runtime classpath to build/circular-classpath.txt so the
|
|
|
108 |
// offer-circular ingest can be driven locally outside Spring - see
|
|
|
109 |
// scripts/offer_circular/README.md ("Running and measuring an ingest locally").
|
|
|
110 |
// Lives here now that the parser does; it used to sit in profitmandi-cron.
|
|
|
111 |
task dumpCircularClasspath {
|
|
|
112 |
doLast {
|
|
|
113 |
new File("$buildDir/circular-classpath.txt").text =
|
|
|
114 |
sourceSets.main.runtimeClasspath.asPath
|
|
|
115 |
}
|
|
|
116 |
}
|