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
This commit is contained in:
DarkCat09 2025-02-18 22:58:37 +04:00
parent 931caf99a1
commit c95733c487
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82

View file

@ -11,7 +11,7 @@ RUN git clone --single-branch --depth 1 https://github.com/TeamPiped/reqwest4j.g
RUN sed -E -i \ RUN sed -E -i \
-e 's/command\.set\("cross"\)/command.set("cargo")/' \ -e 's/command\.set\("cross"\)/command.set("cargo")/' \
-e '/targets \+= target/d' \ -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 reqwest-jni/build.gradle.kts
RUN ./gradlew shadowJar RUN ./gradlew shadowJar