From c95733c487f2975a986d5a1747ca7c0db442ad45 Mon Sep 17 00:00:00 2001
From: DarkCat09 <gh@dc09.ru>
Date: Tue, 18 Feb 2025 22:58:37 +0400
Subject: [PATCH] fix: specify target triple to generate correct dir tree

Piped looks for META-INF/natives/(target triple)/libreqwest.so in the JAR.
With the default target, "(target triple)" directory name does not match the triple
(didn't check, but i suppose it is named like "default" maybe),
so Piped cannot find the native library
---
 Dockerfile.piped | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Dockerfile.piped b/Dockerfile.piped
index d05ea90..6a31bb1 100644
--- a/Dockerfile.piped
+++ b/Dockerfile.piped
@@ -11,7 +11,7 @@ RUN git clone --single-branch --depth 1 https://github.com/TeamPiped/reqwest4j.g
 RUN sed -E -i \
     -e 's/command\.set\("cross"\)/command.set("cargo")/' \
     -e '/targets \+= target/d' \
-    -e '/command\.set\("cargo"\)/a targets += defaultTarget()' \
+    -e '/command\.set\("cargo"\)/a targets += target("x86_64-unknown-linux-gnu", "libreqwest.so")' \
     reqwest-jni/build.gradle.kts
 
 RUN ./gradlew shadowJar