-
Notifications
You must be signed in to change notification settings - Fork 12
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
Initial gradle build #212
base: main
Are you sure you want to change the base?
Initial gradle build #212
Conversation
e40279a
to
28c14a9
Compare
org-junit-jupiter-junit-jupiter-api = "5.10.2" | ||
org-junit-jupiter-junit-jupiter-engine = "5.10.2" | ||
org-junit-jupiter-junit-jupiter-params = "5.10.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the intentions of having this file is not having to maintain separate versions where the version number is actually shared. Please consolidate duplicate versions into single entries where possible
@@ -0,0 +1,7 @@ | |||
distributionBase=GRADLE_USER_HOME | |||
distributionPath=wrapper/dists | |||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a more recent version, at the time of writing 8.10.2 is the latest release
@@ -0,0 +1,12 @@ | |||
allprojects { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using allprojects/subprojects is considered bad practice by the gradle community and developers now and should be avoided. Move this to the java-conventions plugin
} | ||
|
||
val jaxb: Configuration by configurations.creating | ||
val jaxbVersion: String = "4.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
val jaxb: Configuration by configurations.creating | ||
val jaxbVersion: String = "4.0.0" | ||
val schemaDir = "src/main" | ||
val xjcOutputDir = "$buildDir/generated/source/xjc/main" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
// force generated javadoc to english | ||
javaExec.jvmArgs = listOf("-Duser.language=en-US") | ||
|
||
javaExec.args = mutableListOf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This enables way more flags and plugins than we previously did, changing the data model somewhat. Should only happen in a separate PR if needed.
val connection = url.openConnection() | ||
connection.connect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is using the default configuration of indefinite timeouts, which we very likely do not want.
} | ||
|
||
dependencies { | ||
implementation("com.github.jk1:gradle-license-report:2.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.0 is over three years old, current release is 2.9
private fun downloadLicense(licenseUrl: String, moduleName: String, fileName: String) { | ||
val sanitizedUrl = licenseUrl.trim() | ||
val url = URL(sanitizedUrl) | ||
val safeModuleName = moduleName.replace("[^a-zA-Z0-9.-]".toRegex(), "_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unused
|
||
val projectName = "SDCcc-gradle" | ||
|
||
launch4j { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider providing something we can reuse in other places instead of hardcoding it here - convention plugin? :)
Also remove the maven files ;) |
// Initial migration to gradle
Checklist
The following aspects have been respected by the author of this pull request, confirmed by both pull request assignee and reviewer: