mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-23 16:05:09 +00:00
activeSecurity > disableSecurity
This commit is contained in:
parent
ae2e16867f
commit
f8b2b0e6d7
10
.github/workflows/PR-Demo-Comment-with-react.yml
vendored
10
.github/workflows/PR-Demo-Comment-with-react.yml
vendored
@ -156,9 +156,9 @@ jobs:
|
||||
- name: Run Gradle Command
|
||||
run: |
|
||||
if [ "${{ needs.check-comment.outputs.enable_security }}" == "true" ]; then
|
||||
export ADDITIONAL_FEATURES=true
|
||||
export WITHOUT_ENHANCED_FEATURES=false
|
||||
else
|
||||
export ADDITIONAL_FEATURES=false
|
||||
export WITHOUT_ENHANCED_FEATURES=true
|
||||
fi
|
||||
./gradlew clean build
|
||||
env:
|
||||
@ -200,11 +200,11 @@ jobs:
|
||||
run: |
|
||||
# Set security settings based on flags
|
||||
if [ "${{ needs.check-comment.outputs.enable_security }}" == "true" ]; then
|
||||
ADDITIONAL_FEATURES="true"
|
||||
WITHOUT_ENHANCED_FEATURES="false"
|
||||
LOGIN_SECURITY="true"
|
||||
SECURITY_STATUS="🔒 Security Enabled"
|
||||
else
|
||||
ADDITIONAL_FEATURES="false"
|
||||
WITHOUT_ENHANCED_FEATURES="true"
|
||||
LOGIN_SECURITY="false"
|
||||
SECURITY_STATUS="Security Disabled"
|
||||
fi
|
||||
@ -223,7 +223,7 @@ jobs:
|
||||
- /stirling/PR-${{ needs.check-comment.outputs.pr_number }}/config:/configs:rw
|
||||
- /stirling/PR-${{ needs.check-comment.outputs.pr_number }}/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "${ADDITIONAL_FEATURES}"
|
||||
WITHOUT_ENHANCED_FEATURES: "${WITHOUT_ENHANCED_FEATURES}"
|
||||
SECURITY_ENABLELOGIN: "${LOGIN_SECURITY}"
|
||||
SYSTEM_DEFAULTLOCALE: en-GB
|
||||
UI_APPNAME: "Stirling-PDF PR#${{ needs.check-comment.outputs.pr_number }}"
|
||||
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -40,12 +40,12 @@ jobs:
|
||||
- name: Build with Gradle and no spring security
|
||||
run: ./gradlew clean build
|
||||
env:
|
||||
ADDITIONAL_FEATURES: false
|
||||
WITHOUT_ENHANCED_FEATURES: true
|
||||
|
||||
- name: Build with Gradle and with spring security
|
||||
run: ./gradlew clean build
|
||||
env:
|
||||
ADDITIONAL_FEATURES: true
|
||||
WITHOUT_ENHANCED_FEATURES: false
|
||||
|
||||
- name: Upload Test Reports
|
||||
if: always()
|
||||
|
18
.github/workflows/multiOSReleases.yml
vendored
18
.github/workflows/multiOSReleases.yml
vendored
@ -48,11 +48,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
enable_security: [true, false]
|
||||
disable_security: [true, false]
|
||||
include:
|
||||
- enable_security: true
|
||||
- disable_security: false
|
||||
file_suffix: "-with-login"
|
||||
- enable_security: false
|
||||
- disable_security: true
|
||||
file_suffix: ""
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
@ -72,10 +72,10 @@ jobs:
|
||||
with:
|
||||
gradle-version: 8.14
|
||||
|
||||
- name: Generate jar (With Security=${{ matrix.enable_security }})
|
||||
- name: Generate jar (With Security=${{ matrix.disable_security }})
|
||||
run: ./gradlew clean createExe
|
||||
env:
|
||||
ADDITIONAL_FEATURES: ${{ matrix.enable_security }}
|
||||
WITHOUT_ENHANCED_FEATURES: ${{ matrix.disable_security }}
|
||||
STIRLING_PDF_DESKTOP_UI: false
|
||||
|
||||
- name: Rename binaries
|
||||
@ -98,11 +98,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
enable_security: [true, false]
|
||||
disable_security: [true, false]
|
||||
include:
|
||||
- enable_security: true
|
||||
- disable_security: false
|
||||
file_suffix: "with-login-"
|
||||
- enable_security: false
|
||||
- disable_security: true
|
||||
file_suffix: ""
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
@ -171,7 +171,7 @@ jobs:
|
||||
- name: Build Installer
|
||||
run: ./gradlew build jpackage -x test --info
|
||||
env:
|
||||
ADDITIONAL_FEATURES: false
|
||||
WITHOUT_ENHANCED_FEATURES: true
|
||||
STIRLING_PDF_DESKTOP_UI: true
|
||||
BROWSER_OPEN: true
|
||||
|
||||
|
2
.github/workflows/push-docker.yml
vendored
2
.github/workflows/push-docker.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
- name: Run Gradle Command
|
||||
run: ./gradlew clean build
|
||||
env:
|
||||
ADDITIONAL_FEATURES: false
|
||||
WITHOUT_ENHANCED_FEATURES: true
|
||||
STIRLING_PDF_DESKTOP_UI: false
|
||||
|
||||
- name: Install cosign
|
||||
|
22
.github/workflows/releaseArtifacts.yml
vendored
22
.github/workflows/releaseArtifacts.yml
vendored
@ -13,11 +13,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
enable_security: [true, false]
|
||||
disable_security: [true, false]
|
||||
include:
|
||||
- enable_security: true
|
||||
- disable_security: false
|
||||
file_suffix: "-with-login"
|
||||
- enable_security: false
|
||||
- disable_security: true
|
||||
file_suffix: ""
|
||||
outputs:
|
||||
version: ${{ steps.versionNumber.outputs.versionNumber }}
|
||||
@ -39,10 +39,10 @@ jobs:
|
||||
with:
|
||||
gradle-version: 8.14
|
||||
|
||||
- name: Generate jar (With Security=${{ matrix.enable_security }})
|
||||
- name: Generate jar (With Security=${{ matrix.disable_security }})
|
||||
run: ./gradlew clean createExe
|
||||
env:
|
||||
ADDITIONAL_FEATURES: ${{ matrix.enable_security }}
|
||||
WITHOUT_ENHANCED_FEATURES: ${{ matrix.disable_security }}
|
||||
STIRLING_PDF_DESKTOP_UI: false
|
||||
|
||||
- name: Get version number
|
||||
@ -75,11 +75,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
enable_security: [true, false]
|
||||
disable_security: [true, false]
|
||||
include:
|
||||
- enable_security: true
|
||||
- disable_security: false
|
||||
file_suffix: "-with-login"
|
||||
- enable_security: false
|
||||
- disable_security: true
|
||||
file_suffix: ""
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
@ -153,11 +153,11 @@ jobs:
|
||||
contents: write
|
||||
strategy:
|
||||
matrix:
|
||||
enable_security: [true, false]
|
||||
disable_security: [true, false]
|
||||
include:
|
||||
- enable_security: true
|
||||
- disable_security: false
|
||||
file_suffix: "-with-login"
|
||||
- enable_security: false
|
||||
- disable_security: true
|
||||
file_suffix: ""
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
|
2
.github/workflows/sonarqube.yml
vendored
2
.github/workflows/sonarqube.yml
vendored
@ -33,7 +33,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
ADDITIONAL_FEATURES: true
|
||||
WITHOUT_ENHANCED_FEATURES: false
|
||||
STIRLING_PDF_DESKTOP_UI: true
|
||||
run: |
|
||||
./gradlew clean build sonar \
|
||||
|
4
.github/workflows/testdriver.yml
vendored
4
.github/workflows/testdriver.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew clean build
|
||||
env:
|
||||
ADDITIONAL_FEATURES: false
|
||||
WITHOUT_ENHANCED_FEATURES: false
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
||||
@ -76,7 +76,7 @@ jobs:
|
||||
- /stirling/test-${{ github.sha }}/config:/configs:rw
|
||||
- /stirling/test-${{ github.sha }}/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "false"
|
||||
WITHOUT_ENHANCED_FEATURES: "false"
|
||||
SECURITY_ENABLELOGIN: "false"
|
||||
SYSTEM_DEFAULTLOCALE: en-GB
|
||||
UI_APPNAME: "Stirling-PDF Test"
|
||||
|
@ -55,7 +55,7 @@ Stirling-PDF uses Lombok to reduce boilerplate code. Some IDEs, like Eclipse, do
|
||||
Visit the [Lombok website](https://projectlombok.org/setup/) for installation instructions specific to your IDE.
|
||||
|
||||
5. Add environment variable
|
||||
For local testing, you should generally be testing the full 'Security' version of Stirling-PDF. To do this, you must add the environment flag ADDITIONAL_FEATURES=true to your system and/or IDE build/run step.
|
||||
For local testing, you should generally be testing the full 'Security' version of Stirling-PDF. Security is enabled by default. To disable it, you must add the environment flag WITHOUT_ENHANCED_FEATURES=true to your system and/or IDE build/run step.
|
||||
|
||||
## 4. Project Structure
|
||||
|
||||
@ -141,7 +141,7 @@ services:
|
||||
- /stirling/latest/config:/configs:rw
|
||||
- /stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "true"
|
||||
WITHOUT_ENHANCED_FEATURES: "true"
|
||||
SECURITY_ENABLELOGIN: "true"
|
||||
PUID: 1002
|
||||
PGID: 1002
|
||||
@ -170,7 +170,7 @@ Stirling-PDF uses different Docker images for various configurations. The build
|
||||
1. Set the security environment variable:
|
||||
|
||||
```bash
|
||||
export ADDITIONAL_FEATURES=false # or true for security-enabled builds
|
||||
export WITHOUT_ENHANCED_FEATURES=false # or true for security-enabled builds
|
||||
```
|
||||
|
||||
2. Build the project with Gradle:
|
||||
@ -196,7 +196,7 @@ Stirling-PDF uses different Docker images for various configurations. The build
|
||||
For the fat version (with security enabled):
|
||||
|
||||
```bash
|
||||
export ADDITIONAL_FEATURES=true
|
||||
export WITHOUT_ENHANCED_FEATURES=true
|
||||
docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest-fat -f ./Dockerfile.fat .
|
||||
```
|
||||
|
||||
|
@ -23,7 +23,8 @@ LABEL org.opencontainers.image.version="${VERSION_TAG}"
|
||||
LABEL org.opencontainers.image.keywords="PDF, manipulation, merge, split, convert, OCR, watermark"
|
||||
|
||||
# Set Environment Variables
|
||||
ENV ADDITIONAL_FEATURES=false \
|
||||
# todo: keep security off?
|
||||
ENV WITHOUT_ENHANCED_FEATURES=true \
|
||||
VERSION_TAG=$VERSION_TAG \
|
||||
JAVA_BASE_OPTS="-XX:+UnlockExperimentalVMOptions -XX:MaxRAMPercentage=75 -XX:InitiatingHeapOccupancyPercent=20 -XX:+G1PeriodicGCInvokesConcurrent -XX:G1PeriodicGCInterval=10000 -XX:+UseStringDeduplication -XX:G1PeriodicGCSystemLoadThreshold=70" \
|
||||
JAVA_CUSTOM_OPTS="" \
|
||||
|
@ -13,8 +13,8 @@ WORKDIR /app
|
||||
# Copy the entire project to the working directory
|
||||
COPY . .
|
||||
|
||||
# Build the application with ADDITIONAL_FEATURES=false
|
||||
RUN ADDITIONAL_FEATURES=true \
|
||||
# Build the application with WITHOUT_ENHANCED_FEATURES=false
|
||||
RUN WITHOUT_ENHANCED_FEATURES=false \
|
||||
STIRLING_PDF_DESKTOP_UI=false \
|
||||
./gradlew clean build -x spotlessApply -x spotlessCheck -x test -x sonarqube
|
||||
|
||||
@ -30,7 +30,7 @@ COPY --from=build /app/build/libs/*.jar app.jar
|
||||
ARG VERSION_TAG
|
||||
|
||||
# Set Environment Variables
|
||||
ENV ADDITIONAL_FEATURES=false \
|
||||
ENV WITHOUT_ENHANCED_FEATURES=false \
|
||||
VERSION_TAG=$VERSION_TAG \
|
||||
JAVA_BASE_OPTS="-XX:+UnlockExperimentalVMOptions -XX:MaxRAMPercentage=75 -XX:InitiatingHeapOccupancyPercent=20 -XX:+G1PeriodicGCInvokesConcurrent -XX:G1PeriodicGCInterval=10000 -XX:+UseStringDeduplication -XX:G1PeriodicGCSystemLoadThreshold=70" \
|
||||
JAVA_CUSTOM_OPTS="" \
|
||||
|
@ -4,7 +4,7 @@ FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff45
|
||||
ARG VERSION_TAG
|
||||
|
||||
# Set Environment Variables
|
||||
ENV ADDITIONAL_FEATURES=false \
|
||||
ENV WITHOUT_ENHANCED_FEATURES=true \
|
||||
HOME=/home/stirlingpdfuser \
|
||||
VERSION_TAG=$VERSION_TAG \
|
||||
JAVA_BASE_OPTS="-XX:+UnlockExperimentalVMOptions -XX:MaxRAMPercentage=75 -XX:InitiatingHeapOccupancyPercent=20 -XX:+G1PeriodicGCInvokesConcurrent -XX:G1PeriodicGCInterval=10000 -XX:+UseStringDeduplication -XX:G1PeriodicGCSystemLoadThreshold=70" \
|
||||
|
16
build.gradle
16
build.gradle
@ -45,11 +45,15 @@ bootJar {
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
if (System.getenv('ADDITIONAL_FEATURES') == 'false') {
|
||||
if (System.getenv('WITHOUT_ENHANCED_FEATURES') == 'false'
|
||||
|| (project.hasProperty('WITHOUT_ENHANCED_FEATURES')
|
||||
&& System.getProperty('WITHOUT_ENHANCED_FEATURES') == 'false')) {
|
||||
exclude 'stirling/software/proprietary/security/**'
|
||||
}
|
||||
|
||||
if (System.getenv('STIRLING_PDF_DESKTOP_UI') == 'false') {
|
||||
if (System.getenv('STIRLING_PDF_DESKTOP_UI') != 'false'
|
||||
|| (project.hasProperty('STIRLING_PDF_DESKTOP_UI')
|
||||
&& project.getProperty('STIRLING_PDF_DESKTOP_UI') != 'false')) {
|
||||
exclude 'stirling/software/spdf/UI/impl/**'
|
||||
}
|
||||
}
|
||||
@ -57,11 +61,15 @@ sourceSets {
|
||||
|
||||
test {
|
||||
java {
|
||||
if (System.getenv('ADDITIONAL_FEATURES') == 'false') {
|
||||
if (System.getenv('WITHOUT_ENHANCED_FEATURES') == 'false'
|
||||
|| (project.hasProperty('WITHOUT_ENHANCED_FEATURES')
|
||||
&& System.getProperty('WITHOUT_ENHANCED_FEATURES') == 'false')) {
|
||||
exclude 'stirling/software/proprietary/security/**'
|
||||
}
|
||||
|
||||
if (System.getenv('STIRLING_PDF_DESKTOP_UI') == 'false') {
|
||||
if (System.getenv('STIRLING_PDF_DESKTOP_UI') != 'false'
|
||||
|| (project.hasProperty('STIRLING_PDF_DESKTOP_UI')
|
||||
&& project.getProperty('STIRLING_PDF_DESKTOP_UI') != 'false')) {
|
||||
exclude 'stirling/software/spdf/UI/impl/**'
|
||||
}
|
||||
}
|
||||
|
@ -61,8 +61,8 @@ public class AppConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public boolean activeSecurity() {
|
||||
return env.getProperty("ADDITIONAL_FEATURES", Boolean.class, true);
|
||||
public boolean disableSecurity() {
|
||||
return env.getProperty("WITHOUT_ENHANCED_FEATURES", Boolean.class, false);
|
||||
}
|
||||
|
||||
@Bean(name = "appName")
|
||||
@ -148,7 +148,7 @@ public class AppConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@Bean(name = "missingActiveSecurity")
|
||||
@Bean(name = "missingActiveSecurity") // todo: may not be needed anymore
|
||||
@ConditionalOnMissingClass("stirling.software.proprietary.security.SecurityConfiguration")
|
||||
public boolean missingActiveSecurity() {
|
||||
return true;
|
||||
|
@ -208,7 +208,7 @@ public class PostHogService {
|
||||
|
||||
// New environment variables
|
||||
dockerMetrics.put("version_tag", System.getenv("VERSION_TAG"));
|
||||
dockerMetrics.put("additional_features", System.getenv("ADDITIONAL_FEATURES"));
|
||||
dockerMetrics.put("without_enhanced_features", System.getenv("WITHOUT_ENHANCED_FEATURES"));
|
||||
dockerMetrics.put("fat_docker", System.getenv("FAT_DOCKER"));
|
||||
|
||||
return dockerMetrics;
|
||||
|
@ -20,7 +20,7 @@ services:
|
||||
- ./stirling/latest/logs:/logs:rw
|
||||
- ../testing/allEndpointsRemovedSettings.yml:/configs/settings.yml:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "true"
|
||||
WITHOUT_ENHANCED_FEATURES: "false"
|
||||
SECURITY_ENABLELOGIN: "false"
|
||||
PUID: 1002
|
||||
PGID: 1002
|
||||
|
@ -20,7 +20,7 @@ services:
|
||||
- ./stirling/latest/config:/configs:rw
|
||||
- ./stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "true"
|
||||
WITHOUT_ENHANCED_FEATURES: "false"
|
||||
SECURITY_ENABLELOGIN: "false"
|
||||
PUID: 1002
|
||||
PGID: 1002
|
||||
|
@ -18,7 +18,7 @@ services:
|
||||
- ./stirling/latest/config:/configs:rw
|
||||
- ./stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "true"
|
||||
WITHOUT_ENHANCED_FEATURES: "false"
|
||||
SECURITY_ENABLELOGIN: "false"
|
||||
PUID: 1002
|
||||
PGID: 1002
|
||||
|
@ -18,7 +18,7 @@ services:
|
||||
- /stirling/latest/config:/configs:rw
|
||||
- /stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "true"
|
||||
WITHOUT_ENHANCED_FEATURES: "false"
|
||||
SECURITY_ENABLELOGIN: "true"
|
||||
SECURITY_OAUTH2_ENABLED: "true"
|
||||
SECURITY_OAUTH2_AUTOCREATEUSER: "true" # This is set to true to allow auto-creation of non-existing users in Stirling-PDF
|
||||
|
@ -18,7 +18,7 @@ services:
|
||||
- ./stirling/latest/config:/configs:rw
|
||||
- ./stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "true"
|
||||
WITHOUT_ENHANCED_FEATURES: "false"
|
||||
SECURITY_ENABLELOGIN: "true"
|
||||
PUID: 1002
|
||||
PGID: 1002
|
||||
|
@ -18,7 +18,7 @@ services:
|
||||
- /stirling/latest/config:/configs:rw
|
||||
- /stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "true"
|
||||
WITHOUT_ENHANCED_FEATURES: "false"
|
||||
SECURITY_ENABLELOGIN: "true"
|
||||
SYSTEM_DEFAULTLOCALE: en-US
|
||||
UI_APPNAME: Stirling-PDF-Lite
|
||||
|
@ -17,7 +17,7 @@ services:
|
||||
- /stirling/latest/config:/configs:rw
|
||||
- /stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "false"
|
||||
WITHOUT_ENHANCED_FEATURES: "true"
|
||||
SECURITY_ENABLELOGIN: "false"
|
||||
SYSTEM_DEFAULTLOCALE: en-US
|
||||
UI_APPNAME: Stirling-PDF-Ultra-lite
|
||||
|
@ -18,7 +18,7 @@ services:
|
||||
- /stirling/latest/config:/configs:rw
|
||||
- /stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "false"
|
||||
WITHOUT_ENHANCED_FEATURES: "true"
|
||||
SECURITY_ENABLELOGIN: "false"
|
||||
LANGS: "en_GB,en_US,ar_AR,de_DE,fr_FR,es_ES,zh_CN,zh_TW,ca_CA,it_IT,sv_SE,pl_PL,ro_RO,ko_KR,pt_BR,ru_RU,el_GR,hi_IN,hu_HU,tr_TR,id_ID"
|
||||
SYSTEM_DEFAULTLOCALE: en-US
|
||||
|
@ -18,7 +18,7 @@ services:
|
||||
- /stirling/latest/config:/configs:rw
|
||||
- /stirling/latest/logs:/logs:rw
|
||||
environment:
|
||||
ADDITIONAL_FEATURES: "true"
|
||||
WITHOUT_ENHANCED_FEATURES: "false"
|
||||
SECURITY_ENABLELOGIN: "true"
|
||||
PUID: 1002
|
||||
PGID: 1002
|
||||
|
@ -14,33 +14,6 @@ bootJar {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
// todo: check if needed here
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
if (System.getenv('ADDITIONAL_FEATURES') == 'false') {
|
||||
exclude 'stirling/software/proprietary/security/**'
|
||||
}
|
||||
|
||||
if (System.getenv('STIRLING_PDF_DESKTOP_UI') == 'false') {
|
||||
exclude 'stirling/software/spdf/UI/impl/**'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
java {
|
||||
if (System.getenv('ADDITIONAL_FEATURES') == 'false') {
|
||||
exclude 'stirling/software/proprietary/security/**'
|
||||
}
|
||||
|
||||
if (System.getenv('STIRLING_PDF_DESKTOP_UI') == 'false') {
|
||||
exclude 'stirling/software/spdf/UI/impl/**'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':common')
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
echo "Running Stirling PDF with ADDITIONAL_FEATURES=${ADDITIONAL_FEATURES} and VERSION_TAG=${VERSION_TAG}"
|
||||
# Check for ADDITIONAL_FEATURES and download the appropriate JAR if required
|
||||
if [ "ADDITIONAL_FEATURES" = "true" ] && [ "$VERSION_TAG" != "alpha" ]; then
|
||||
echo "Running Stirling PDF with WITHOUT_ENHANCED_FEATURES=${WITHOUT_ENHANCED_FEATURES} and VERSION_TAG=${VERSION_TAG}"
|
||||
# Check for WITHOUT_ENHANCED_FEATURES and download the appropriate JAR if required
|
||||
if [ "WITHOUT_ENHANCED_FEATURES" = "false" ] && [ "$VERSION_TAG" != "alpha" ]; then
|
||||
if [ ! -f app-security.jar ]; then
|
||||
echo "Trying to download from: https://files.stirlingpdf.com/v$VERSION_TAG/Stirling-PDF-with-login.jar"
|
||||
curl -L -o app-security.jar https://files.stirlingpdf.com/v$VERSION_TAG/Stirling-PDF-with-login.jar
|
||||
|
@ -3,18 +3,22 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url = "https://build.shibboleth.net/maven/releases" }
|
||||
maven { url = "https://maven.pkg.github.com/jcefmaven/jcefmaven" }
|
||||
maven { url = 'https://build.shibboleth.net/maven/releases' }
|
||||
maven { url = 'https://maven.pkg.github.com/jcefmaven/jcefmaven' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
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"
|
||||
if (System.getenv('STIRLING_PDF_DESKTOP_UI') != 'false'
|
||||
|| (project.hasProperty('STIRLING_PDF_DESKTOP_UI')
|
||||
&& project.getProperty('STIRLING_PDF_DESKTOP_UI') != 'false')) {
|
||||
implementation 'me.friwi:jcefmaven:132.3.1'
|
||||
implementation 'org.openjfx:javafx-controls:21'
|
||||
implementation 'org.openjfx:javafx-swing:21'
|
||||
}
|
||||
|
||||
if (System.getenv("ADDITIONAL_FEATURES") == "true") {
|
||||
if (System.getenv('WITHOUT_ENHANCED_FEATURES') == 'false'
|
||||
|| (project.hasProperty('WITHOUT_ENHANCED_FEATURES')
|
||||
&& System.getProperty('WITHOUT_ENHANCED_FEATURES') == 'false')) {
|
||||
implementation project(':proprietary')
|
||||
}
|
||||
|
||||
@ -34,9 +38,9 @@ dependencies {
|
||||
implementation "org.commonmark:commonmark-ext-gfm-tables:$commonmarkVersion"
|
||||
|
||||
// General PDF dependencies
|
||||
implementation ("org.apache.pdfbox:pdfbox:$pdfboxVersion")
|
||||
implementation "org.apache.pdfbox:pdfbox:$pdfboxVersion"
|
||||
implementation "org.apache.pdfbox:preflight:$pdfboxVersion"
|
||||
implementation ("org.apache.pdfbox:xmpbox:$pdfboxVersion")
|
||||
implementation "org.apache.pdfbox:xmpbox:$pdfboxVersion"
|
||||
|
||||
// https://mvnrepository.com/artifact/technology.tabula/tabula
|
||||
implementation ('technology.tabula:tabula:1.0.5') {
|
||||
@ -45,7 +49,7 @@ dependencies {
|
||||
exclude group: 'com.google.code.gson', module: 'gson'
|
||||
}
|
||||
implementation 'org.apache.pdfbox:jbig2-imageio:3.0.4'
|
||||
implementation ('com.opencsv:opencsv:5.11') // https://mvnrepository.com/artifact/com.opencsv/opencsv
|
||||
implementation 'com.opencsv:opencsv:5.11' // https://mvnrepository.com/artifact/com.opencsv/opencsv
|
||||
|
||||
// Batik
|
||||
implementation 'org.apache.xmlgraphics:batik-all:1.18'
|
||||
@ -81,6 +85,7 @@ sourceSets {
|
||||
|
||||
jar {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
zip64 = true
|
||||
|
||||
from {
|
||||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
@ -89,27 +94,12 @@ jar {
|
||||
manifest {
|
||||
attributes(
|
||||
'Main-Class': 'stirling.software.spdf.SPDFApplication',
|
||||
"Implementation-Title": "Stirling-PDF",
|
||||
"Implementation-Version": project.version
|
||||
'Implementation-Title': 'Stirling-PDF',
|
||||
'Implementation-Version': project.version
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveClassifier.set('shadow')
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
manifest {
|
||||
attributes(
|
||||
'Main-Class': 'stirling.software.spdf.SPDFApplication'
|
||||
)
|
||||
}
|
||||
zip64 = true
|
||||
mergeServiceFiles()
|
||||
}
|
||||
|
||||
build.dependsOn shadowJar
|
||||
jar.dependsOn ':common:jar'
|
||||
shadowJar.dependsOn ':common:jar'
|
||||
jar.dependsOn ':proprietary:jar'
|
||||
shadowJar.dependsOn ':proprietary:jar'
|
||||
|
@ -31,7 +31,6 @@ spring.mvc.async.request-timeout=${SYSTEM_CONNECTIONTIMEOUTMILLISECONDS:1200000}
|
||||
|
||||
management.endpoints.web.exposure.include=beans
|
||||
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
|
||||
#spring.config.additional-location=classpath:configs/settings.yml
|
||||
spring.datasource.url=jdbc:h2:file:./configs/stirling-pdf-DB-2.3.232;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=PostgreSQL
|
||||
spring.datasource.driver-class-name=org.h2.Driver
|
||||
spring.datasource.username=sa
|
||||
|
@ -253,11 +253,11 @@
|
||||
<label for="cacheInputs" th:text="#{settings.cacheInputs.name}"></label>
|
||||
</div>
|
||||
|
||||
<a th:if="${@loginEnabled and @activeSecurity}" th:href="@{'/account'}" class="btn btn-sm btn-outline-primary"
|
||||
<a th:if="${@loginEnabled and !@deactivateSecurity}" th:href="@{'/account'}" class="btn btn-sm btn-outline-primary"
|
||||
role="button" th:text="#{settings.accountSettings}" target="_blank">Account Settings</a>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a th:if="${@loginEnabled and @activeSecurity}" class="btn btn-danger" role="button"
|
||||
<a th:if="${@loginEnabled and !@deactivateSecurity}" class="btn btn-danger" role="button"
|
||||
th:text="#{settings.signOut}" th:href="@{'/logout'}">Sign Out</a>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" th:text="#{close}"></button>
|
||||
</div>
|
||||
|
@ -31,7 +31,6 @@ spring.mvc.async.request-timeout=${SYSTEM_CONNECTIONTIMEOUTMILLISECONDS:1200000}
|
||||
|
||||
management.endpoints.web.exposure.include=beans
|
||||
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
|
||||
#spring.config.additional-location=classpath:configs/settings.yml
|
||||
spring.datasource.url=jdbc:h2:file:./configs/stirling-pdf-DB-2.3.232;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=PostgreSQL
|
||||
spring.datasource.driver-class-name=org.h2.Driver
|
||||
spring.datasource.username=sa
|
||||
|
@ -253,11 +253,11 @@
|
||||
<label for="cacheInputs" th:text="#{settings.cacheInputs.name}"></label>
|
||||
</div>
|
||||
|
||||
<a th:if="${@loginEnabled and @activeSecurity}" th:href="@{'/account'}" class="btn btn-sm btn-outline-primary"
|
||||
<a th:if="${@loginEnabled and !@disableSecurity}" th:href="@{'/account'}" class="btn btn-sm btn-outline-primary"
|
||||
role="button" th:text="#{settings.accountSettings}" target="_blank">Account Settings</a>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a th:if="${@loginEnabled and @activeSecurity}" class="btn btn-danger" role="button"
|
||||
<a th:if="${@loginEnabled and !@disableSecurity}" class="btn btn-danger" role="button"
|
||||
th:text="#{settings.signOut}" th:href="@{'/logout'}">Sign Out</a>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" th:text="#{close}"></button>
|
||||
</div>
|
||||
|
@ -214,7 +214,7 @@ main() {
|
||||
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
export COMPOSE_DOCKER_CLI_BUILD=0
|
||||
export ADDITIONAL_FEATURES=false
|
||||
export WITHOUT_ENHANCED_FEATURES=true
|
||||
# Run the gradlew build command and check if it fails
|
||||
if ! ./gradlew clean build; then
|
||||
echo "Gradle build failed with security disabled, exiting script."
|
||||
@ -242,7 +242,7 @@ main() {
|
||||
# run_tests "Stirling-PDF" "./exampleYmlFiles/docker-compose-latest.yml"
|
||||
# docker-compose -f "./exampleYmlFiles/docker-compose-latest.yml" down
|
||||
|
||||
export ADDITIONAL_FEATURES=true
|
||||
export WITHOUT_ENHANCED_FEATURES=false
|
||||
# Run the gradlew build command and check if it fails
|
||||
if ! ./gradlew clean build; then
|
||||
echo "Gradle build failed with security enabled, exiting script."
|
||||
|
Loading…
x
Reference in New Issue
Block a user