| 22424 |
ashik.ali |
1 |
apply plugin: 'java'
|
|
|
2 |
apply plugin: 'maven'
|
| 22858 |
ashik.ali |
3 |
apply plugin: "eclipse"
|
| 22424 |
ashik.ali |
4 |
|
|
|
5 |
group = 'com.profitmandi'
|
|
|
6 |
version = '0.0.1-SNAPSHOT'
|
|
|
7 |
|
|
|
8 |
description = """profitmandi-common"""
|
|
|
9 |
|
|
|
10 |
sourceCompatibility = 1.8
|
|
|
11 |
targetCompatibility = 1.8
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
repositories {
|
|
|
15 |
|
| 26217 |
amit.gupta |
16 |
maven { url "https://repo.maven.apache.org/maven2" }
|
| 22424 |
ashik.ali |
17 |
mavenLocal()
|
|
|
18 |
}
|
| 22535 |
ashik.ali |
19 |
|
| 22424 |
ashik.ali |
20 |
dependencies {
|
|
|
21 |
/*compile(group: 'org.apache.thrift', name: 'libthrift', version:'0.7.0') {
|
|
|
22 |
exclude(module: 'commons-codec')
|
|
|
23 |
exclude(module: 'servlet-api')
|
| 23568 |
govind |
24 |
exclude(module: 'slf4j-log4j12')
|
| 22424 |
ashik.ali |
25 |
exclude(module: 'slf4j-api')
|
|
|
26 |
exclude(module: 'httpclient')
|
|
|
27 |
exclude(module: 'commons-lang')
|
|
|
28 |
}*/
|
| 22537 |
ashik.ali |
29 |
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
|
| 22424 |
ashik.ali |
30 |
compile group: 'javax.servlet.jsp', name: 'jsp-api', version:'2.2'
|
| 23581 |
ashik.ali |
31 |
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.5'
|
|
|
32 |
compile group: 'org.slf4j', name: 'slf4j-log4j12', version:'1.7.5'
|
| 29699 |
amit.gupta |
33 |
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.16.0'
|
| 23568 |
govind |
34 |
// compile group: 'log4j', name: 'apache-log4j-extras', version: '1.2.17'
|
|
|
35 |
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.8.2'
|
| 22424 |
ashik.ali |
36 |
compile(group: 'com.auth0', name: 'java-jwt', version:'3.1.0') {
|
|
|
37 |
exclude(module: 'jackson-databind')
|
|
|
38 |
}
|
| 36244 |
amit |
39 |
compile group: 'com.sun.mail', name: 'javax.mail', version:'1.6.2'
|
| 22424 |
ashik.ali |
40 |
compile group: 'commons-io', name: 'commons-io', version:'2.5'
|
|
|
41 |
compile (group: 'org.apache.httpcomponents', name: 'httpclient', version:'4.5.3'){
|
|
|
42 |
exclude(module: 'commons-codec')
|
|
|
43 |
}
|
|
|
44 |
compile group: 'org.json', name: 'json', version:'20131018'
|
|
|
45 |
compile(group: 'com.whalin', name: 'Memcached-Java-Client', version:'3.0.0') {
|
|
|
46 |
exclude(module: 'slf4j-api')
|
|
|
47 |
}
|
| 25194 |
amit.gupta |
48 |
compile group: 'org.springframework', name: 'spring-webmvc', version:'4.3.6.RELEASE'
|
|
|
49 |
compile group: 'org.springframework', name: 'spring-context-support', version:'4.3.6.RELEASE'
|
| 25978 |
amit.gupta |
50 |
|
|
|
51 |
compile group: 'org.springframework.security', name: 'spring-security-web', version:'4.2.13.RELEASE'
|
|
|
52 |
compile group: 'org.springframework.security', name: 'spring-security-config', version:'4.2.13.RELEASE'
|
|
|
53 |
|
| 25194 |
amit.gupta |
54 |
compile group: 'org.springframework', name: 'spring-test', version: '4.3.6.RELEASE'
|
| 22424 |
ashik.ali |
55 |
compile group: 'org.jsoup', name: 'jsoup', version:'1.8.3'
|
| 24524 |
amit.gupta |
56 |
compile(group: 'com.itextpdf', name: 'itextpdf', version:'5.5.6') {
|
| 22424 |
ashik.ali |
57 |
exclude(module: 'bcprov-jdk14')
|
|
|
58 |
}
|
| 25978 |
amit.gupta |
59 |
compile group: 'org.mongodb', name: 'mongo-java-driver', version:'3.6.0'
|
| 22424 |
ashik.ali |
60 |
compile group: 'dom4j', name: 'dom4j', version:'1.6'
|
| 32729 |
amit.gupta |
61 |
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.5'
|
| 27008 |
amit.gupta |
62 |
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version:'2.6.3'
|
| 22424 |
ashik.ali |
63 |
compile group: 'org.apache.poi', name: 'poi', version:'3.16'
|
|
|
64 |
compile group: 'org.apache.poi', name: 'poi-ooxml', version:'3.16'
|
|
|
65 |
compile group: 'com.ibm.icu', name: 'icu4j', version:'4.8'
|
|
|
66 |
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.6'
|
| 25978 |
amit.gupta |
67 |
compile group: 'com.google.code.gson', name: 'gson', version:'2.8.0'
|
| 22424 |
ashik.ali |
68 |
compile group: 'commons-collections', name: 'commons-collections', version: '3.0'
|
|
|
69 |
compile (group: 'commons-fileupload', name: 'commons-fileupload', version:'1.3'){
|
|
|
70 |
exclude(module: 'commons-io')
|
|
|
71 |
}
|
|
|
72 |
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
|
|
|
73 |
compile group: 'org.apache.tika', name: 'tika-core', version: '1.16'
|
| 22529 |
ashik.ali |
74 |
compile group: 'org.apache.solr', name: 'solr-solrj', version: '6.6.0'
|
| 23929 |
amit.gupta |
75 |
compile group: 'org.apache.commons', name: 'commons-csv', version: '1.5'
|
| 26217 |
amit.gupta |
76 |
implementation 'org.jsoup:jsoup:1.11.3'
|
| 36416 |
amit |
77 |
// OkHttp dropped Apr 2026 — standardised on Apache HttpClient via HttpClientFactory.
|
| 29494 |
amit.gupta |
78 |
implementation 'org.threeten:threetenbp:1.3.1'
|
| 30207 |
amit.gupta |
79 |
|
| 36416 |
amit |
80 |
testImplementation 'junit:junit:4.13.2'
|
|
|
81 |
testImplementation 'org.mockito:mockito-core:3.12.4'
|
| 37052 |
amit |
82 |
// Test-only: rasterizes generated PDFs to PNG for golden-image diffing. Must NOT leak into compile/runtime/WAR.
|
|
|
83 |
testImplementation 'org.apache.pdfbox:pdfbox:2.0.27'
|
| 30207 |
amit.gupta |
84 |
|
| 36416 |
amit |
85 |
|
| 22424 |
ashik.ali |
86 |
}
|
| 36416 |
amit |
87 |
|
| 37052 |
amit |
88 |
// Forward the golden-capture flag into the forked test JVM so `-DcaptureGolden=true` re-records baselines.
|
|
|
89 |
test {
|
|
|
90 |
systemProperty 'captureGolden', System.getProperty('captureGolden', 'false')
|
|
|
91 |
}
|
|
|
92 |
|
| 36416 |
amit |
93 |
// Lint guard: forbid direct OkHttp / unconfigured Apache HttpClient construction outside
|
|
|
94 |
// HttpClientFactory. Failing this task => failing build. See HttpClientFactory.java for
|
|
|
95 |
// the sanctioned construction path.
|
|
|
96 |
task lintHttpClients(type: Exec) {
|
|
|
97 |
workingDir = rootProject.projectDir
|
|
|
98 |
executable = 'bash'
|
|
|
99 |
args = ['-c', '''
|
|
|
100 |
set -e
|
|
|
101 |
BAD=$(grep -rlE "(new OkHttpClient\\(|HttpClients\\.createDefault\\(\\)|^import okhttp3\\.)" \
|
|
|
102 |
--include="*.java" \
|
|
|
103 |
--exclude="HttpClientFactory.java" \
|
|
|
104 |
profitmandi-common profitmandi-dao profitmandi-web profitmandi-fofo profitmandi-cron 2>/dev/null || true)
|
|
|
105 |
if [ -n "$BAD" ]; then
|
|
|
106 |
echo "ERROR: forbidden HTTP-client pattern in:"
|
|
|
107 |
echo "$BAD"
|
|
|
108 |
echo "Use com.spice.profitmandi.common.web.client.HttpClientFactory or RestClient instead."
|
|
|
109 |
exit 1
|
|
|
110 |
fi
|
|
|
111 |
''']
|
|
|
112 |
}
|
|
|
113 |
check.dependsOn lintHttpClients
|