add library, library-manifest, and library-publish

This commit is contained in:
2025-09-09 13:16:53 +02:00
parent 75c1331793
commit 2e264a7ea9
5 changed files with 83 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
plugins {
id("ltd.lulz.plugin.core-plugin")
}
tasks.withType<Jar>().configureEach {
manifest.attributes.apply {
put("Implementation-Title", project.name.split("-").joinToString(" "))
put("Implementation-Version", project.version)
put("Implementation-Vendor", info.vendorName)
put("Built-By", System.getProperty("user.name"))
put("Built-Git", "${git.currentBranch()} #${git.currentShortHash()}")
put("Built-Gradle", project.gradle.gradleVersion)
put("Built-JDK", System.getProperty("java.version"))
put("Built-OS", "${System.getProperty("os.name")} v${System.getProperty("os.version")}")
put("Built-Time", info.utcTimestamp)
}
}

View File

@@ -0,0 +1,19 @@
plugins {
id("ltd.lulz.plugin.core-plugin")
`maven-publish`
}
publishing {
repositories {
maven {
url = uri("https://gitea.lulz.ltd/api/packages/aura-ascend/maven")
name = "GiteaPackages"
credentials {
username = config.find("repository.gitea.user", "REPOSITORY_USER")
password = config.find("repository.gitea.token", "REPOSITORY_TOKEN")
}
}
}
publications.register("mavenJava", MavenPublication::class) { from(components["java"]) }
}

View File

@@ -0,0 +1,21 @@
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
id("ltd.lulz.plugin.common-plugin.common")
id("ltd.lulz.plugin.common-plugin.library-manifest")
id("ltd.lulz.plugin.common-plugin.library-publish")
id("org.springframework.boot")
}
java {
withSourcesJar()
}
tasks {
named<Jar>("jar") {
archiveClassifier.set("")
}
withType<BootJar> {
enabled = false
}
}