Skip to content

Commit

Permalink
add native build suppott
Browse files Browse the repository at this point in the history
  • Loading branch information
tharindu1st committed May 30, 2024
1 parent eea501f commit 8723b28
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gateway/enforcer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

COPY resources/lib/enforcer-${VERSION}.jar .

RUN native-image -jar enforcer-${VERSION}.jar -H:TraceClassInitialization=false -H:Name=enforcer --no-fallback
RUN native-image -jar enforcer-${VERSION}.jar -H:Name=enforcer --no-fallback

FROM ubuntu:22.04

Expand Down
1 change: 0 additions & 1 deletion gateway/enforcer/org.wso2.apk.enforcer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ dependencies {
implementation libs.openfeign.feign.gson
implementation libs.openfeign.feign.slf4j
implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1'
implementation 'org.bouncycastle:bctls-jdk18on:1.78.1'
test {
implementation libs.junit
implementation libs.mockito.inline
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Args = --features=org.wso2.apk.enforcer.commons.svm.BouncyCastleFeature \
--initialize-at-build-time=org.apache.logging.log4j \
--initialize-at-build-time=org.slf4j \
--initialize-at-build-time=org.apache.logging.slf4j.Log4jMarkerFactory \
--initialize-at-build-time=org.apache.logging.slf4j.Log4jLoggerFactory \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.channel.epoll.Epoll \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.channel.epoll.Native \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventArray \
-H:ClassInitialization=org.bouncycastle.jcajce.provider.drbg.DRBG\$Default:rerun,org.bouncycastle.jcajce.provider.drbg.DRBG\$NonceAndIV:rerun \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.channel.unix.IovArray \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.channel.unix.Errors \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethod \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.internal.tcnative.SSL \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifier \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCompressionAlgo \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.channel.unix.Limits \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.handler.ssl.ReferenceCountedOpenSslEngine \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.handler.ssl.OpenSslAsyncPrivateKeyMethod \
--initialize-at-run-time=io.grpc.netty.shaded.io.netty.handler.ssl.OpenSslPrivateKeyMethod
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,30 @@
{
"name":"sun.security.x509.SubjectKeyIdentifierExtension",
"methods":[{"name":"<init>","parameterTypes":["java.lang.Boolean","java.lang.Object"] }]
}
},
{
"name": "org.apache.logging.log4j.util.Strings",
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allDeclaredFields": true
},
{
"name": "org.apache.logging.log4j.status.StatusLogger",
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allDeclaredFields": true
},
{
"name": "org.apache.logging.slf4j.Log4jLoggerFactory",
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allDeclaredFields": true
},
{
"name": "org.slf4j.impl.StaticLoggerBinder",
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allDeclaredFields": true
}
]

0 comments on commit 8723b28

Please sign in to comment.