Build process modification
feat: Javadoc footer improvement, deployment to a website chore: build process clean-up Signed-off-by: Leo Galambos <lg@hq.egothor.org>
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'buildlogic.java-application-conventions'
|
id 'buildlogic.java-application-conventions'
|
||||||
id 'com.palantir.git-version' version '4.0.0'
|
id 'com.palantir.git-version'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'org.egothor'
|
group 'org.egothor'
|
||||||
version gitVersion(prefix:'release@')
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.apache.commons:commons-text'
|
implementation 'org.apache.commons:commons-text'
|
||||||
@@ -20,33 +19,41 @@ application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes(
|
attributes(
|
||||||
'Main-Class': application.mainClass,
|
'Main-Class': application.mainClass,
|
||||||
'Implementation-Title': rootProject.name,
|
'Implementation-Title': rootProject.name,
|
||||||
'Implementation-Version': "${version}"
|
'Implementation-Version': "${version}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include compiled classes from main source set
|
from sourceSets.main.output
|
||||||
from sourceSets.main.output
|
|
||||||
|
dependsOn configurations.runtimeClasspath
|
||||||
dependsOn configurations.runtimeClasspath
|
|
||||||
from {
|
// Include each JAR dependency
|
||||||
configurations.runtimeClasspath.collect { dep ->
|
configurations.runtimeClasspath.findAll { it.exists() && it.name.endsWith('.jar') }.each { jarFile ->
|
||||||
if (dep.isDirectory()) {
|
def jarName = jarFile.name.replaceAll(/\.jar$/, '')
|
||||||
dep
|
|
||||||
} else {
|
from(zipTree(jarFile)) {
|
||||||
zipTree(dep).matching {
|
// Exclude signature-related files
|
||||||
exclude 'META-INF/LICENSE.*'
|
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA'
|
||||||
exclude 'META-INF/*.SF'
|
|
||||||
exclude 'META-INF/*.DSA'
|
// Rename license/notice files to avoid conflicts
|
||||||
exclude 'META-INF/*.RSA'
|
eachFile { file ->
|
||||||
|
if (file.path ==~ /META-INF\/(LICENSE|NOTICE)(\..*)?/) {
|
||||||
|
file.path = "META-INF/licenses-from-${jarName}/${file.name}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
includeEmptyDirs = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
javadoc {
|
||||||
|
options.links("https://www.egothor.org/javadoc/zeroecho/lib")
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,14 @@ plugins {
|
|||||||
id 'java'
|
id 'java'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'pmd'
|
id 'pmd'
|
||||||
|
id 'com.palantir.git-version'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import java.time.LocalDate
|
||||||
|
|
||||||
|
def currentYear = LocalDate.now().getYear()
|
||||||
|
def version = gitVersion(prefix:'release@')
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
@@ -26,7 +32,7 @@ dependencies {
|
|||||||
implementation 'org.apache.commons:commons-text:1.11.0'
|
implementation 'org.apache.commons:commons-text:1.11.0'
|
||||||
implementation 'commons-cli:commons-cli:1.9.0'
|
implementation 'commons-cli:commons-cli:1.9.0'
|
||||||
implementation 'org.bouncycastle:bcpkix-jdk18on:1.81'
|
implementation 'org.bouncycastle:bcpkix-jdk18on:1.81'
|
||||||
implementation 'org.egothor:conflux:1.1.0'
|
implementation 'org.egothor:conflux:[1.0,2.0)'
|
||||||
implementation 'org.apache.commons:commons-imaging:1.0.0-alpha6'
|
implementation 'org.apache.commons:commons-imaging:1.0.0-alpha6'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,10 +79,28 @@ javadoc {
|
|||||||
options.tags('factory')
|
options.tags('factory')
|
||||||
options.tags('see')
|
options.tags('see')
|
||||||
|
|
||||||
options.bottom = "Copyright © 2025 Egothor"
|
options.bottom = "Copyright © ${currentYear} Egothor - Version ${version}"
|
||||||
source = sourceSets.main.allJava
|
source = sourceSets.main.allJava
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task uploadJavadoc(type: Exec) {
|
||||||
|
dependsOn javadoc
|
||||||
|
|
||||||
|
doFirst {
|
||||||
|
def javadocDir = tasks.javadoc.destinationDir
|
||||||
|
def relativeJavadocDir = project.projectDir.toPath().relativize(javadocDir.toPath()).toString()
|
||||||
|
def moduleName = project.name // Dynamically get the module name
|
||||||
|
|
||||||
|
println "Uploading Javadoc for module: ${moduleName}"
|
||||||
|
println "Uploading from relative path: $relativeJavadocDir"
|
||||||
|
|
||||||
|
// Upload to a folder named after the module
|
||||||
|
commandLine "rsync", "-avz", "--delete",
|
||||||
|
"-e", "ssh -i ${javadocKeyPath} -o IdentitiesOnly=yes",
|
||||||
|
relativeJavadocDir + '/', "${javadocUser}@${javadocHost}:${javadocPath}/${project.name}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.named('test') {
|
tasks.named('test') {
|
||||||
// Use JUnit Platform for unit tests.
|
// Use JUnit Platform for unit tests.
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
@@ -87,6 +111,7 @@ if (project.hasProperty('giteaToken') && project.giteaToken) {
|
|||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
from components.java
|
from components.java
|
||||||
|
artifactId = "${rootProject.name}-${project.name}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
|
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
|
||||||
|
javadocPath=/var/www/html/javadoc/zeroecho/
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'buildlogic.java-library-conventions'
|
id 'buildlogic.java-library-conventions'
|
||||||
id 'com.palantir.git-version' version '4.0.0'
|
id 'com.palantir.git-version'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'org.egothor'
|
group 'org.egothor'
|
||||||
version gitVersion(prefix:'release@')
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.bouncycastle:bcpkix-jdk18on'
|
implementation 'org.bouncycastle:bcpkix-jdk18on'
|
||||||
implementation 'org.egothor:conflux'
|
implementation 'org.egothor:conflux'
|
||||||
implementation 'org.apache.commons:commons-imaging'
|
implementation 'org.apache.commons:commons-imaging'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
javadoc {
|
||||||
|
options.links("https://www.egothor.org/javadoc/conflux")
|
||||||
|
}
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
|
pluginManagement {
|
||||||
|
plugins {
|
||||||
|
id 'com.palantir.git-version' version '4.0.0' // Define the plugin version globally
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// Apply the foojay-resolver plugin to allow automatic download of JDKs
|
// Apply the foojay-resolver plugin to allow automatic download of JDKs
|
||||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
|
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user