commit - c4e479061eef64135ae09e7ef9ae3db30962f2fe
commit + b71f6949bb115d8baec69a0f0d052a1b9dace3cc
blob - 8f95a50047543a4de0867891cfa4d7e5eefb393e
blob + 79cc84b719e863b0cab6fa751ff6a57b86e2cb08
--- build.gradle
+++ build.gradle
apply from: rootProject.file('gradle/versions.gradle')
distributions.forEach {
- def distributionName = '';
+ def distributionName = ''
def installName = project.name
if (it.name != 'main') {
distributionName = it.name.capitalize()
blob - 2ce02a1740633df959312182e8579dae45e20264
blob + 71f842c960b0178ef6780453571ee0a77e2acdd5
--- gradle/bnd.gradle
+++ gradle/bnd.gradle
jar.bundle.bnd (
'Bundle-Name': '%bundle.name',
'Bundle-Description': '%bundle.description',
- 'Bundle-Vendor': '%bundle.vendor'
- )
+ 'Bundle-Vendor': '%bundle.vendor')
}
} catch (Exception ignored) {
// Assume project did not follow our bundle localization convention and fail silently
blob - /dev/null
blob + 0c0f3418debde835e2a9543f96478efb073270d4 (mode 644)
--- /dev/null
+++ gradle/config/spotless/greclipse.properties
+#
+# Copyright (C) 2024 by Chaz Kettleson <chaz@pyr3x.com>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+# Spotless greclipse configuration
+
+#Whether to use 'space', 'tab' or 'mixed' (both) characters for indentation.
+#The default value is 'tab'.
+org.eclipse.jdt.core.formatter.tabulation.char=space
+
+#Number of spaces used for indentation in case 'space' characters
+#have been selected. The default value is 4.
+org.eclipse.jdt.core.formatter.tabulation.size=2
+
+#Number of spaces used for indentation in case 'mixed' characters
+#have been selected. The default value is 4.
+#org.eclipse.jdt.core.formatter.indentation.size=4
+
+#Whether or not indentation characters are inserted into empty lines.
+#The default value is 'true'.
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+
+#Number of spaces used for multiline indentation.
+#The default value is 2.
+groovy.formatter.multiline.indentation=1
+
+#Length after which list are considered too long. These will be wrapped.
+#The default value is 30.
+groovy.formatter.longListLength=100
+
+#Whether opening braces position shall be the next line.
+#The default value is 'same'.
+#groovy.formatter.braces.start=same
+
+#Whether closing braces position shall be the next line.
+#The default value is 'next'.
+#groovy.formatter.braces.end=next
+
+#Remove unnecessary semicolons. The default value is 'false'.
+groovy.formatter.remove.unnecessary.semicolons=true
blob - e863cf9f0c2eed3f68ca6d4269ec7f7afc1065a1
blob + f1ae19288f389c5898ff22616314fc92f16f4ea4
--- gradle/cyclonedx.gradle
+++ gradle/cyclonedx.gradle
}
apply plugin:org.cyclonedx.gradle.CycloneDxPlugin
-import org.cyclonedx.model.AttachmentText;
-import org.cyclonedx.model.OrganizationalContact;
-import org.cyclonedx.model.License;
+import org.cyclonedx.model.AttachmentText
+import org.cyclonedx.model.OrganizationalContact
+import org.cyclonedx.model.License
cyclonedxBom {
includeConfigs = [configurations.runtimeClasspath.name]
attachmentText.setText(rootProject.file('LICENSE').text)
License license = new License()
license.setName(cyclonedx_license_name)
- license.setLicenseText(attachmentText);
+ license.setLicenseText(attachmentText)
license.setUrl(cyclonedx_license_url)
licenseChoice {lc->
lc.addLicense(license)
blob - 4376ae9f69de20bbfed904641ff6a5ad0f432fb0
blob + d9b171ba4444f57cb4709535b73a006a3a4f5073
--- gradle/jarsigner.gradle
+++ gradle/jarsigner.gradle
def promptInput = { inputRequested, mask ->
new SwingBuilder().edt {
dialog(modal: true,
- title: 'Enter ' + inputRequested,
- alwaysOnTop: true,
- resizable: false,
- locationRelativeTo: null,
- pack: true,
- show: true
+ title: 'Enter ' + inputRequested,
+ alwaysOnTop: true,
+ resizable: false,
+ locationRelativeTo: null,
+ pack: true,
+ show: true
) {
vbox {
label(text: 'Please enter ' + inputRequested + ':')
input = textField()
}
button(defaultButton: true, text: 'OK', actionPerformed: {
- if (mask) {
- retval = input.password
- } else {
- retval = input.text
- }
- dispose()
- })
+ if (mask) {
+ retval = input.password
+ } else {
+ retval = input.text
+ }
+ dispose()
+ })
}
}
}
}
doLast {
signJars.ext.jars.parallelStream().forEach {
- def command = ['jarsigner' \
- , '-storepass', storepass \
- , '-keystore', keystore \
- , '-storetype', storetype \
- , '-providerClass', providerClass \
- , '-providerArg', providerArg \
- , '-keypass', keypass \
- , '-strict' \
- , '-tsa', tsaurl \
- , '-sigalg', sigalg \
- , '-digestalg', digestalg \
- , it \
- , alias]
+ def command = [
+ 'jarsigner',
+ '-storepass',
+ storepass,
+ '-keystore',
+ keystore,
+ '-storetype',
+ storetype,
+ '-providerClass',
+ providerClass,
+ '-providerArg',
+ providerArg,
+ '-keypass',
+ keypass,
+ '-strict',
+ '-tsa',
+ tsaurl,
+ '-sigalg',
+ sigalg,
+ '-digestalg',
+ digestalg,
+ it,
+ alias
+ ]
if (method == 'keystore') {
command.removeAll(['-providerClass', providerClass, '-providerArg', providerArg])
} else {
blob - 805ad8dfec3d7a8e3e109bba25f7ce6619b907ee
blob + f042b86f7888f3ed228e73c24b544a8902604cc7
--- gradle/java.gradle
+++ gradle/java.gradle
jar.manifest.attributes (
"Implementation-Title": project.name,
"Implementation-Vendor": project.vendor,
- "Implementation-Version": project.version
-)
+ "Implementation-Version": project.version)
test {
useJUnitPlatform()
blob - 7ce4a1647f19541233ab3bcac79cf2cd141c817d
blob + 8a0bc1f9b68258a21ce9d6ca1db9413131a9de7c
--- gradle/jib.gradle
+++ gradle/jib.gradle
into = project.provider { '/app' }
}
// Hack to change owner permissions
- path { from = project.provider { 'src/main/jib' } }
+ path {
+ from = project.provider {
+ 'src/main/jib'
+ }
+ }
}
permissions = [ '/app/bin/**': '755' ]
}
blob - e8e2a0a8a61924825fa2a6f233713a2b6bb1248c
blob + d4796c57c2b30bc335531e37d140a0d947aa5ef4
--- gradle/keytool.gradle
+++ gradle/keytool.gradle
rootProject.file('.private/keystore.p12').path
def storepass = System.getenv('KEYTOOL_STOREPASS') ?: keytoolProperties.storepass ?: 'password'
def storetype = System.getenv('KEYTOOL_STORETYPE') ?: keytoolProperties.storetype ?: 'PKCS12'
- def command = ['keytool' \
- , '-genkeypair' \
- , '-alias', alias \
- , '-keyalg', keyalg \
- , '-keysize', keysize \
- , '-sigalg', sigalg \
- , '-dname', dname \
- , '-validity', validity \
- , '-keypass', keypass \
- , '-keystore', keystore \
- , '-storepass', storepass \
- , '-storetype', storetype]
+ def command = [
+ 'keytool' \
+ ,
+ '-genkeypair' \
+ ,
+ '-alias',
+ alias \
+ ,
+ '-keyalg',
+ keyalg \
+ ,
+ '-keysize',
+ keysize \
+ ,
+ '-sigalg',
+ sigalg \
+ ,
+ '-dname',
+ dname \
+ ,
+ '-validity',
+ validity \
+ ,
+ '-keypass',
+ keypass \
+ ,
+ '-keystore',
+ keystore \
+ ,
+ '-storepass',
+ storepass \
+ ,
+ '-storetype',
+ storetype
+ ]
def keystoreFile = file(keystore).toPath()
// Create keystore parent directories
Files.createDirectories(keystoreFile.parent)
rootProject.file('.private/keystore.p12').path
def storepass = System.getenv('KEYTOOL_STOREPASS') ?: keytoolProperties.storepass ?: 'password'
def storetype = System.getenv('KEYTOOL_STORETYPE') ?: keytoolProperties.storetype ?: 'PKCS12'
- def command = ['keytool' \
- , '-exportcert' \
- , '-rfc' \
- , '-alias', alias \
- , '-file', cert \
- , '-keystore', keystore \
- , '-storepass', storepass \
- , '-storetype', storetype]
+ def command = [
+ 'keytool',
+ '-exportcert',
+ '-rfc',
+ '-alias',
+ alias,
+ '-file',
+ cert,
+ '-keystore',
+ keystore,
+ '-storepass',
+ storepass,
+ '-storetype',
+ storetype
+ ]
def certFile = file(cert).toPath()
// Create cert parent directories
Files.createDirectories(certFile.parent)
rootProject.file("${project.name}-environment/etc/truststore.jks").path
def truststorepass = System.getenv('KEYTOOL_TRUSTSTOREPASS') ?: keytoolProperties.truststorepass ?: 'password'
def truststoretype = System.getenv('KEYTOOL_TRUSTSTORETYPE') ?: keytoolProperties.truststoretype ?: 'JKS'
- def command = ['keytool' \
- , '-importcert' \
- , '-noprompt' \
- , '-alias', alias \
- , '-file', cert \
- , '-keypass', keypass \
- , '-keystore', truststore \
- , '-storepass', truststorepass \
- , '-storetype', truststoretype]
+ def command = [
+ 'keytool' \
+ ,
+ '-importcert' \
+ ,
+ '-noprompt' \
+ ,
+ '-alias',
+ alias \
+ ,
+ '-file',
+ cert \
+ ,
+ '-keypass',
+ keypass \
+ ,
+ '-keystore',
+ truststore \
+ ,
+ '-storepass',
+ truststorepass \
+ ,
+ '-storetype',
+ truststoretype
+ ]
def truststoreFile = file(truststore).toPath()
// Create truststore parent directories
Files.createDirectories(truststoreFile.parent)
blob - 1bf09fa6386b7b514decf21a644c938b2e545fe8
blob + c00b28b95568386fe6729211c8202cda59db74d7
--- gradle/signjar.gradle
+++ gradle/signjar.gradle
}
}
doLast {
- def command = ['jarsigner' \
- , '-storepass', storepass \
- , '-keystore', keystore \
- , '-storetype', storetype \
- , '-providerClass', providerClass \
- , '-providerArg', providerArg \
- , '-keypass', keypass \
- , '-strict' \
- , '-tsa', tsaurl \
- , '-sigalg', sigalg \
- , '-digestalg', digestalg \
- , jar.outputs.files.singleFile \
- , alias]
+ def command = [
+ 'jarsigner',
+ '-storepass',
+ storepass,
+ '-keystore',
+ keystore,
+ '-storetype',
+ storetype,
+ '-providerClass',
+ providerClass,
+ '-providerArg',
+ providerArg,
+ '-keypass',
+ keypass,
+ '-strict',
+ '-tsa',
+ tsaurl,
+ '-sigalg',
+ sigalg,
+ '-digestalg',
+ digestalg,
+ jar.outputs.files.singleFile,
+ alias
+ ]
if (method == 'keystore') {
command.removeAll(['-providerClass', providerClass, '-providerArg', providerArg])
} else {
blob - 462e994f81aee74ed345ccfc0320a3e48ca3cf04
blob + 357ecd473da12b9f1c242a64ab27ffe8b7159666
--- gradle/spotless.gradle
+++ gradle/spotless.gradle
apply plugin: com.diffplug.gradle.spotless.SpotlessPlugin
spotless {
+ groovyGradle {
+ target '**/*.gradle'
+ greclipse().configFile(rootProject.file('gradle/config/spotless/greclipse.properties'))
+ }
java {
googleJavaFormat()
endWithNewline()