diff --git a/core/build.gradle b/core/build.gradle index a9e80d7a2e..6ef4c53c51 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -53,14 +53,17 @@ androidExtensions { cargo { module = 'shadowsocks-rust' - libname = 'shadowsocks' + libname = 'sslocal' targets = ['arm', 'arm64', 'x86', 'x86_64'] profile = 'release' - targetIncludes = ['sslocal'] + targetIncludes = ['libsslocal.so'] extraCargoBuildArguments = ['--bin', 'sslocal'] features { noDefaultBut "sodium" } + exec { spec, toolchain -> + spec.environment("RUSTFLAGS", "-C link-arg=-o -C link-arg=target/${toolchain.target}/release/libsslocal.so") + } } def coroutinesVersion = '1.3.3'