mirror of https://github.com/NekoX-Dev/NekoX.git
Split shadowsocks build
This commit is contained in:
parent
5a2184d411
commit
b3ede707b5
|
@ -213,8 +213,8 @@ jobs:
|
|||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs ssr
|
||||
debug:
|
||||
name: Debug Build
|
||||
build:
|
||||
name: Gradle Build
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- native
|
||||
|
|
|
@ -40,6 +40,45 @@ configurations {
|
|||
compile.exclude module: 'support-v4'
|
||||
}
|
||||
|
||||
|
||||
def keystorePwd = null
|
||||
def alias = null
|
||||
def pwd = null
|
||||
|
||||
Properties properties
|
||||
def base64 = System.getenv("LOCAL_PROPERTIES")
|
||||
if (base64 != null && !base64.isBlank()) {
|
||||
properties = new Properties()
|
||||
properties.load(new ByteArrayInputStream(Base64.decoder.decode(base64)))
|
||||
} else if (project.rootProject.file('local.properties').exists()) {
|
||||
properties = new Properties()
|
||||
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
||||
}
|
||||
|
||||
if (properties != null) {
|
||||
keystorePwd = properties.getProperty("KEYSTORE_PASS")
|
||||
alias = properties.getProperty("ALIAS_NAME")
|
||||
pwd = properties.getProperty("ALIAS_PASS")
|
||||
}
|
||||
|
||||
keystorePwd = keystorePwd ?: System.getenv("KEYSTORE_PASS")
|
||||
alias = alias ?: System.getenv("ALIAS_NAME")
|
||||
pwd = pwd ?: System.getenv("ALIAS_PASS")
|
||||
|
||||
def targetAbi = ""
|
||||
if (!gradle.startParameter.taskNames.isEmpty()) {
|
||||
if (gradle.startParameter.taskNames.size == 1) {
|
||||
def targetTask = gradle.startParameter.taskNames[0].toLowerCase()
|
||||
if (targetTask.contains("arm64")) {
|
||||
targetAbi = "arm64"
|
||||
} else if (targetTask.contains("arm")) {
|
||||
targetAbi = "arm"
|
||||
}
|
||||
} else {
|
||||
targetAbi = "~"
|
||||
}
|
||||
}
|
||||
|
||||
def okHttpVersion = '5.0.0-alpha.2'
|
||||
def fcmVersion = '21.0.1'
|
||||
def crashlyticsVersion = '17.3.1'
|
||||
|
@ -101,44 +140,11 @@ dependencies {
|
|||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'
|
||||
|
||||
if (!targetAbi.isBlank()) {
|
||||
implementation project(":ss-rust")
|
||||
implementation project(":ssr-libev")
|
||||
}
|
||||
|
||||
def keystorePwd = null
|
||||
def alias = null
|
||||
def pwd = null
|
||||
|
||||
Properties properties
|
||||
def base64 = System.getenv("LOCAL_PROPERTIES")
|
||||
if (base64 != null && !base64.isBlank()) {
|
||||
properties = new Properties()
|
||||
properties.load(new ByteArrayInputStream(Base64.decoder.decode(base64)))
|
||||
} else if (project.rootProject.file('local.properties').exists()) {
|
||||
properties = new Properties()
|
||||
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
||||
}
|
||||
|
||||
if (properties != null) {
|
||||
keystorePwd = properties.getProperty("KEYSTORE_PASS")
|
||||
alias = properties.getProperty("ALIAS_NAME")
|
||||
pwd = properties.getProperty("ALIAS_PASS")
|
||||
}
|
||||
|
||||
keystorePwd = keystorePwd ?: System.getenv("KEYSTORE_PASS")
|
||||
alias = alias ?: System.getenv("ALIAS_NAME")
|
||||
pwd = pwd ?: System.getenv("ALIAS_PASS")
|
||||
|
||||
def targetAbi = ""
|
||||
if (!gradle.startParameter.taskNames.isEmpty()) {
|
||||
if (gradle.startParameter.taskNames.size == 1) {
|
||||
def targetTask = gradle.startParameter.taskNames[0].toLowerCase()
|
||||
if (targetTask.contains("arm64")) {
|
||||
targetAbi = "arm64"
|
||||
} else if (targetTask.contains("arm")) {
|
||||
targetAbi = "arm"
|
||||
}
|
||||
} else {
|
||||
targetAbi = "~"
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
[ -f gradlew ] && CMD="./gradlew" || CMD="gradle"
|
||||
|
||||
$CMD TMessagesProj:stripFullFossReleaseDebugSymbols || exit 1
|
||||
./gradlew TMessagesProj:stripFullFossDebugSymbols || exit 1
|
||||
|
||||
OUT=TMessagesProj/build/intermediates/stripped_native_libs/fullFossRelease/out/lib
|
||||
DIR=TMessagesProj/src/main/libs
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
[ -f gradlew ] && CMD="./gradlew" || CMD="gradle"
|
||||
|
||||
git submodule update --init ss-rust/src/main/rust/shadowsocks-rust
|
||||
$CMD ss-rust:assembleRelease || exit 1
|
||||
./gradlew ss-rust:assembleRelease || exit 1
|
||||
cp ss-rust/build/outputs/aar/* TMessagesProj/libs
|
|
@ -38,6 +38,13 @@ android {
|
|||
})
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
flavorDimensions.add("abi")
|
||||
|
||||
create("arm")
|
||||
create("arm64")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cargo {
|
||||
|
|
Loading…
Reference in New Issue