mirror of https://github.com/NekoX-Dev/NekoX.git
Refine action build
This commit is contained in:
parent
8b0a6ba576
commit
3b39eed879
|
@ -76,6 +76,13 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
- boringssl
|
- boringssl
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
flavor:
|
||||||
|
- armeabi-v7a
|
||||||
|
- arm64-v8a
|
||||||
|
- x86
|
||||||
|
- x86_64
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -89,7 +96,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
TMessagesProj/src/main/libs
|
TMessagesProj/src/main/libs
|
||||||
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-${{ matrix.flavor }}
|
||||||
- name: Checkout Library
|
- name: Checkout Library
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
@ -125,6 +132,7 @@ jobs:
|
||||||
- name: Native Build
|
- name: Native Build
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
export NATIVE_TARGET="${{ matrix.flavor }}"
|
||||||
./run libs native
|
./run libs native
|
||||||
v2ray:
|
v2ray:
|
||||||
name: Native Build (V2ray)
|
name: Native Build (V2ray)
|
||||||
|
@ -246,13 +254,30 @@ jobs:
|
||||||
git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
|
git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
|
||||||
git submodule status 'ssr-libev/*' > shadowsocksr_status
|
git submodule status 'ssr-libev/*' > shadowsocksr_status
|
||||||
git submodule status v2ray > v2ray_status
|
git submodule status v2ray > v2ray_status
|
||||||
- name: Native Cache
|
- name: Native Cache (armeabi-v7a)
|
||||||
id: cache
|
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
TMessagesProj/src/main/libs
|
TMessagesProj/src/main/libs
|
||||||
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a
|
||||||
|
- name: Native Cache (arm64-v8a)
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
TMessagesProj/src/main/libs
|
||||||
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a
|
||||||
|
- name: Native Cache (x86)
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
TMessagesProj/src/main/libs
|
||||||
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86
|
||||||
|
- name: Native Cache (x86_64)
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
TMessagesProj/src/main/libs
|
||||||
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86_64
|
||||||
- name: V2ray Cache
|
- name: V2ray Cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
@ -287,27 +312,27 @@ jobs:
|
||||||
export DEBUG_BUILD=true
|
export DEBUG_BUILD=true
|
||||||
./gradlew TMessagesProj:assemble${{ matrix.flavor }}
|
./gradlew TMessagesProj:assemble${{ matrix.flavor }}
|
||||||
|
|
||||||
echo "APK_FILE=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')" >> $GITHUB_ENV
|
# echo "APK_FILE=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')" >> $GITHUB_ENV
|
||||||
echo "APK_FILE_ARMV7=$(find TMessagesProj/build/outputs/apk -name '*armeabi*.apk')" >> $GITHUB_ENV
|
# echo "APK_FILE_ARMV7=$(find TMessagesProj/build/outputs/apk -name '*armeabi*.apk')" >> $GITHUB_ENV
|
||||||
echo "APK_FILE_X86=$(find TMessagesProj/build/outputs/apk -name '*x86-*.apk')" >> $GITHUB_ENV
|
# echo "APK_FILE_X86=$(find TMessagesProj/build/outputs/apk -name '*x86-*.apk')" >> $GITHUB_ENV
|
||||||
echo "APK_FILE_X64=$(find TMessagesProj/build/outputs/apk -name '*x86_64*.apk')" >> $GITHUB_ENV
|
# echo "APK_FILE_X64=$(find TMessagesProj/build/outputs/apk -name '*x86_64*.apk')" >> $GITHUB_ENV
|
||||||
- uses: actions/upload-artifact@v2
|
# - uses: actions/upload-artifact@v2
|
||||||
name: Upload apk (arm64-v8a)
|
# name: Upload apk (arm64-v8a)
|
||||||
with:
|
# with:
|
||||||
name: NekoX-${{ matrix.flavor }}-arm64-v8a
|
# name: NekoX-${{ matrix.flavor }}-arm64-v8a
|
||||||
path: ${{ env.APK_FILE }}
|
# path: ${{ env.APK_FILE }}
|
||||||
- uses: actions/upload-artifact@v2
|
# - uses: actions/upload-artifact@v2
|
||||||
name: Upload apk (armeabi-v7a)
|
# name: Upload apk (armeabi-v7a)
|
||||||
with:
|
# with:
|
||||||
name: NekoX-${{ matrix.flavor }}-armeabi-v7a
|
# name: NekoX-${{ matrix.flavor }}-armeabi-v7a
|
||||||
path: ${{ env.APK_FILE_ARMV7 }}
|
# path: ${{ env.APK_FILE_ARMV7 }}
|
||||||
- uses: actions/upload-artifact@v2
|
# - uses: actions/upload-artifact@v2
|
||||||
name: Upload apk (x86_64)
|
# name: Upload apk (x86_64)
|
||||||
with:
|
# with:
|
||||||
name: NekoX-${{ matrix.flavor }}-x86_64
|
# name: NekoX-${{ matrix.flavor }}-x86_64
|
||||||
path: ${{ env.APK_FILE_X64 }}
|
# path: ${{ env.APK_FILE_X64 }}
|
||||||
- uses: actions/upload-artifact@v2
|
# - uses: actions/upload-artifact@v2
|
||||||
name: Upload apk (x86)
|
# name: Upload apk (x86)
|
||||||
with:
|
# with:
|
||||||
name: NekoX-${{ matrix.flavor }}-x86
|
# name: NekoX-${{ matrix.flavor }}-x86
|
||||||
path: ${{ env.APK_FILE_X86 }}
|
# path: ${{ env.APK_FILE_X86 }}
|
|
@ -90,6 +90,13 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
- boringssl
|
- boringssl
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
flavor:
|
||||||
|
- armeabi-v7a
|
||||||
|
- arm64-v8a
|
||||||
|
- x86
|
||||||
|
- x86_64
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -103,7 +110,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
TMessagesProj/src/main/libs
|
TMessagesProj/src/main/libs
|
||||||
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-${{ matrix.flavor }}
|
||||||
- name: Checkout Library
|
- name: Checkout Library
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
@ -139,6 +146,7 @@ jobs:
|
||||||
- name: Native Build
|
- name: Native Build
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
export NATIVE_TARGET="${{ matrix.flavor }}"
|
||||||
./run libs native
|
./run libs native
|
||||||
v2ray:
|
v2ray:
|
||||||
name: Native Build (V2ray)
|
name: Native Build (V2ray)
|
||||||
|
@ -263,12 +271,30 @@ jobs:
|
||||||
git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
|
git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
|
||||||
git submodule status 'ssr-libev/*' > shadowsocksr_status
|
git submodule status 'ssr-libev/*' > shadowsocksr_status
|
||||||
git submodule status v2ray > v2ray_status
|
git submodule status v2ray > v2ray_status
|
||||||
- name: Native Cache
|
- name: Native Cache (armeabi-v7a)
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
TMessagesProj/src/main/libs
|
TMessagesProj/src/main/libs
|
||||||
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a
|
||||||
|
- name: Native Cache (arm64-v8a)
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
TMessagesProj/src/main/libs
|
||||||
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a
|
||||||
|
- name: Native Cache (x86)
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
TMessagesProj/src/main/libs
|
||||||
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86
|
||||||
|
- name: Native Cache (x86_64)
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
TMessagesProj/src/main/libs
|
||||||
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86_64
|
||||||
- name: V2ray Cache
|
- name: V2ray Cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import cn.hutool.core.util.RuntimeUtil
|
import cn.hutool.core.util.RuntimeUtil
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: "com.android.application"
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: "kotlin-android"
|
||||||
|
|
||||||
def verName = "7.6.0-1"
|
def verName = "7.6.0-2"
|
||||||
def verCode = 200 + 3 * 20
|
def verCode = 200 + 3 * 21
|
||||||
|
|
||||||
if (System.getenv("DEBUG_BUILD") == "true") {
|
if (System.getenv("DEBUG_BUILD") == "true") {
|
||||||
verName += "-" + RuntimeUtil.execForStr("git log --pretty=format:'%h' -n 1)")
|
verName += "-" + RuntimeUtil.execForStr("git log --pretty=format:'%h' -n 1)")
|
||||||
|
@ -25,7 +25,7 @@ if (serviceAccountCredentialsFile.isFile()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupPlay(boolean beta) {
|
void setupPlay(boolean beta) {
|
||||||
apply plugin: 'com.github.triplet.play'
|
apply plugin: "com.github.triplet.play"
|
||||||
play {
|
play {
|
||||||
track = beta ? "beta" : "production"
|
track = beta ? "beta" : "production"
|
||||||
defaultToAppBundles = true
|
defaultToAppBundles = true
|
||||||
|
@ -33,7 +33,7 @@ void setupPlay(boolean beta) {
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
compile.exclude module: 'support-v4'
|
compile.exclude module: "support-v4"
|
||||||
}
|
}
|
||||||
|
|
||||||
def keystorePwd = null
|
def keystorePwd = null
|
||||||
|
@ -45,9 +45,9 @@ def base64 = System.getenv("LOCAL_PROPERTIES")
|
||||||
if (base64 != null && !base64.isBlank()) {
|
if (base64 != null && !base64.isBlank()) {
|
||||||
properties = new Properties()
|
properties = new Properties()
|
||||||
properties.load(new ByteArrayInputStream(Base64.decoder.decode(base64)))
|
properties.load(new ByteArrayInputStream(Base64.decoder.decode(base64)))
|
||||||
} else if (project.rootProject.file('local.properties').exists()) {
|
} else if (project.rootProject.file("local.properties").exists()) {
|
||||||
properties = new Properties()
|
properties = new Properties()
|
||||||
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
properties.load(project.rootProject.file("local.properties").newDataInputStream())
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties != null) {
|
if (properties != null) {
|
||||||
|
@ -73,9 +73,12 @@ if (!gradle.startParameter.taskNames.isEmpty()) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def nativeTarget = System.getenv("NATIVE_TARGET")
|
||||||
|
if (nativeTarget == null) nativeTarget = ""
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion 30
|
||||||
buildToolsVersion '30.0.3'
|
buildToolsVersion "30.0.3"
|
||||||
ndkVersion rootProject.ext.ndkVersion
|
ndkVersion rootProject.ext.ndkVersion
|
||||||
|
|
||||||
defaultConfig.applicationId = "nekox.messenger"
|
defaultConfig.applicationId = "nekox.messenger"
|
||||||
|
@ -88,11 +91,15 @@ android {
|
||||||
universalApk false
|
universalApk false
|
||||||
|
|
||||||
if (!targetAbi.isBlank()) {
|
if (!targetAbi.isBlank()) {
|
||||||
|
reset()
|
||||||
if (targetAbi == "arm64") {
|
if (targetAbi == "arm64") {
|
||||||
exclude 'x86', 'x86_64', 'armeabi-v7a'
|
include "arm64-v8a"
|
||||||
} else if (targetAbi == "arm") {
|
} else if (targetAbi == "arm") {
|
||||||
exclude 'x86', 'x86_64', 'arm64-v8a'
|
include "armeabi-v7a"
|
||||||
}
|
}
|
||||||
|
} else if (!nativeTarget.isBlank()) {
|
||||||
|
reset()
|
||||||
|
include nativeTarget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,15 +124,15 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
buildConfigField 'String', 'OFFICIAL_VERSION', "\"" + officialVer + "\""
|
buildConfigField "String", "OFFICIAL_VERSION", "\"" + officialVer + "\""
|
||||||
buildConfigField 'int', 'OFFICIAL_VERSION_CODE', officialCode + ""
|
buildConfigField "int", "OFFICIAL_VERSION_CODE", officialCode + ""
|
||||||
buildConfigField 'int', 'APP_ID', appId
|
buildConfigField "int", "APP_ID", appId
|
||||||
buildConfigField 'String', 'APP_HASH', "\"" + appHash + "\""
|
buildConfigField "String", "APP_HASH", "\"" + appHash + "\""
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
version '3.10.2'
|
version "3.10.2"
|
||||||
arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-16', "-j=${Runtime.getRuntime().availableProcessors()}"
|
arguments "-DANDROID_STL=c++_static", "-DANDROID_PLATFORM=android-16", "-j=${Runtime.getRuntime().availableProcessors()}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,23 +146,23 @@ android {
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
path 'jni/CMakeLists.txt'
|
path "jni/CMakeLists.txt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
disable 'MissingTranslation'
|
disable "MissingTranslation"
|
||||||
disable 'ExtraTranslation'
|
disable "ExtraTranslation"
|
||||||
disable 'BlockedPrivateApi'
|
disable "BlockedPrivateApi"
|
||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
|
|
||||||
exclude '/fabric/**'
|
exclude "/fabric/**"
|
||||||
exclude '/META-INF/*.version'
|
exclude "/META-INF/*.version"
|
||||||
exclude '/META-INF/*.kotlin_module'
|
exclude "/META-INF/*.kotlin_module"
|
||||||
exclude '/builddef.lst'
|
exclude "/builddef.lst"
|
||||||
exclude '/*.txt'
|
exclude "/*.txt"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +187,7 @@ android {
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
storeFile project.file('release.keystore')
|
storeFile project.file("release.keystore")
|
||||||
storePassword keystorePwd
|
storePassword keystorePwd
|
||||||
keyAlias alias
|
keyAlias alias
|
||||||
keyPassword pwd
|
keyPassword pwd
|
||||||
|
@ -204,8 +211,8 @@ android {
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
zipAlignEnabled true
|
zipAlignEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||||
matchingFallbacks = ['release', 'debug']
|
matchingFallbacks = ["release", "debug"]
|
||||||
signingConfig keystorePwd == null ? signingConfigs.debug : signingConfigs.release
|
signingConfig keystorePwd == null ? signingConfigs.debug : signingConfigs.release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,8 +223,8 @@ android {
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
zipAlignEnabled true
|
zipAlignEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||||
matchingFallbacks = ['release', 'debug']
|
matchingFallbacks = ["release", "debug"]
|
||||||
signingConfig keystorePwd == null ? signingConfigs.debug : signingConfigs.release
|
signingConfig keystorePwd == null ? signingConfigs.debug : signingConfigs.release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,18 +235,18 @@ android {
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
zipAlignEnabled true
|
zipAlignEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||||
matchingFallbacks = ['release', 'debug']
|
matchingFallbacks = ["release", "debug"]
|
||||||
}
|
}
|
||||||
|
|
||||||
fdroidArmRelease {
|
fdroidArmRelease {
|
||||||
initWith foss
|
initWith foss
|
||||||
matchingFallbacks = ['release', 'debug']
|
matchingFallbacks = ["release", "debug"]
|
||||||
}
|
}
|
||||||
|
|
||||||
fdroidArm64Release {
|
fdroidArm64Release {
|
||||||
initWith foss
|
initWith foss
|
||||||
matchingFallbacks = ['release', 'debug']
|
matchingFallbacks = ["release", "debug"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,49 +260,49 @@ android {
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
java {
|
java {
|
||||||
srcDirs 'src/main/java', 'src/gservcies/java'
|
srcDirs "src/main/java", "src/gservcies/java"
|
||||||
}
|
}
|
||||||
jniLibs {
|
jniLibs {
|
||||||
srcDir 'src/main/libs'
|
srcDir "src/main/libs"
|
||||||
}
|
}
|
||||||
manifest {
|
manifest {
|
||||||
srcFile 'src/gservcies/AndroidManifest.xml'
|
srcFile "src/gservcies/AndroidManifest.xml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
releaseNoGcm {
|
releaseNoGcm {
|
||||||
jniLibs {
|
jniLibs {
|
||||||
srcDir 'src/main/libs'
|
srcDir "src/main/libs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
java {
|
java {
|
||||||
srcDirs 'src/main/java', 'src/gservcies/java'
|
srcDirs "src/main/java", "src/gservcies/java"
|
||||||
}
|
}
|
||||||
jniLibs {
|
jniLibs {
|
||||||
srcDir 'src/main/libs'
|
srcDir "src/main/libs"
|
||||||
}
|
}
|
||||||
manifest {
|
manifest {
|
||||||
srcFile 'src/gservcies/AndroidManifest.xml'
|
srcFile "src/gservcies/AndroidManifest.xml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foss {
|
foss {
|
||||||
jni {
|
jni {
|
||||||
srcDirs = ['./jni/']
|
srcDirs = ["./jni/"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fdroidArmRelease {
|
fdroidArmRelease {
|
||||||
jni {
|
jni {
|
||||||
srcDirs = ['./jni/']
|
srcDirs = ["./jni/"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fdroidArm64Release {
|
fdroidArm64Release {
|
||||||
jni {
|
jni {
|
||||||
srcDirs = ['./jni/']
|
srcDirs = ["./jni/"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +321,7 @@ android {
|
||||||
fullAppleEmoji {
|
fullAppleEmoji {
|
||||||
}
|
}
|
||||||
fullPlay {
|
fullPlay {
|
||||||
versionNameSuffix '-play'
|
versionNameSuffix "-play"
|
||||||
versionCode verCode - 2
|
versionCode verCode - 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,7 +344,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.all { task ->
|
tasks.all { task ->
|
||||||
if (((task.name.endsWith('Ndk') || task.name.startsWith('generateJsonModel') || task.name.startsWith('externalNativeBuild'))) && !(task.name.contains("Foss") || task.name.contains("Fdroid"))) {
|
if (((task.name.endsWith("Ndk") || task.name.startsWith("generateJsonModel") || task.name.startsWith("externalNativeBuild"))) && !(task.name.contains("Foss") || task.name.contains("Fdroid"))) {
|
||||||
task.enabled = false
|
task.enabled = false
|
||||||
}
|
}
|
||||||
if (task.name.contains("uploadCrashlyticsMappingFile")) {
|
if (task.name.contains("uploadCrashlyticsMappingFile")) {
|
||||||
|
@ -353,46 +360,46 @@ android {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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.4.1'
|
def crashlyticsVersion = "17.4.1"
|
||||||
def playCoreVersion = '1.10.0'
|
def playCoreVersion = "1.10.0"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation "androidx.browser:browser:1.3.0"
|
implementation "androidx.browser:browser:1.3.0"
|
||||||
implementation 'androidx.core:core-ktx:1.6.0-alpha01'
|
implementation "androidx.core:core-ktx:1.6.0-alpha01"
|
||||||
implementation 'androidx.palette:palette-ktx:1.0.0'
|
implementation "androidx.palette:palette-ktx:1.0.0"
|
||||||
implementation 'androidx.viewpager:viewpager:1.0.0'
|
implementation "androidx.viewpager:viewpager:1.0.0"
|
||||||
implementation 'androidx.exifinterface:exifinterface:1.3.2'
|
implementation "androidx.exifinterface:exifinterface:1.3.2"
|
||||||
implementation "androidx.interpolator:interpolator:1.0.0"
|
implementation "androidx.interpolator:interpolator:1.0.0"
|
||||||
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
|
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation "androidx.multidex:multidex:2.0.1"
|
||||||
implementation 'androidx.sharetarget:sharetarget:1.1.0'
|
implementation "androidx.sharetarget:sharetarget:1.1.0"
|
||||||
|
|
||||||
compileOnly 'org.checkerframework:checker-qual:3.11.0'
|
compileOnly "org.checkerframework:checker-qual:3.11.0"
|
||||||
compileOnly 'org.checkerframework:checker-compat-qual:2.5.5'
|
compileOnly "org.checkerframework:checker-compat-qual:2.5.5"
|
||||||
|
|
||||||
// don't change this :)
|
// don"t change this :)
|
||||||
//noinspection GradleDependency
|
//noinspection GradleDependency
|
||||||
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
|
implementation "com.googlecode.mp4parser:isoparser:1.0.6"
|
||||||
|
|
||||||
implementation 'com.google.code.gson:gson:2.8.6'
|
implementation "com.google.code.gson:gson:2.8.6"
|
||||||
implementation 'org.osmdroid:osmdroid-android:6.1.10'
|
implementation "org.osmdroid:osmdroid-android:6.1.10"
|
||||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32'
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32"
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3'
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3"
|
||||||
|
|
||||||
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
|
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
|
||||||
implementation 'dnsjava:dnsjava:3.3.1'
|
implementation "dnsjava:dnsjava:3.3.1"
|
||||||
implementation 'org.dizitart:nitrite:3.4.3'
|
implementation "org.dizitart:nitrite:3.4.3"
|
||||||
|
|
||||||
implementation 'cn.hutool:hutool-core:5.6.2'
|
implementation "cn.hutool:hutool-core:5.6.2"
|
||||||
implementation 'cn.hutool:hutool-crypto:5.6.2'
|
implementation "cn.hutool:hutool-crypto:5.6.2"
|
||||||
implementation 'cn.hutool:hutool-http:5.6.2'
|
implementation "cn.hutool:hutool-http:5.6.2"
|
||||||
implementation 'com.jakewharton:process-phoenix:2.0.0'
|
implementation "com.jakewharton:process-phoenix:2.0.0"
|
||||||
|
|
||||||
compileOnly 'org.yaml:snakeyaml:1.28'
|
compileOnly "org.yaml:snakeyaml:1.28"
|
||||||
fullImplementation 'org.yaml:snakeyaml:1.28'
|
fullImplementation "org.yaml:snakeyaml:1.28"
|
||||||
|
|
||||||
implementation project(":openpgp-api")
|
implementation project(":openpgp-api")
|
||||||
|
|
||||||
|
@ -409,11 +416,11 @@ dependencies {
|
||||||
releaseImplementation "com.google.firebase:firebase-crashlytics:$crashlyticsVersion"
|
releaseImplementation "com.google.firebase:firebase-crashlytics:$crashlyticsVersion"
|
||||||
releaseImplementation "com.google.android.play:core:$playCoreVersion"
|
releaseImplementation "com.google.android.play:core:$playCoreVersion"
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation "junit:junit:4.13.2"
|
||||||
testImplementation 'androidx.test:core:1.3.0'
|
testImplementation "androidx.test:core:1.3.0"
|
||||||
testImplementation 'org.robolectric:robolectric:4.5.1'
|
testImplementation "org.robolectric:robolectric:4.5.1"
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
||||||
|
|
||||||
if (!targetAbi.isBlank()) {
|
if (!targetAbi.isBlank()) {
|
||||||
implementation project(":ss-rust")
|
implementation project(":ss-rust")
|
||||||
|
@ -422,17 +429,17 @@ dependencies {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: "com.google.gms.google-services"
|
||||||
apply plugin: 'com.google.firebase.crashlytics'
|
apply plugin: "com.google.firebase.crashlytics"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
tasks.all { task ->
|
tasks.all { task ->
|
||||||
if (task.name.startsWith('uploadCrashlyticsMappingFile')) {
|
if (task.name.startsWith("uploadCrashlyticsMappingFile")) {
|
||||||
task.enabled = false
|
task.enabled = false
|
||||||
} else if (task.name.contains('Crashlytics') && task.name.contains("NoGcm")) {
|
} else if (task.name.contains("Crashlytics") && task.name.contains("NoGcm")) {
|
||||||
task.enabled = false
|
task.enabled = false
|
||||||
} else if (task.name.endsWith('GoogleServices') && task.name.contains("NoGcm")) {
|
} else if (task.name.endsWith("GoogleServices") && task.name.contains("NoGcm")) {
|
||||||
task.enabled = false
|
task.enabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,19 +2,24 @@
|
||||||
|
|
||||||
source "bin/init/env.sh"
|
source "bin/init/env.sh"
|
||||||
|
|
||||||
./gradlew TMessagesProj:stripFullFossDebugSymbols || exit 1
|
OUT=TMessagesProj/build/intermediates/stripped_native_libs/miniFoss/out/lib
|
||||||
|
|
||||||
OUT=TMessagesProj/build/intermediates/stripped_native_libs/fullFoss/out/lib
|
|
||||||
DIR=TMessagesProj/src/main/libs
|
DIR=TMessagesProj/src/main/libs
|
||||||
rm -rf $DIR/armeabi-v7a
|
|
||||||
mkdir -p $DIR/armeabi-v7a
|
./gradlew TMessagesProj:stripMiniFossDebugSymbols || exit 1
|
||||||
cp $OUT/armeabi-v7a/libtmessages*.so $DIR/armeabi-v7a
|
|
||||||
rm -rf $DIR/arm64-v8a
|
function install() {
|
||||||
mkdir -p $DIR/arm64-v8a
|
local ABI="$1"
|
||||||
cp $OUT/arm64-v8a/libtmessages*.so $DIR/arm64-v8a
|
if [ ! -f $OUT/$ABI/libtmessages*.so ]; then
|
||||||
rm -rf $DIR/x86
|
echo ">> Skip $ABI"
|
||||||
mkdir -p $DIR/x86
|
return 0
|
||||||
cp $OUT/x86/libtmessages*.so $DIR/x86
|
fi
|
||||||
rm -rf $DIR/x86_64
|
rm -rf $DIR/$ABI
|
||||||
mkdir -p $DIR/x86_64
|
mkdir -p $DIR/$ABI
|
||||||
cp $OUT/x86_64/libtmessages*.so $DIR/x86_64
|
cp $OUT/$ABI/libtmessages*.so $DIR/$ABI
|
||||||
|
echo ">> Install $DIR/$ABI/$(ls $DIR/$ABI)"
|
||||||
|
}
|
||||||
|
|
||||||
|
install armeabi-v7a
|
||||||
|
install arm64-v8a
|
||||||
|
install x86
|
||||||
|
install x86_64
|
|
@ -28,10 +28,11 @@ android {
|
||||||
}
|
}
|
||||||
buildToolsVersion = "30.0.3"
|
buildToolsVersion = "30.0.3"
|
||||||
|
|
||||||
if (targetAbi.isNotBlank()) {
|
if (targetAbi.isNotBlank()) splits.abi {
|
||||||
splits.abi.exclude(* when (targetAbi) {
|
reset()
|
||||||
"arm" -> arrayOf("x86", "x86_64", "arm64-v8a")
|
include(* when (targetAbi) {
|
||||||
"arm64" -> arrayOf("x86", "x86_64", "armeabi-v7a")
|
"arm" -> arrayOf("armeabi-v7a")
|
||||||
|
"arm64" -> arrayOf("arm64-v8a")
|
||||||
else -> arrayOf("x86", "x86_64")
|
else -> arrayOf("x86", "x86_64")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue