Add copyCertificates
- update README.md with certificate plugin - add Ltd_hlaeja_plugin_hlaeja_common_plugin_certificate_gradle.kts
This commit is contained in:
@@ -92,6 +92,12 @@ id `ltd.hlaeja.plugin.hlaeja-common-plugin.service-process-resource`
|
||||
|
||||
Assign values to `application.yml` from Gradle.
|
||||
|
||||
### Plugin Certificate
|
||||
|
||||
id `ltd.hlaeja.plugin.hlaeja-common-plugin.cetificat`
|
||||
|
||||
Copy certificate to build resources by placing one or more of `private_key.pem`, `public_key.pem`, or `keystore.p12` in `/cert` folder.
|
||||
|
||||
## Releasing plugin
|
||||
|
||||
Run `release.sh` script from `master` branch.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
val filesToCopy = listOf(
|
||||
"private_key.pem",
|
||||
"public_key.pem",
|
||||
"keystore.p12",
|
||||
)
|
||||
|
||||
tasks {
|
||||
register<Copy>("copyCertificates") {
|
||||
group = "hlaeja"
|
||||
into("${layout.buildDirectory.get()}/resources/main/cert")
|
||||
filesToCopy.filter { file("cert/$it").exists() }
|
||||
.forEach { file ->
|
||||
from("cert/$file") {
|
||||
include(file)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user