mirror of https://github.com/NekoX-Dev/NekoX.git
Split shadowsocks build
This commit is contained in:
parent
5a2184d411
commit
b3ede707b5
|
@ -127,7 +127,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
./run libs native
|
./run libs native
|
||||||
v2ray:
|
v2ray:
|
||||||
name: Native Build (V2ray)
|
name: Native Build ( V2ray )
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -157,7 +157,7 @@ jobs:
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: ./run libs v2ray
|
run: ./run libs v2ray
|
||||||
shadowsocks:
|
shadowsocks:
|
||||||
name: Native Build (Shadowsocks)
|
name: Native Build ( Shadowsocks )
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -187,7 +187,7 @@ jobs:
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: ./run libs shadowsocks
|
run: ./run libs shadowsocks
|
||||||
shadowsocksr:
|
shadowsocksr:
|
||||||
name: Native Build (ShadowsocksR)
|
name: Native Build ( ShadowsocksR )
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -213,8 +213,8 @@ jobs:
|
||||||
- name: Native Build
|
- name: Native Build
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: ./run libs ssr
|
run: ./run libs ssr
|
||||||
debug:
|
build:
|
||||||
name: Debug Build
|
name: Gradle Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- native
|
- native
|
||||||
|
|
|
@ -40,6 +40,45 @@ configurations {
|
||||||
compile.exclude module: 'support-v4'
|
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 okHttpVersion = '5.0.0-alpha.2'
|
||||||
def fcmVersion = '21.0.1'
|
def fcmVersion = '21.0.1'
|
||||||
def crashlyticsVersion = '17.3.1'
|
def crashlyticsVersion = '17.3.1'
|
||||||
|
@ -101,44 +140,11 @@ dependencies {
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'
|
||||||
|
|
||||||
}
|
if (!targetAbi.isBlank()) {
|
||||||
|
implementation project(":ss-rust")
|
||||||
def keystorePwd = null
|
implementation project(":ssr-libev")
|
||||||
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 {
|
android {
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
source "bin/init/env.sh"
|
source "bin/init/env.sh"
|
||||||
|
|
||||||
[ -f gradlew ] && CMD="./gradlew" || CMD="gradle"
|
./gradlew TMessagesProj:stripFullFossDebugSymbols || exit 1
|
||||||
|
|
||||||
$CMD TMessagesProj:stripFullFossReleaseDebugSymbols || exit 1
|
|
||||||
|
|
||||||
OUT=TMessagesProj/build/intermediates/stripped_native_libs/fullFossRelease/out/lib
|
OUT=TMessagesProj/build/intermediates/stripped_native_libs/fullFossRelease/out/lib
|
||||||
DIR=TMessagesProj/src/main/libs
|
DIR=TMessagesProj/src/main/libs
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
source "bin/init/env.sh"
|
source "bin/init/env.sh"
|
||||||
|
|
||||||
[ -f gradlew ] && CMD="./gradlew" || CMD="gradle"
|
|
||||||
|
|
||||||
git submodule update --init ss-rust/src/main/rust/shadowsocks-rust
|
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
|
cp ss-rust/build/outputs/aar/* TMessagesProj/libs
|
||||||
|
|
|
@ -38,6 +38,13 @@ android {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
productFlavors {
|
||||||
|
flavorDimensions.add("abi")
|
||||||
|
|
||||||
|
create("arm")
|
||||||
|
create("arm64")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cargo {
|
cargo {
|
||||||
|
|
Loading…
Reference in New Issue