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:
@@ -7,8 +7,14 @@ plugins {
|
||||
id 'java'
|
||||
id 'maven-publish'
|
||||
id 'pmd'
|
||||
id 'com.palantir.git-version'
|
||||
}
|
||||
|
||||
import java.time.LocalDate
|
||||
|
||||
def currentYear = LocalDate.now().getYear()
|
||||
def version = gitVersion(prefix:'release@')
|
||||
|
||||
repositories {
|
||||
|
||||
maven {
|
||||
@@ -26,7 +32,7 @@ dependencies {
|
||||
implementation 'org.apache.commons:commons-text:1.11.0'
|
||||
implementation 'commons-cli:commons-cli:1.9.0'
|
||||
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'
|
||||
}
|
||||
|
||||
@@ -73,10 +79,28 @@ javadoc {
|
||||
options.tags('factory')
|
||||
options.tags('see')
|
||||
|
||||
options.bottom = "Copyright © 2025 Egothor"
|
||||
options.bottom = "Copyright © ${currentYear} Egothor - Version ${version}"
|
||||
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') {
|
||||
// Use JUnit Platform for unit tests.
|
||||
useJUnitPlatform()
|
||||
@@ -87,6 +111,7 @@ if (project.hasProperty('giteaToken') && project.giteaToken) {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
artifactId = "${rootProject.name}-${project.name}"
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
|
||||
Reference in New Issue
Block a user