Stirling-PDF/build.gradle
dependabot[bot] d12aca0ca6
Bump org.postgresql:postgresql from 42.7.5 to 42.7.6 (#3629)
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from
42.7.5 to 42.7.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pgjdbc/pgjdbc/releases">org.postgresql:postgresql's
releases</a>.</em></p>
<blockquote>
<h2>v42.7.6</h2>
<h2>Changes</h2>
<ul>
<li>Prepare release notes for release 42_7_6 (new format) <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3628">#3628</a>)</li>
<li>fix: isValid incorrectly called execute, instead of executeWithFlags
fixes Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3630">#3630</a>
<a href="https://github.com/davecramer"><code>@​davecramer</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3631">#3631</a>)</li>
<li>add override <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3629">#3629</a>)</li>
<li>add the ability to turn off automatic LSN flush <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3403">#3403</a>)</li>
<li>test: add tests with reWriteBatchedInserts=true <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3616">#3616</a>)</li>
<li>test: add CI executions with adaptive_fetch=true by default <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3615">#3615</a>)</li>
<li>test: simplify TestUtil.openDB, add tests with various
assumeMinServerVersion values <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3614">#3614</a>)</li>
<li>Deprecate group startup parms <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3613">#3613</a>)</li>
<li>Add back application name setting <a
href="https://github.com/joejensen"><code>@​joejensen</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3509">#3509</a>)</li>
<li>Copr: Use Java 21 as the build dependency <a
href="https://github.com/mkoncek"><code>@​mkoncek</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3607">#3607</a>)</li>
<li>fix indentation of return child to allow built pass in Checkstyle's
CIs <a href="https://github.com/mohitsatr"><code>@​mohitsatr</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3611">#3611</a>)</li>
<li>Set column name explicitely when using
<code>current_database()</code> in queries <a
href="https://github.com/kneth"><code>@​kneth</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3526">#3526</a>)</li>
<li>add PgMessageType and use static variables for protocol literals <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3609">#3609</a>)</li>
<li>Handle protocol 3.2 and wider cancel keys. <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3592">#3592</a>)</li>
<li>refactor empty resultset to use empty result set if the catalog is
not correct <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3588">#3588</a>)</li>
<li>Use query to find the current catalog instead of relying on the
database in the connection URL or connection properties as this could be
different if connected through a pooler or proxy <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3565">#3565</a>)</li>
<li>ci: add Java 24 tests <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3580">#3580</a>)</li>
<li>docs: Relabel 42.7.4 as past version as it is no longer the latest
<a href="https://github.com/sehrope"><code>@​sehrope</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3586">#3586</a>)</li>
<li>test: remove stale logging message from SslTest <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3584">#3584</a>)</li>
<li>chore: appply the latest byte-buddy version for tests so we support
the latest Java versions <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3583">#3583</a>)</li>
<li>fix: make PgConnection#abort compatible with Java 24 <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3582">#3582</a>)</li>
<li>chore(deps): update plugin com.github.burrunan.s3-build-cache to
v1.8.5 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3573">#3573</a>)</li>
<li>Fix JavadocTagContinuationIndentation in
AfterBeforeParameterResolver <a
href="https://github.com/Anmol202005"><code>@​Anmol202005</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3566">#3566</a>)</li>
<li>Revert &quot;use in row values instead of union all (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3510">#3510</a>)&quot;
<a href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3524">#3524</a>)</li>
<li>use in row values instead of union all <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3510">#3510</a>)</li>
<li>feat: enhanced DatabaseMetadata.getIndexInfo() method, added index
comment as REMARKS property <a
href="https://github.com/raminorujov"><code>@​raminorujov</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3513">#3513</a>)</li>
<li>Nit: correct message in main.yml test action <a
href="https://github.com/ecki"><code>@​ecki</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3503">#3503</a>)</li>
<li>chore: use import instead of require to support modern NodeJS <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3502">#3502</a>)</li>
<li>chore: use PostgreSQL 17 rather than 17rc1 for CI tests <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3501">#3501</a>)</li>
<li>chore: add ErrorProne verification to catch bugs ealier <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3493">#3493</a>)</li>
<li>fix: ArrayIndexOutOfBounds when write big object into GSS enabled
connection, make GSSInputStream robust in face of streams that produce
incomplete reads <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3500">#3500</a>)</li>
<li>refactor: factor out duplicated .getBytes() when converting
date/time to Date/Time/Timestamp <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3497">#3497</a>)</li>
<li>chore: exclude Oracle Java 17 from CI tests <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3499">#3499</a>)</li>
<li>chore: remove unused Travis CI configuration <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3498">#3498</a>)</li>
<li>Undeprecate sslfactoryarg connection property <a
href="https://github.com/sehrope"><code>@​sehrope</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3496">#3496</a>)</li>
<li>fix:Fix sending extra_float_digits <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3491">#3491</a>)</li>
</ul>
<h2>🐛 Bug Fixes</h2>
<ul>
<li>fix: EOFException on PreparedStatement#toString with unset bytea
parameter since 42.7.4 <a
href="https://github.com/MrEasy"><code>@​MrEasy</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3369">#3369</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>chore: use Java 21 for building pgjdbc by default <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3612">#3612</a>)</li>
</ul>
<h2>⬆️ Dependencies</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md">org.postgresql:postgresql's
changelog</a>.</em></p>
<blockquote>
<h2>[42.7.6]</h2>
<h4>Features</h4>
<ul>
<li>fix: Enhanced DatabaseMetadata.getIndexInfo() method, added index
comment as REMARKS property [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3513">#3513</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3513">pgjdbc/pgjdbc#3513</a>)</li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li>performance: Improve ResultSetMetadata.fetchFieldMetaData by using
IN row values instead of UNION ALL for improved query performance (later
reverted) [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3510">#3510</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3510">pgjdbc/pgjdbc#3510</a>)</li>
<li>feat:Use a single simple query for all startup parameters, so
groupStartupParameters is no longer needed [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3613">#3613</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3613">pgjdbc/pgjdbc#3613</a>)</li>
<li></li>
</ul>
<h2>Bug Fixes</h2>
<h3>Protocol &amp; Connection Handling</h3>
<ul>
<li>fix: Send extra_float_digits=3 for PostgreSQL 12+ as well [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3491">#3491</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3491">pgjdbc/pgjdbc#3491</a>)</li>
<li>fix: Fixed handling of protocol 3.2 and wider cancel keys [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3592">#3592</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3592">pgjdbc/pgjdbc#3592</a>)</li>
<li>fix: Made PgConnection#abort compatible with Java 24 [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3582">#3582</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3582">pgjdbc/pgjdbc#3582</a>)</li>
<li>fix: Fixed ArrayIndexOutOfBounds when writing big objects into GSS
enabled connections [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3500">#3500</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3500">pgjdbc/pgjdbc#3500</a>)</li>
<li>fix: Added back application name setting [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3509">#3509</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3509">pgjdbc/pgjdbc#3509</a>)</li>
</ul>
<h3>Metadata &amp; Catalog Handling</h3>
<ul>
<li>fix: Set column name explicitly when using current_database() in
queries [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3526">#3526</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3526">pgjdbc/pgjdbc#3526</a>)</li>
<li>fix: Use query to find the current catalog instead of relying on the
database in the connection URL [pull <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3565">#3565</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3565">pgjdbc/pgjdbc#3565</a>)</li>
<li>fix: Refactored empty resultset to use empty result set if the
catalog is not correct [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3588">#3588</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3588">pgjdbc/pgjdbc#3588</a>)</li>
</ul>
<h3>API Improvements</h3>
<ul>
<li>fix: Undeprecated Fastpath API and fixed deprecation warnings [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3493">#3493</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3493">pgjdbc/pgjdbc#3493</a>)</li>
<li>fix: Undeprecated sslfactoryarg [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3496">#3496</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3496">pgjdbc/pgjdbc#3496</a>)</li>
<li>fix: Added PgMessageType and used static variables for protocol
literals [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3609">#3609</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3609">pgjdbc/pgjdbc#3609</a>)</li>
<li>fix: Add the ability to turn off automatic LSN flush [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3403">#3403</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3403">pgjdbc/pgjdbc#3403</a>)</li>
<li>fix: isValid incorrectly called execute, instead of executeWithFlags
[PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3631">#3631</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3631">pgjdbc/pgjdbc#3631</a>).
Fixes [Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3630">#3630</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3630">pgjdbc/pgjdbc#3630</a>)</li>
<li>fix: EOFException on PreparedStatement#toString with unset bytea
parameter since 42.7.4 <a
href="0a88ea425e">Commit
0a88ea4</a>. Fixes [Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3365">#3365</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3365">pgjdbc/pgjdbc#3365</a>)</li>
</ul>
<h2>Infrastructure &amp; Build Improvements</h2>
<h3>Java Support</h3>
<ul>
<li>update: Updated to use Java 21 for building pgjdbc by default [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3612">#3612</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3612">pgjdbc/pgjdbc#3612</a>)</li>
<li>update: Updated Java 21 as the build dependency for copr [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3607">#3607</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3607">pgjdbc/pgjdbc#3607</a>)</li>
<li>update: Updated latest JDK to version 24 [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3580">#3580</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3580">pgjdbc/pgjdbc#3580</a>)</li>
<li>update: Applied the latest byte-buddy version for tests to support
the latest Java versions [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3583">#3583</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3583">pgjdbc/pgjdbc#3583</a>)</li>
</ul>
<h3>Testing &amp; Quality</h3>
<ul>
<li>test: Added ErrorProne verification to detect bugs earlier [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3493">#3493</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3493">pgjdbc/pgjdbc#3493</a>)</li>
<li>test: Simplified TestUtil.openDB, added tests with various
assumeMinServerVersion values [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3624">#3624</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3614">pgjdbc/pgjdbc#3614</a>)</li>
<li>test: Updated to use PostgreSQL 17 rather than 17rc1 for CI tests
[PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3501">#3501</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3501">pgjdbc/pgjdbc#3501</a>)</li>
<li>test: Removed stale logging message from SslTest [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3584">#3584</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3584">pgjdbc/pgjdbc#3584</a>)</li>
<li>test: Added CI executions with adaptive_fetch=true by default for
performance testing [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3615">#3615</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3615">pgjdbc/pgjdbc#3615</a>)</li>
<li>test: Added tests with reWriteBatchedInserts=true [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3616">#3616</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3616">pgjdbc/pgjdbc#3616</a>)</li>
</ul>
<h3>Code Quality</h3>
<ul>
<li>doc: Fixed javadoc warnings [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3493">#3493</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3493">pgjdbc/pgjdbc#3493</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="689708f96d"><code>689708f</code></a>
Prepare release notes for release 42_7_6 (new format) (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3628">#3628</a>)</li>
<li><a
href="0a88ea425e"><code>0a88ea4</code></a>
fix: EOFException on PreparedStatement#toString with unset bytea
parameter si...</li>
<li><a
href="2de9b943c6"><code>2de9b94</code></a>
fix: make sure Connection.isValid correctly uses executeWithFlags fixes
Issu...</li>
<li><a
href="d9e2087459"><code>d9e2087</code></a>
add override (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3629">#3629</a>)</li>
<li><a
href="665b27b865"><code>665b27b</code></a>
add the ability to turn off automatic LSN flush (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3403">#3403</a>)</li>
<li><a
href="253c68243c"><code>253c682</code></a>
chore(deps): update burrunan/gradle-cache-action action to v3</li>
<li><a
href="2d1ae0cbd4"><code>2d1ae0c</code></a>
chore(deps): update plugin com.gradle.develocity to v4</li>
<li><a
href="baeb89321b"><code>baeb893</code></a>
fix(deps): update dependency
org.openrewrite.rewrite:org.openrewrite.rewrite....</li>
<li><a
href="e24d599952"><code>e24d599</code></a>
fix(deps): update dependency com.google.errorprone:error_prone_core to
v2.38.0</li>
<li><a
href="1617c68d51"><code>1617c68</code></a>
fix(deps): update dependency
net.ltgt.errorprone:net.ltgt.errorprone.gradle.p...</li>
<li>Additional commits viewable in <a
href="https://github.com/pgjdbc/pgjdbc/compare/REL42.7.5...REL42.7.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.postgresql:postgresql&package-manager=gradle&previous-version=42.7.5&new-version=42.7.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 20:07:28 +01:00

614 lines
23 KiB
Groovy

plugins {
id "java"
id "jacoco"
id "org.springframework.boot" version "3.5.0"
id "io.spring.dependency-management" version "1.1.7"
id "org.springdoc.openapi-gradle-plugin" version "1.9.0"
id "io.swagger.swaggerhub" version "1.3.2"
id "edu.sc.seis.launch4j" version "3.0.6"
id "com.diffplug.spotless" version "7.0.4"
id "com.github.jk1.dependency-license-report" version "2.9"
//id "nebula.lint" version "19.0.3"
id("org.panteleyev.jpackageplugin") version "1.6.1"
id "org.sonarqube" version "6.2.0.5505"
}
import com.github.jk1.license.render.*
import org.gradle.internal.os.OperatingSystem
import java.nio.file.Files
import java.time.Year
ext {
springBootVersion = "3.5.0"
pdfboxVersion = "3.0.5"
imageioVersion = "3.12.0"
lombokVersion = "1.18.38"
bouncycastleVersion = "1.80"
springSecuritySamlVersion = "6.5.0"
openSamlVersion = "4.3.2"
tempJrePath = null
}
group = "stirling.software"
version = "0.46.2"
java {
// 17 is lowest but we support and recommend 21
sourceCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
maven { url = "https://build.shibboleth.net/maven/releases" }
maven { url = "https://maven.pkg.github.com/jcefmaven/jcefmaven" }
}
licenseReport {
renderers = [new JsonReportRenderer()]
allowedLicensesFile = new File("$projectDir/allowed-licenses.json")
}
sourceSets {
main {
java {
if (System.getenv("DOCKER_ENABLE_SECURITY") == "false") {
exclude "stirling/software/SPDF/config/interfaces/DatabaseInterface.java"
exclude "stirling/software/SPDF/config/security/**"
exclude "stirling/software/SPDF/controller/api/DatabaseController.java"
exclude "stirling/software/SPDF/controller/api/EmailController.java"
exclude "stirling/software/SPDF/controller/api/H2SQLCondition.java"
exclude "stirling/software/SPDF/controller/api/UserController.java"
exclude "stirling/software/SPDF/controller/web/AccountWebController.java"
exclude "stirling/software/SPDF/controller/web/DatabaseWebController.java"
exclude "stirling/software/SPDF/model/api/Email.java"
exclude "stirling/software/SPDF/model/ApiKeyAuthenticationToken.java"
exclude "stirling/software/SPDF/model/AttemptCounter.java"
exclude "stirling/software/SPDF/model/Authority.java"
exclude "stirling/software/SPDF/model/exception/BackupNotFoundException.java"
exclude "stirling/software/SPDF/model/exception/NoProviderFoundException.java"
exclude "stirling/software/SPDF/model/PersistentLogin.java"
exclude "stirling/software/SPDF/model/SessionEntity.java"
exclude "stirling/software/SPDF/model/User.java"
exclude "stirling/software/SPDF/repository/**"
}
if (System.getenv("STIRLING_PDF_DESKTOP_UI") == "false") {
exclude "stirling/software/SPDF/UI/impl/**"
}
}
}
test {
java {
if (System.getenv("DOCKER_ENABLE_SECURITY") == "false") {
exclude "stirling/software/SPDF/config/security/**"
exclude "stirling/software/SPDF/model/ApiKeyAuthenticationTokenTest.java"
exclude "stirling/software/SPDF/controller/api/EmailControllerTest.java"
exclude "stirling/software/SPDF/repository/**"
}
if (System.getenv("STIRLING_PDF_DESKTOP_UI") == "false") {
exclude "stirling/software/SPDF/UI/impl/**"
}
}
}
}
openApi {
apiDocsUrl = "http://localhost:8080/v1/api-docs"
outputDir = file("$projectDir")
outputFileName = "SwaggerDoc.json"
waitTimeInSeconds = 60 // Increase the wait time to 60 seconds
}
//0.11.5 to 2024.11.5
static def getMacVersion(String version) {
def currentYear = Year.now().getValue()
def versionParts = version.split("\\.", 2)
return "${currentYear}.${versionParts.length > 1 ? versionParts[1] : versionParts[0]}"
}
jpackage {
input = "build/libs"
destination = "${projectDir}/build/jpackage"
mainJar = "Stirling-PDF-${project.version}.jar"
appName = "Stirling PDF"
appVersion = project.version
// appVersion = "2005.45.1"
vendor = "Stirling PDF Inc"
appDescription = "Stirling PDF - Your Local PDF Editor"
icon = "src/main/resources/static/favicon.ico"
verbose = true
// mainClass = "org.springframework.boot.loader.launch.JarLauncher"
// JVM Options
javaOptions = [
"-DBROWSER_OPEN=true",
"-DSTIRLING_PDF_DESKTOP_UI=true",
"-Djava.awt.headless=false",
"-Dapple.awt.UIElement=true",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.desktop/java.awt.event=ALL-UNNAMED",
"--add-opens=java.desktop/sun.awt=ALL-UNNAMED",
"--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED",
"--add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED",
"--add-opens=java.desktop/sun.lwawt=ALL-UNNAMED",
"--add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED",
]
// Windows-specific configuration
windows {
launcherAsService = false
appVersion = project.version
winConsole = false
winMenu = true // Creates start menu entry
winShortcut = true // Creates desktop shortcut
winShortcutPrompt = true // Lets user choose whether to create shortcuts
winDirChooser = true // Allows users to choose installation directory
winPerUserInstall = false
winMenuGroup = "Stirling PDF"
winUpgradeUuid = "2a43ed0c-b8c2-40cf-89e1-751129b87641" // Unique identifier for updates
winHelpUrl = "https://github.com/Stirling-Tools/Stirling-PDF"
winUpdateUrl = "https://github.com/Stirling-Tools/Stirling-PDF/releases"
type = "exe"
installDir = "C:/Program Files/Stirling-PDF"
}
// macOS-specific configuration
mac {
appVersion = getMacVersion(project.version.toString())
icon = "src/main/resources/static/favicon.icns"
type = "dmg"
macPackageIdentifier = "Stirling PDF"
macPackageName = "Stirling PDF"
macAppCategory = "public.app-category.productivity"
macSign = false // Enable signing
macAppStore = false // Not targeting App Store initially
// // Add license and other documentation to DMG
// /*macDmgContent = [
// "README.md",
// "LICENSE",
// "CHANGELOG.md"
// ]*/
//
// // Enable Mac-specific entitlements
// //macEntitlements = "entitlements.plist" // You'll need to create this file
}
// Linux-specific configuration
linux {
appVersion = project.version
icon = "src/main/resources/static/favicon.png"
type = "deb" // Can also use "rpm" for Red Hat-based systems
// Debian package configuration
//linuxPackageName = "stirlingpdf"
linuxDebMaintainer = "support@stirlingpdf.com"
linuxMenuGroup = "Office;PDF;Productivity"
linuxAppCategory = "Office"
linuxAppRelease = "1"
linuxPackageDeps = true
installDir = "/opt/Stirling-PDF"
// RPM-specific settings
//linuxRpmLicenseType = "MIT"
}
// Common additional options
//jLinkOptions = [
// "--strip-debug",
// "--compress=2",
// "--no-header-files",
// "--no-man-pages"
//]
// Add any additional modules required
/*addModules = [
"java.base",
"java.desktop",
"java.logging",
"java.sql",
"java.xml",
"jdk.crypto.ec"
]*/
// Add copyright and license information
copyright = "Copyright © 2024 Stirling Software"
licenseFile = "LICENSE"
}
tasks.register('jpackageMacX64') {
group = 'distribution'
description = 'Packages app for MacOS x86_64'
println "Running jpackageMacX64 task"
if (OperatingSystem.current().isMacOsX()) {
println "MacOS detected. Downloading temp JRE."
dependsOn("downloadTempJre")
} else {
return
}
doLast {
def jrePath = project.ext.tempJrePath
if (!jrePath) {
throw new GradleException("JRE path not found.")
}
def outputStream = new ByteArrayOutputStream()
def errorStream = new ByteArrayOutputStream()
def result = exec {
commandLine 'jpackage',
'--type', 'dmg',
'--name', 'Stirling PDF (x86_64)',
'--input', 'build/libs',
'--main-jar', "Stirling-PDF-${project.version}.jar",
'--main-class', 'org.springframework.boot.loader.launch.JarLauncher',
'--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"),
'--dest', 'build/jpackage/x86_64',
'--icon', 'src/main/resources/static/favicon.icns',
'--app-version', getMacVersion(project.version.toString()),
'--mac-package-name', 'Stirling PDF (x86_64)',
'--mac-package-identifier', 'Stirling PDF (x86_64)',
'--mac-app-category', 'public.app-category.productivity',
// Java options
'--java-options', '-DBROWSER_OPEN=true',
'--java-options', '-DSTIRLING_PDF_DESKTOP_UI=true',
'--java-options', '-Djava.awt.headless=false',
'--java-options', '-Dapple.awt.UIElement=true',
'--java-options', '--add-opens=java.base/java.lang=ALL-UNNAMED',
'--java-options', '--add-opens=java.desktop/java.awt.event=ALL-UNNAMED',
'--java-options', '--add-opens=java.desktop/sun.awt=ALL-UNNAMED',
'--java-options', '--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED',
'--java-options', '--add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED',
'--java-options', '--add-opens=java.desktop/sun.lwawt=ALL-UNNAMED',
'--java-options', '--add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED'
standardOutput = outputStream
errorOutput = errorStream
ignoreExitValue = true
}
def stdout = outputStream.toString("UTF-8")
def stderr = errorStream.toString("UTF-8")
if (!stdout.isBlank()) {
println "jpackage stdout:\n$stdout"
}
if (result.exitValue != 0) {
throw new GradleException("jpackage failed with exit code ${result.exitValue}.\n\n$stderr")
}
}
}
//jpackage.finalizedBy(jpackageMacX64)
tasks.register('downloadTempJre') {
group = 'distribution'
description = 'Downloads and extracts a temporary JRE'
doLast {
try {
def jreUrl = 'https://cdn.azul.com/zulu/bin/zulu17.56.15-ca-jre17.0.14-macosx_x64.tar.gz'
def tmpDir = Files.createTempDirectory('zulu-jre').toFile()
def jreArchive = new File(tmpDir, 'jre.tar.gz')
def jreDir = new File(tmpDir, 'jre')
println "🔽 Downloading JRE to $jreArchive..."
jreArchive.withOutputStream { out ->
new URI(jreUrl).toURL().withInputStream { from -> out << from }
}
println "📦 Extracting JRE to $jreDir..."
jreDir.mkdirs()
providers.exec {
commandLine 'tar', '-xzf', jreArchive.absolutePath, '-C', jreDir.absolutePath, '--strip-components=1'
}.result.get()
println "✅ JRE ready at: $jreDir"
ext.tempJrePath = jreDir.absolutePath
project.ext.tempJrePath = jreDir.absolutePath
} catch (Exception e) {
println "Failed to download JRE. ${e.getLocalizedMessage()}"
cleanTempJre
}
}
}
tasks.register('cleanTempJre') {
dependsOn('jpackageMacX64')
group = 'distribution'
description = 'Deletes the temporary JRE'
doLast {
def path = project.ext.tempJrePath
if (path && new File("$path").exists()) {
println "Cleaning up temporary JRE: $path"
new File("$path").parentFile.deleteDir()
}
}
}
launch4j {
icon = "${projectDir}/src/main/resources/static/favicon.ico"
outfile="Stirling-PDF.exe"
if(System.getenv("STIRLING_PDF_DESKTOP_UI") == 'true') {
headerType = "gui"
} else {
headerType = "console"
}
jarTask = tasks.bootJar
errTitle="Encountered error, Do you have Java 21?"
downloadUrl="https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.exe"
if(System.getenv("STIRLING_PDF_DESKTOP_UI") == 'true') {
variables=["BROWSER_OPEN=true", "STIRLING_PDF_DESKTOP_UI=true"]
} else {
variables=["BROWSER_OPEN=true"]
}
jreMinVersion="17"
mutexName="Stirling-PDF"
windowTitle="Stirling-PDF"
messagesStartupError="An error occurred while starting Stirling-PDF"
// messagesJreNotFoundError="This application requires a Java Runtime Environment, Please download Java 17."
messagesJreVersionError="You are running the wrong version of Java, Please download Java 21."
messagesLauncherError="Java is corrupted. Please uninstall and then install Java 21."
messagesInstanceAlreadyExists="Stirling-PDF is already running."
}
spotless {
java {
target sourceSets.main.allJava
target project(':common').sourceSets.main.allJava
googleJavaFormat("1.27.0").aosp().reorderImports(false)
importOrder("java", "javax", "org", "com", "net", "io", "jakarta", "lombok", "me", "stirling")
toggleOffOn()
trimTrailingWhitespace()
leadingTabsToSpaces()
endWithNewline()
}
}
sonar {
properties {
property "sonar.projectKey", "Stirling-Tools_Stirling-PDF"
property "sonar.organization", "stirling-tools"
property "sonar.exclusions", "**/build-wrapper-dump.json, src/main/java/org/apache/**, src/main/resources/static/pdfjs/**, src/main/resources/static/pdfjs-legacy/**, src/main/resources/static/js/thirdParty/**"
property "sonar.coverage.exclusions", "src/main/java/org/apache/**, src/main/resources/static/pdfjs/**, src/main/resources/static/pdfjs-legacy/**, src/main/resources/static/js/thirdParty/**"
property "sonar.cpd.exclusions", "src/main/java/org/apache/**, src/main/resources/static/pdfjs/**, src/main/resources/static/pdfjs-legacy/**, src/main/resources/static/js/thirdParty/**"
}
}
//gradleLint {
// rules=['unused-dependency']
// }
tasks.wrapper {
gradleVersion = "8.14"
distributionType = Wrapper.DistributionType.ALL
}
//tasks.withType(JavaCompile) {
// options.compilerArgs << "-Xlint:deprecation"
//}
configurations.all {
// Remove all commons-logging dependencies so that only spring-jcl is used
exclude group: 'commons-logging', module: 'commons-logging'
// Exclude Tomcat
exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat"
}
dependencies {
implementation project(':common')
//tmp for security bumps
implementation 'ch.qos.logback:logback-core:1.5.18'
implementation 'ch.qos.logback:logback-classic:1.5.18'
// Exclude vulnerable BouncyCastle version used in tableau
configurations.all {
exclude group: 'org.bouncycastle', module: 'bcpkix-jdk15on'
exclude group: 'org.bouncycastle', module: 'bcutil-jdk15on'
exclude group: 'org.bouncycastle', module: 'bcmail-jdk15on'
}
if (System.getenv("STIRLING_PDF_DESKTOP_UI") != "false") {
implementation "me.friwi:jcefmaven:132.3.1"
implementation "org.openjfx:javafx-controls:21"
implementation "org.openjfx:javafx-swing:21"
}
//security updates
implementation "org.springframework:spring-webmvc:6.2.7"
implementation("io.github.pixee:java-security-toolkit:1.2.1")
// Exclude Tomcat and include Jetty
implementation("org.springframework.boot:spring-boot-starter-web:$springBootVersion")
implementation "org.springframework.boot:spring-boot-starter-jetty:$springBootVersion"
implementation "org.springframework.boot:spring-boot-starter-thymeleaf:$springBootVersion"
implementation 'com.posthog.java:posthog:1.2.0'
implementation 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20240325.1'
if (System.getenv("DOCKER_ENABLE_SECURITY") != "false") {
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation "org.springframework.boot:spring-boot-starter-security:$springBootVersion"
implementation "org.thymeleaf.extras:thymeleaf-extras-springsecurity5:3.1.3.RELEASE"
implementation "org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion"
implementation "org.springframework.boot:spring-boot-starter-oauth2-client:$springBootVersion"
implementation "org.springframework.boot:spring-boot-starter-mail:$springBootVersion"
implementation "org.springframework.session:spring-session-core:3.5.0"
implementation "org.springframework:spring-jdbc:6.2.7"
implementation 'com.unboundid.product.scim2:scim2-sdk-client:2.3.5'
// Don't upgrade h2database
runtimeOnly "com.h2database:h2:2.3.232"
runtimeOnly "org.postgresql:postgresql:42.7.6"
constraints {
implementation "org.opensaml:opensaml-core:$openSamlVersion"
implementation "org.opensaml:opensaml-saml-api:$openSamlVersion"
implementation "org.opensaml:opensaml-saml-impl:$openSamlVersion"
}
implementation "org.springframework.security:spring-security-saml2-service-provider:$springSecuritySamlVersion"
// implementation 'org.springframework.security:spring-security-core:$springSecuritySamlVersion'
implementation 'com.coveo:saml-client:5.0.0'
}
implementation 'org.snakeyaml:snakeyaml-engine:2.9'
testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
// Batik
implementation "org.apache.xmlgraphics:batik-all:1.19"
// TwelveMonkeys
runtimeOnly "com.twelvemonkeys.imageio:imageio-batik:$imageioVersion"
runtimeOnly "com.twelvemonkeys.imageio:imageio-bmp:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-hdr:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-icns:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-iff:$imageioVersion"
runtimeOnly "com.twelvemonkeys.imageio:imageio-jpeg:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-pcx:$imageioVersion@
// runtimeOnly "com.twelvemonkeys.imageio:imageio-pict:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-pnm:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-psd:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-sgi:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-tga:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-thumbsdb:$imageioVersion"
runtimeOnly "com.twelvemonkeys.imageio:imageio-tiff:$imageioVersion"
runtimeOnly "com.twelvemonkeys.imageio:imageio-webp:$imageioVersion"
// runtimeOnly "com.twelvemonkeys.imageio:imageio-xwd:$imageioVersion"
// Image metadata extractor
implementation "com.drewnoakes:metadata-extractor:2.19.0"
implementation "commons-io:commons-io:2.19.0"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.8"
//general PDF
// https://mvnrepository.com/artifact/com.opencsv/opencsv
implementation ("com.opencsv:opencsv:5.11")
implementation ("org.apache.pdfbox:pdfbox:$pdfboxVersion")
implementation "org.apache.pdfbox:preflight:$pdfboxVersion"
implementation ("org.apache.pdfbox:xmpbox:$pdfboxVersion")
// https://mvnrepository.com/artifact/technology.tabula/tabula
implementation ('technology.tabula:tabula:1.0.5') {
exclude group: "org.slf4j", module: "slf4j-simple"
exclude group: "org.bouncycastle", module: "bcprov-jdk15on"
exclude group: "com.google.code.gson", module: "gson"
exclude group: "commons-io", module: "commons-io"
}
implementation 'org.apache.pdfbox:jbig2-imageio:3.0.4'
implementation "org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion"
implementation "org.bouncycastle:bcpkix-jdk18on:$bouncycastleVersion"
implementation "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion"
implementation "io.micrometer:micrometer-core:1.15.0"
implementation group: "com.google.zxing", name: "core", version: "3.5.3"
// https://mvnrepository.com/artifact/org.commonmark/commonmark
implementation "org.commonmark:commonmark:0.24.0"
implementation "org.commonmark:commonmark-ext-gfm-tables:0.24.0"
// https://mvnrepository.com/artifact/com.bucket4j/bucket4j_jdk17
implementation "com.bucket4j:bucket4j_jdk17-core:8.14.0"
implementation "com.fathzer:javaluator:3.0.6"
implementation 'com.vladsch.flexmark:flexmark-html2md-converter:0.64.8'
developmentOnly("org.springframework.boot:spring-boot-devtools:$springBootVersion")
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
// Mockito (core)
testImplementation 'org.mockito:mockito-core:5.18.0'
testRuntimeOnly 'org.mockito:mockito-inline:5.2.0'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
dependsOn "spotlessApply"
}
compileJava {
options.compilerArgs << "-parameters"
}
task writeVersion {
def propsFile = file("$projectDir/src/main/resources/version.properties")
def propsDir = propsFile.parentFile
doLast {
if (!propsDir.exists()) {
propsDir.mkdirs()
}
def props = new Properties()
props.setProperty("version", version)
props.store(propsFile.newWriter(), null)
}
}
processResources.dependsOn(writeVersion)
swaggerhubUpload {
// dependsOn = generateOpenApiDocs // Depends on your task generating Swagger docs
api = "Stirling-PDF" // The name of your API on SwaggerHub
owner = "${System.getenv().getOrDefault('SWAGGERHUB_USER', 'Frooodle')}" // Your SwaggerHub username (or organization name)
version = project.version // The version of your API
inputFile = file("SwaggerDoc.json") // The path to your Swagger docs
token = "${System.getenv("SWAGGERHUB_API_KEY")}" // Your SwaggerHub API key, passed as an environment variable
oas = "3.0.0" // The version of the OpenAPI Specification you"re using
}
jar {
enabled = false
manifest {
attributes "Implementation-Title": "Stirling-PDF",
"Implementation-Version": project.version
}
}
tasks.named("test") {
useJUnitPlatform()
}
task printVersion {
doLast {
println project.version
}
}
task printMacVersion {
doLast {
println getMacVersion(project.version.toString())
}
}
tasks.named('generateOpenApiDocs') {
doNotTrackState("Tracking state is not supported for this task")
}