add plugin library publish
This commit is contained in:
@@ -39,6 +39,12 @@ id `ltd.hlaeja.plugin.hlaeja-common-plugin.library-manifest`
|
|||||||
|
|
||||||
Extend manifest in library jar file.
|
Extend manifest in library jar file.
|
||||||
|
|
||||||
|
### Plugin Library publish
|
||||||
|
|
||||||
|
id `ltd.hlaeja.plugin.hlaeja-common-plugin.library-publish`
|
||||||
|
|
||||||
|
Configuration for publishing project artifacts to a remote Maven repository.
|
||||||
|
|
||||||
## Releasing plugin
|
## Releasing plugin
|
||||||
|
|
||||||
Run `release.sh` script from `master` branch.
|
Run `release.sh` script from `master` branch.
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import java.lang.System.getenv
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
`maven-publish`
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
|
||||||
|
fun retrieveConfiguration(
|
||||||
|
property: String,
|
||||||
|
environment: String,
|
||||||
|
): String? = project.findProperty(property)?.toString() ?: getenv(environment)
|
||||||
|
|
||||||
|
maven {
|
||||||
|
url = uri("https://maven.pkg.github.com/swordsteel/${project.name}")
|
||||||
|
name = "GitHubPackages"
|
||||||
|
credentials {
|
||||||
|
username = retrieveConfiguration("repository.user", "REPOSITORY_USER")
|
||||||
|
password = retrieveConfiguration("repository.token", "REPOSITORY_TOKEN")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publications.register("mavenJava", MavenPublication::class) { from(components["java"]) }
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ import org.springframework.boot.gradle.tasks.bundling.BootJar
|
|||||||
plugins {
|
plugins {
|
||||||
id("ltd.hlaeja.plugin.hlaeja-common-plugin.common")
|
id("ltd.hlaeja.plugin.hlaeja-common-plugin.common")
|
||||||
id("ltd.hlaeja.plugin.hlaeja-common-plugin.library-manifest")
|
id("ltd.hlaeja.plugin.hlaeja-common-plugin.library-manifest")
|
||||||
|
id("ltd.hlaeja.plugin.hlaeja-common-plugin.library-publish")
|
||||||
id("org.springframework.boot")
|
id("org.springframework.boot")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user