1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-05 03:55:58 +01:00

WIP: GraalVM support

This commit is contained in:
Paul Schaub 2024-09-16 15:12:31 +02:00
parent b719810575
commit fb4805752e
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
5 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,9 @@
{
"resources": {
"includes": [
{
"pattern": "org/bouncycastle/.*"
}
]
}
}

View file

@ -0,0 +1,17 @@
[
{
"name" : "org.bouncycastle.jce.provider.BouncyCastleProvider",
"allDeclaredMethods" : true,
"allDeclaredConstructors" : true
},
{
"name" : "org.bouncycastle.openpgp.*",
"allDeclaredMethods" : true,
"allDeclaredConstructors" : true
},
{
"name": "org.bouncycastle.crypto.digests.SHA256Digest",
"allDeclaredConstructors": true,
"allDeclaredMethods": true
}
]

View file

@ -5,6 +5,7 @@
plugins {
id 'application'
id "com.github.johnrengelman.shadow" version "6.1.0"
id 'org.graalvm.buildtools.native' version '0.10.3'
}
def generatedVersionDir = "${buildDir}/generated-version"
@ -78,4 +79,28 @@ run {
}
}
graalvmNative {
binaries {
main {
imageName = "GraalVM-Native-pgpainless"
mainClass = "$mainClassName"
buildArgs.add("-O4")
buildArgs.add('-H:ConfigurationFileDirectories=../../../build/resources/main/META-INF/native-image/')
buildArgs.add('--no-fallback')
buildArgs.add('--verbose')
buildArgs.add('-H:+BuildReport')
buildArgs.add('-J-XshowSettings:vm')
buildArgs.add('--report-unsupported-elements-at-runtime')
buildArgs.add('-H:+ReportExceptionStackTraces')
buildArgs.add('--initialize-at-build-time=org.bouncycastle')
buildArgs.add('--initialize-at-build-time=org.bouncycastle.jce.provider.BouncyCastleProvider')
buildArgs.add('-H:ReflectionConfigurationFiles=../../../additional-native-metadata/reflection.json')
buildArgs.add('-H:ResourceConfigurationFiles=../../../additional-native-metadata/include-resources.json')
}
}
binaries.all {
buildArgs.add("--verbose")
}
}
// tasks."jar".dependsOn(":pgpainless-core:assemble", ":pgpainless-sop:assemble")