Commit 4afd71f8 authored by Mygod's avatar Mygod Committed by Max Lv

Fix rust not building by default

parent ab6887d8
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
[submodule "core/src/main/jni/re2"] [submodule "core/src/main/jni/re2"]
path = core/src/main/jni/re2 path = core/src/main/jni/re2
url = https://github.com/google/re2.git url = https://github.com/google/re2.git
[submodule "core/src/main/rust"] [submodule "core/src/main/rust/shadowsocks-rust"]
path = core/src/main/rust path = core/src/main/rust/shadowsocks-rust
url = https://github.com/madeye/shadowsocks-rust url = https://github.com/madeye/shadowsocks-rust
[submodule "core/src/main/jni/libancillary"] [submodule "core/src/main/jni/libancillary"]
path = core/src/main/jni/libancillary path = core/src/main/jni/libancillary
......
...@@ -32,12 +32,12 @@ buildscript { ...@@ -32,12 +32,12 @@ buildscript {
} }
dependencies { dependencies {
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3' classpath 'com.android.tools.build:gradle:4.0.0-beta01'
classpath 'com.android.tools.build:gradle:4.0.0-alpha09' classpath 'com.github.ben-manes:gradle-versions-plugin:0.28.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.27.0'
classpath 'com.google.android.gms:oss-licenses-plugin:0.9.5' classpath 'com.google.android.gms:oss-licenses-plugin:0.9.5'
classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.9.0' classpath 'com.vanniktech:gradle-maven-publish-plugin:0.9.0'
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3'
classpath 'io.fabric.tools:gradle:1.31.2' classpath 'io.fabric.tools:gradle:1.31.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
} }
......
...@@ -54,26 +54,28 @@ androidExtensions { ...@@ -54,26 +54,28 @@ androidExtensions {
} }
cargo { cargo {
module = 'src/main/rust' module = 'src/main/rust/shadowsocks-rust'
libname = 'sslocal' libname = 'sslocal'
targets = ['arm', 'arm64', 'x86', 'x86_64'] targets = ['arm', 'arm64', 'x86', 'x86_64']
profile = 'debug' profile = 'debug'
targetIncludes = ['libsslocal.so'] targetIncludes = ["lib${libname}.so"]
extraCargoBuildArguments = ['--bin', 'sslocal'] extraCargoBuildArguments = ['--bin', 'sslocal']
features { features {
noDefaultBut "sodium", "android", "rc4", "aes-cfb", "aes-ctr", "camellia-cfb", "openssl-vendored" noDefaultBut "sodium", "android", "rc4", "aes-cfb", "aes-ctr", "camellia-cfb", "openssl-vendored"
} }
exec { spec, toolchain -> exec { spec, toolchain ->
spec.environment("RUSTFLAGS", "-C link-arg=-o -C link-arg=target/${toolchain.target}/${profile}/libsslocal.so") spec.environment("RUSTFLAGS", "-C link-arg=-o -C link-arg=target/${toolchain.target}/$profile/lib${libname}.so")
} }
} }
preBuild.dependsOn "cargoBuild"
def coroutinesVersion = '1.3.3' def coroutinesVersion = '1.3.3'
def roomVersion = '2.2.3' def roomVersion = '2.2.4'
def workVersion = '2.3.1' def workVersion = '2.3.2'
dependencies { dependencies {
api project(':plugin') api project(':plugin')
api 'androidx.fragment:fragment-ktx:1.2.1' api 'androidx.fragment:fragment-ktx:1.2.2'
api "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion" api "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
api "androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion" api "androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion"
api 'androidx.preference:preference:1.1.0' api 'androidx.preference:preference:1.1.0'
...@@ -83,9 +85,9 @@ dependencies { ...@@ -83,9 +85,9 @@ dependencies {
api 'com.crashlytics.sdk.android:crashlytics:2.10.1' api 'com.crashlytics.sdk.android:crashlytics:2.10.1'
api 'com.google.android.gms:play-services-oss-licenses:17.0.0' api 'com.google.android.gms:play-services-oss-licenses:17.0.0'
api 'com.google.code.gson:gson:2.8.6' api 'com.google.code.gson:gson:2.8.6'
api 'com.google.firebase:firebase-analytics:17.2.2' api 'com.google.firebase:firebase-analytics:17.2.3'
api 'com.google.firebase:firebase-config:19.1.1' api 'com.google.firebase:firebase-config:19.1.2'
api 'dnsjava:dnsjava:2.1.9' api 'dnsjava:dnsjava:3.0.0'
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion" api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
api "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion" api "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion"
api 'org.connectbot.jsocks:jsocks:1.0.0' api 'org.connectbot.jsocks:jsocks:1.0.0'
......
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
...@@ -72,7 +72,7 @@ dependencies { ...@@ -72,7 +72,7 @@ dependencies {
implementation 'com.google.zxing:core:3.4.0' implementation 'com.google.zxing:core:3.4.0'
implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.1.0' implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.1.0'
implementation 'com.twofortyfouram:android-plugin-api-for-locale:1.0.4' implementation 'com.twofortyfouram:android-plugin-api-for-locale:1.0.4'
implementation 'me.zhanghai.android.fastscroll:library:1.1.0' implementation 'me.zhanghai.android.fastscroll:library:1.1.1'
implementation 'xyz.belvi.mobilevision:barcodescanner:2.0.3' implementation 'xyz.belvi.mobilevision:barcodescanner:2.0.3'
testImplementation "junit:junit:$junitVersion" testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test:runner:$androidTestVersion" androidTestImplementation "androidx.test:runner:$androidTestVersion"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment