Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outdated Gradle functions to the Gradle 9.0 standard #2740

Merged
merged 2 commits into from
Jan 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 33 additions & 35 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
id "edu.sc.seis.launch4j" version "3.0.6"
id "com.diffplug.spotless" version "7.0.2"
id "com.github.jk1.dependency-license-report" version "2.9"
//id "nebula.lint" version "19.0.3"
id("org.panteleyev.jpackageplugin") version "1.6.0"
//id "nebula.lint" version "19.0.3"
id("org.panteleyev.jpackageplugin") version "1.6.0"
}

import com.github.jk1.license.render.*
Expand All @@ -35,9 +35,9 @@ java {

repositories {
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://build.shibboleth.net/maven/releases" }
maven { url "https://maven.pkg.github.com/jcefmaven/jcefmaven" }
maven { url = "https://jitpack.io" }
maven { url = "https://build.shibboleth.net/maven/releases" }
maven { url = "https://maven.pkg.github.com/jcefmaven/jcefmaven" }

}

Expand Down Expand Up @@ -66,7 +66,7 @@ sourceSets {
}

if (System.getenv("STIRLING_PDF_DESKTOP_UI") == "false") {
exclude "stirling/software/SPDF/UI/impl/**"
exclude "stirling/software/SPDF/UI/impl/**"
}

}
Expand Down Expand Up @@ -138,10 +138,10 @@ jpackage {

// Windows-specific configuration
windows {
launcherAsService = false
appVersion = project.version
launcherAsService = false
appVersion = project.version

winConsole = false
winConsole = false
winMenu = true // Creates start menu entry
winShortcut = true // Creates desktop shortcut
winShortcutPrompt = true // Lets user choose whether to create shortcuts
Expand All @@ -157,7 +157,7 @@ jpackage {

// macOS-specific configuration
mac {
appVersion = getMacVersion(project.version.toString())
appVersion = getMacVersion(project.version.toString())
icon = "src/main/resources/static/favicon.icns"
type = "dmg"
macPackageIdentifier = "com.stirling.software.pdf"
Expand All @@ -181,7 +181,7 @@ jpackage {

// Linux-specific configuration
linux {
appVersion = project.version
appVersion = project.version
icon = "src/main/resources/static/favicon.png"
type = "deb" // Can also use "rpm" for Red Hat-based systems

Expand Down Expand Up @@ -229,23 +229,21 @@ launch4j {
outfile="Stirling-PDF.exe"

if(System.getenv("STIRLING_PDF_DESKTOP_UI") == 'true') {
headerType = "gui"
headerType = "gui"
} else {
headerType = "console"
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"]
variables=["BROWSER_OPEN=true", "STIRLING_PDF_DESKTOP_UI=true"]
} else {
variables=["BROWSER_OPEN=true"]
variables=["BROWSER_OPEN=true"]
}



jreMinVersion="17"

mutexName="Stirling-PDF"
Expand Down Expand Up @@ -286,10 +284,10 @@ configurations.all {
}
dependencies {

if (System.getenv("STIRLING_PDF_DESKTOP_UI") != "false") {
implementation "me.friwi:jcefmaven:127.3.1"
implementation "org.openjfx:javafx-controls:21"
implementation "org.openjfx:javafx-swing:21"
if (System.getenv("STIRLING_PDF_DESKTOP_UI") != "false") {
implementation "me.friwi:jcefmaven:127.3.1"
implementation "org.openjfx:javafx-controls:21"
implementation "org.openjfx:javafx-swing:21"
}

//security updates
Expand All @@ -315,10 +313,10 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion"
implementation "org.springframework.boot:spring-boot-starter-oauth2-client:$springBootVersion"

implementation "org.springframework.session:spring-session-core:$springBootVersion"
implementation "org.springframework.session:spring-session-core:$springBootVersion"
implementation "org.springframework:spring-jdbc:6.2.1"

implementation 'com.unboundid.product.scim2:scim2-sdk-client:2.3.5'
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.4"
Expand All @@ -328,7 +326,7 @@ dependencies {
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 'org.springframework.security:spring-security-core:$springSecuritySamlVersion'
implementation 'com.coveo:saml-client:5.0.0'


Expand Down Expand Up @@ -397,9 +395,9 @@ dependencies {
// https://mvnrepository.com/artifact/com.bucket4j/bucket4j_jdk17
implementation "com.bucket4j:bucket4j_jdk17-core:8.14.0"
implementation "com.fathzer:javaluator:3.0.5"
implementation 'com.vladsch.flexmark:flexmark-html2md-converter:0.64.8'

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"
Expand All @@ -423,13 +421,13 @@ task writeVersion {
}

swaggerhubUpload {
//dependsOn generateOpenApiDocs // Depends on your task generating Swagger docs
api "Stirling-PDF" // The name of your API on SwaggerHub
owner "Frooodle" // Your SwaggerHub username (or organization name)
version project.version // The version of your API
inputFile "./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
// dependsOn = generateOpenApiDocs // Depends on your task generating Swagger docs
api = "Stirling-PDF" // The name of your API on SwaggerHub
owner = "Frooodle" // Your SwaggerHub username (or organization name)
version = project.version // The version of your API
inputFile = "./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 {
Expand All @@ -454,4 +452,4 @@ task printMacVersion {
doLast {
println getMacVersion(project.version.toString())
}
}
}
Loading