Skip to content

Commit 833b35e

Browse files
committed
Fix output name second attempt
1 parent c5ce702 commit 833b35e

6 files changed

+24
-5
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
branch = shadowsocks-android
1717
[submodule "core/src/main/rust/shadowsocks-rust"]
1818
path = core/src/main/rust/shadowsocks-rust
19-
url = https://github.com/madeye/shadowsocks-rust
19+
url = https://github.com/shadowsocks/shadowsocks-rust.git

core/build.gradle.kts

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ cargo {
5050
"local-flow-stat",
5151
"local-dns-relay"))
5252
exec = { spec, toolchain ->
53-
spec.environment("RUST_ANDROID_GRADLE_CC_LINK_ARG", "-o,target/${toolchain.target}/$profile/lib$libname.so")
53+
spec.environment("RUST_ANDROID_GRADLE_LINKER_WRAPPER_PY", "$projectDir/$module/../linker-wrapper.py")
54+
spec.environment("RUST_ANDROID_GRADLE_TARGET", "target/${toolchain.target}/$profile/lib$libname.so")
5455
}
5556
}
5657

core/src/main/rust/linker-wrapper.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from __future__ import absolute_import, print_function, unicode_literals
2+
3+
import os
4+
import pipes
5+
import shutil
6+
import subprocess
7+
import sys
8+
9+
args = [os.environ['RUST_ANDROID_GRADLE_CC'], os.environ['RUST_ANDROID_GRADLE_CC_LINK_ARG']] + sys.argv[1:]
10+
11+
# This only appears when the subprocess call fails, but it's helpful then.
12+
printable_cmd = ' '.join(pipes.quote(arg) for arg in args)
13+
print(printable_cmd)
14+
15+
code = subprocess.call(args)
16+
if code == 0:
17+
shutil.copyfile(sys.argv[sys.argv.index('-o') + 1], os.environ['RUST_ANDROID_GRADLE_TARGET'])
18+
sys.exit(code)

mobile/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ dependencies {
2121
implementation("com.google.zxing:core:3.4.0")
2222
implementation("com.takisoft.preferencex:preferencex-simplemenu:1.1.0")
2323
implementation("com.twofortyfouram:android-plugin-api-for-locale:1.0.4")
24-
implementation("me.zhanghai.android.fastscroll:library:1.1.2")
24+
implementation("me.zhanghai.android.fastscroll:library:1.1.3")
2525
implementation("xyz.belvi.mobilevision:barcodescanner:2.0.3")
2626
}

repositories.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
rootProject.extra.apply {
2-
set("androidPlugin", "com.android.tools.build:gradle:4.1.0-alpha07")
2+
set("androidPlugin", "com.android.tools.build:gradle:4.1.0-alpha08")
33
set("kotlinVersion", "1.3.72")
44
}
55

0 commit comments

Comments
 (0)