mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 10:49:39 +02:00
Extract pgpainless-sop-version property via resource filtering
This commit is contained in:
parent
a43ae43722
commit
5018386318
4 changed files with 10 additions and 22 deletions
|
@ -49,11 +49,11 @@ https://www.bouncycastle.org/java.html"""
|
|||
// See https://stackoverflow.com/a/50119235
|
||||
return try {
|
||||
val resourceIn: InputStream =
|
||||
javaClass.getResourceAsStream("/version.properties")
|
||||
javaClass.getResourceAsStream("/pgpainless-sop.properties")
|
||||
?: throw IOException("File version.properties not found.")
|
||||
|
||||
val properties = Properties().apply { load(resourceIn) }
|
||||
properties.getProperty("version")
|
||||
properties.getProperty("pgpainless-sop-version")
|
||||
} catch (e: IOException) {
|
||||
"DEVELOPMENT"
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
pgpainless-sop-version=@project.version@
|
Loading…
Add table
Add a link
Reference in a new issue