mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-22 10:57:58 +01:00
WIP: GraalVM support
This commit is contained in:
parent
b719810575
commit
fb4805752e
5 changed files with 51 additions and 0 deletions
Binary file not shown.
BIN
pgpainless-cli/additional-native-metadata/._reflection.json
Normal file
BIN
pgpainless-cli/additional-native-metadata/._reflection.json
Normal file
Binary file not shown.
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"resources": {
|
||||
"includes": [
|
||||
{
|
||||
"pattern": "org/bouncycastle/.*"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
17
pgpainless-cli/additional-native-metadata/reflection.json
Normal file
17
pgpainless-cli/additional-native-metadata/reflection.json
Normal 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
|
||||
}
|
||||
]
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue