| Line 87... |
Line 87... |
| 87 |
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
|
87 |
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
|
| 88 |
compile group: 'org.apache.tika', name: 'tika-core', version: '1.16'
|
88 |
compile group: 'org.apache.tika', name: 'tika-core', version: '1.16'
|
| 89 |
compile group: 'org.apache.solr', name: 'solr-solrj', version: '6.6.0'
|
89 |
compile group: 'org.apache.solr', name: 'solr-solrj', version: '6.6.0'
|
| 90 |
compile group: 'org.apache.commons', name: 'commons-csv', version: '1.5'
|
90 |
compile group: 'org.apache.commons', name: 'commons-csv', version: '1.5'
|
| 91 |
implementation 'org.jsoup:jsoup:1.11.3'
|
91 |
implementation 'org.jsoup:jsoup:1.11.3'
|
| 92 |
implementation 'com.squareup.okhttp3:okhttp:4.3.1'
|
- |
|
| 93 |
implementation 'com.squareup.okio:okio:2.4.0'
|
- |
|
| 94 |
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0-RC1'
|
92 |
// OkHttp dropped Apr 2026 — standardised on Apache HttpClient via HttpClientFactory.
|
| 95 |
implementation 'org.threeten:threetenbp:1.3.1'
|
93 |
implementation 'org.threeten:threetenbp:1.3.1'
|
| 96 |
|
94 |
|
| - |
|
95 |
testImplementation 'junit:junit:4.13.2'
|
| - |
|
96 |
testImplementation 'org.mockito:mockito-core:3.12.4'
|
| 97 |
|
97 |
|
| - |
|
98 |
|
| - |
|
99 |
}
|
| - |
|
100 |
|
| - |
|
101 |
// Lint guard: forbid direct OkHttp / unconfigured Apache HttpClient construction outside
|
| - |
|
102 |
// HttpClientFactory. Failing this task => failing build. See HttpClientFactory.java for
|
| - |
|
103 |
// the sanctioned construction path.
|
| - |
|
104 |
task lintHttpClients(type: Exec) {
|
| - |
|
105 |
workingDir = rootProject.projectDir
|
| - |
|
106 |
executable = 'bash'
|
| - |
|
107 |
args = ['-c', '''
|
| - |
|
108 |
set -e
|
| - |
|
109 |
BAD=$(grep -rlE "(new OkHttpClient\\(|HttpClients\\.createDefault\\(\\)|^import okhttp3\\.)" \
|
| - |
|
110 |
--include="*.java" \
|
| - |
|
111 |
--exclude="HttpClientFactory.java" \
|
| - |
|
112 |
profitmandi-common profitmandi-dao profitmandi-web profitmandi-fofo profitmandi-cron 2>/dev/null || true)
|
| - |
|
113 |
if [ -n "$BAD" ]; then
|
| - |
|
114 |
echo "ERROR: forbidden HTTP-client pattern in:"
|
| - |
|
115 |
echo "$BAD"
|
| - |
|
116 |
echo "Use com.spice.profitmandi.common.web.client.HttpClientFactory or RestClient instead."
|
| - |
|
117 |
exit 1
|
| - |
|
118 |
fi
|
| - |
|
119 |
''']
|
| 98 |
}
|
120 |
}
|
| - |
|
121 |
check.dependsOn lintHttpClients
|