Skip to content

Commit 3512924

Browse files
feat(agent): Remove native libraries for unsupported environment (#10079)
1 parent 3c70e67 commit 3512924

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

dd-java-agent/build.gradle

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,31 @@ def generalShadowJarConfig(ShadowJar shadowJarTask) {
104104
exclude '**/io/airlift/compress/snappy/**'
105105
relocate 'io.airlift', 'datadog.io.airlift'
106106

107+
// Minimize JNA, removing native libraries for unsupported environments
108+
exclude '**/com/sun/jna/aix-*/**'
109+
exclude '**/com/sun/jna/freebsd-*/**'
110+
exclude '**/com/sun/jna/linux-armel/**'
111+
exclude '**/com/sun/jna/linux-mips64el/**'
112+
exclude '**/com/sun/jna/linux-ppc/**'
113+
exclude '**/com/sun/jna/linux-ppc64le/**'
114+
exclude '**/com/sun/jna/linux-riscv64/**'
115+
exclude '**/com/sun/jna/linux-s390x/**'
116+
exclude '**/com/sun/jna/openbsd-*/**'
117+
exclude '**/com/sun/jna/sunos-*/**'
118+
119+
// Minimize JFFI, removing native libraries for unsupported environments
120+
exclude '**/jni/*-AIX/**'
121+
exclude '**/jni/*-DragonFlyBSD/**'
122+
exclude '**/jni/*-FreeBSD/**'
123+
exclude '**/jni/loongarch64-Linux/**'
124+
exclude '**/jni/mips64el-Linux/**'
125+
exclude '**/jni/ppc64-Linux/**'
126+
exclude '**/jni/ppc64le-Linux/**'
127+
exclude '**/jni/s390x-Linux/**'
128+
exclude '**/jni/sparcv9-Linux/**'
129+
exclude '**/jni/*-OpenBSD/**'
130+
exclude '**/jni/*-SunOS/**'
131+
107132
final String projectName = "${project.name}"
108133

109134
// Prevents conflict with other instances, but doesn't relocate instrumentation

0 commit comments

Comments
 (0)