mirror of https://github.com/NekoX-Dev/NekoX.git
Update dependencies
This commit is contained in:
parent
12b7f0c239
commit
c247936792
|
@ -21,42 +21,15 @@ jobs:
|
||||||
- name: assembleRelease
|
- name: assembleRelease
|
||||||
run: |
|
run: |
|
||||||
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
||||||
./gradlew TMessagesProj:assembleRelease \
|
|
||||||
TMessagesProj:assembleReleaseNoGcm \
|
|
||||||
TMessagesProj:bundleFullRelease
|
|
||||||
echo ::set-env name=AAB_FILE::$(find TMessagesProj/build/outputs/bundle -name "*.aab")
|
|
||||||
- name: Setup ghr
|
|
||||||
run: |
|
|
||||||
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
|
|
||||||
tar xvzf ghr.tar.gz; rm ghr.tar.gz
|
|
||||||
sudo mv ghr*linux_amd64/ghr /usr/local/bin; rm -rf ghr*linux_amd64
|
|
||||||
- name: Upload apks
|
|
||||||
run: |
|
|
||||||
export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
||||||
mkdir apks; find . -name "*.apk" -exec mv {} apks \;
|
|
||||||
ref="${{ github.ref }}"
|
|
||||||
ref=${ref/"refs/tags/"/}
|
|
||||||
msg="${{ github.event.head_commit.message }}"
|
|
||||||
ghr -delete -n "$ref" -b "$msg" "$ref" apks/
|
|
||||||
rm -rf $HOME/.ssh
|
rm -rf $HOME/.ssh
|
||||||
mkdir -p $HOME/.ssh
|
mkdir -p $HOME/.ssh
|
||||||
echo "${{ secrets.SSH_KEY }}" > $HOME/.ssh/id_rsa
|
echo "${{ secrets.SSH_KEY }}" > $HOME/.ssh/id_rsa
|
||||||
chmod 600 $HOME/.ssh/id_rsa
|
chmod 600 $HOME/.ssh/id_rsa
|
||||||
mv build/update.json apks
|
cat > service_account_credentials.json << EOF
|
||||||
cd apks
|
${{ secrets.GOOGLE_ACCOUNT_SERVICE }}
|
||||||
rm *universal*
|
EOF
|
||||||
xz *.apk
|
ref="${{ github.ref }}"
|
||||||
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
ref=${ref/"refs/tags/"/}
|
||||||
git init
|
./bin/release.sh "$ref"
|
||||||
git config --global user.name "世界"
|
./bin/publish_play.sh
|
||||||
git config --global user.email "i@nekox.me"
|
|
||||||
git remote add origin "git@github.com:NekoX-Dev/Resources.git"
|
|
||||||
git add . --all
|
|
||||||
git commit -m 喵
|
|
||||||
git push origin master -f
|
|
||||||
- uses: r0adkll/upload-google-play@master
|
|
||||||
with:
|
|
||||||
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_ACCOUNT_SERVICE }}
|
|
||||||
packageName: nekox.messenger
|
|
||||||
releaseFile: ${{ env.AAB_FILE }}
|
|
||||||
track: production
|
|
|
@ -10,3 +10,4 @@ local.properties
|
||||||
/TMessagesProj/jni/boringssl/build/
|
/TMessagesProj/jni/boringssl/build/
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
CMakeLists.txt.orig
|
CMakeLists.txt.orig
|
||||||
|
service_account_credentials.json
|
11
README.md
11
README.md
|
@ -9,7 +9,6 @@ NekoX is an open source third-party Telegram android app.
|
||||||
- Chat Group (Persian) : https://t.me/NekogramX_Persian
|
- Chat Group (Persian) : https://t.me/NekogramX_Persian
|
||||||
- FAQ: https://telegra.ph/NekoX-FAQ-03-31
|
- FAQ: https://telegra.ph/NekoX-FAQ-03-31
|
||||||
- FAQ (Chinese): https://telegra.ph/NekoX-%E5%B8%B8%E8%A6%8B%E5%95%8F%E9%A1%8C-03-31
|
- FAQ (Chinese): https://telegra.ph/NekoX-%E5%B8%B8%E8%A6%8B%E5%95%8F%E9%A1%8C-03-31
|
||||||
- [Wall of Shame - Nekogram](https://github.com/Nekogram/Nekogram/wiki/Wall-of-Shame)
|
|
||||||
|
|
||||||
## Telegram-FOSS Changes:
|
## Telegram-FOSS Changes:
|
||||||
|
|
||||||
|
@ -34,7 +33,9 @@ NekoX is an open source third-party Telegram android app.
|
||||||
- Added the ability to parse locations from intents containing a `geo:<lat>,<lon>,<zoom>` string
|
- Added the ability to parse locations from intents containing a `geo:<lat>,<lon>,<zoom>` string
|
||||||
- Force static map previews from Telegram
|
- Force static map previews from Telegram
|
||||||
|
|
||||||
## Nekogram Changes
|
## Old 0penSource Nekogram Changes
|
||||||
|
|
||||||
|
We regret that [Nekogram](https://github.com/Nekogram/Nekogram-issue-tracker) is no longer open source, but uses drklo/master to [disguise open source](https://github.com/Nekogram/Android).
|
||||||
|
|
||||||
- Repeat others' message in one click.
|
- Repeat others' message in one click.
|
||||||
- Save to saved messages in one click.
|
- Save to saved messages in one click.
|
||||||
|
@ -126,7 +127,7 @@ If you don't use NekoX's APP_ID and APP_HASH, you need to register a physical fi
|
||||||
|
|
||||||
OK, a version without firebase cloud messaging and precompiled native libraries, maybe this makes you feel more free, or your phone does not have Google services.
|
OK, a version without firebase cloud messaging and precompiled native libraries, maybe this makes you feel more free, or your phone does not have Google services.
|
||||||
|
|
||||||
To compile the foss version, please refer to [build script](.github/workflows/build.yml).
|
To compile the foss version, please refer to [build script](./update_jni.sh).
|
||||||
|
|
||||||
### Build Variants
|
### Build Variants
|
||||||
|
|
||||||
|
@ -137,13 +138,13 @@ Available variant list:
|
||||||
|
|
||||||
## Localization
|
## Localization
|
||||||
|
|
||||||
Join project at https://nekox.crowdin.com/nekox and https://neko.crowdin.com/ .
|
Join project at https://nekox.crowdin.com/nekox.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Telegram-FOSS: <a href="https://github.com/Telegram-FOSS-Team/Telegram-FOSS/blob/master/LICENSE">GPLv2</a></li>
|
<li>Telegram-FOSS: <a href="https://github.com/Telegram-FOSS-Team/Telegram-FOSS/blob/master/LICENSE">GPLv2</a></li>
|
||||||
<li>Nekogram: <a href="https://github.com/Nekogram/Nekogram/blob/master/LICENSE">GPLv2</a></li>
|
<li><del>Nekogram: <a href="https://github.com/Nekogram/Nekogram/blob/master/LICENSE">GPLv2</a></del> (No longer open source)</li>
|
||||||
<li>v2rayNG: <a href="https://github.com/2dust/v2rayNG/blob/master/LICENSE">GPLv3</a></li>
|
<li>v2rayNG: <a href="https://github.com/2dust/v2rayNG/blob/master/LICENSE">GPLv3</a></li>
|
||||||
<li>AndroidLibV2rayLite: <a href="https://github.com/2dust/AndroidLibV2rayLite/blob/master/LICENSE">LGPLv3</a></li>
|
<li>AndroidLibV2rayLite: <a href="https://github.com/2dust/AndroidLibV2rayLite/blob/master/LICENSE">LGPLv3</a></li>
|
||||||
<li>shadowsocks-android: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a></li>
|
<li>shadowsocks-android: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a></li>
|
||||||
|
|
|
@ -7,13 +7,44 @@ apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
|
|
||||||
|
def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json")
|
||||||
|
|
||||||
|
if (serviceAccountCredentialsFile.isFile()) {
|
||||||
|
|
||||||
|
setupPlay()
|
||||||
|
|
||||||
|
play.serviceAccountCredentials = serviceAccountCredentialsFile
|
||||||
|
|
||||||
|
} else if (System.getenv().containsKey("ANDROID_PUBLISHER_CREDENTIALS")) {
|
||||||
|
|
||||||
|
setupPlay()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupPlay() {
|
||||||
|
|
||||||
|
apply plugin: 'com.github.triplet.play'
|
||||||
|
|
||||||
|
play {
|
||||||
|
|
||||||
|
track = "production"
|
||||||
|
|
||||||
|
defaultToAppBundles = true
|
||||||
|
|
||||||
|
userFraction = 1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
compile.exclude module: 'support-v4'
|
compile.exclude module: 'support-v4'
|
||||||
}
|
}
|
||||||
|
|
||||||
def okHttpVersion = '4.7.2'
|
def okHttpVersion = '4.7.2'
|
||||||
def fcmVersion = '20.2.1'
|
def fcmVersion = '20.2.2'
|
||||||
def crashlyticsVersion = '17.1.0'
|
def crashlyticsVersion = '17.1.1'
|
||||||
def playCoreVersion = '1.7.3'
|
def playCoreVersion = '1.7.3'
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
@ -90,8 +121,8 @@ dependencies {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def verName = "6.2.0.2-preview-1"
|
def verName = "6.2.0.3-rc03"
|
||||||
def verCode = 51
|
def verCode = 56
|
||||||
|
|
||||||
task writeUpdateInfo {
|
task writeUpdateInfo {
|
||||||
|
|
||||||
|
@ -251,44 +282,38 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.main {
|
sourceSets {
|
||||||
|
|
||||||
|
main {
|
||||||
jni.srcDirs = ['./jni/']
|
jni.srcDirs = ['./jni/']
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.debug {
|
debug {
|
||||||
jniLibs.srcDir 'src/main/libs'
|
jniLibs.srcDir 'src/main/libs'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.releaseNoGcm {
|
releaseNoGcm {
|
||||||
jniLibs.srcDir 'src/main/libs'
|
jniLibs.srcDir 'src/main/libs'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.release {
|
release {
|
||||||
jniLibs.srcDir 'src/main/libs'
|
jniLibs.srcDir 'src/main/libs'
|
||||||
manifest.srcFile 'src/gservcies/AndroidManifest.xml'
|
manifest.srcFile 'src/gservcies/AndroidManifest.xml'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.foss {
|
foss {
|
||||||
jni.srcDirs = ['./jni/']
|
jni.srcDirs = ['./jni/']
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "version"
|
}
|
||||||
|
|
||||||
splits {
|
splits.abi {
|
||||||
|
|
||||||
abi {
|
|
||||||
|
|
||||||
enable true
|
enable true
|
||||||
|
|
||||||
reset()
|
|
||||||
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
|
||||||
|
|
||||||
universalApk true
|
universalApk true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def tgVoipDexFileName = "libtgvoip.dex"
|
def tgVoipDexFileName = "libtgvoip.dex"
|
||||||
def tgVoipDexClasses = ["AudioRecordJNI", "AudioTrackJNI", "NativeTgVoipDelegate", "NativeTgVoipInstance", "TgVoipNativeLoader", "Resampler", "VLog"]
|
def tgVoipDexClasses = ["AudioRecordJNI", "AudioTrackJNI", "NativeTgVoipDelegate", "NativeTgVoipInstance", "TgVoipNativeLoader", "Resampler", "VLog"]
|
||||||
def tgVoipDexClassesPath = "org/telegram/messenger/voip"
|
def tgVoipDexClassesPath = "org/telegram/messenger/voip"
|
||||||
|
@ -362,7 +387,7 @@ android {
|
||||||
set.dependencies {
|
set.dependencies {
|
||||||
implementation 'com.vanniktech:emoji-facebook:0.7.0-SNAPSHOT'
|
implementation 'com.vanniktech:emoji-facebook:0.7.0-SNAPSHOT'
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!set.name.contains("NoEmoji")) {
|
||||||
set.assets.srcDirs = ["src/main/assets", "src/emojis/blob"]
|
set.assets.srcDirs = ["src/main/assets", "src/emojis/blob"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,16 @@ cp ssr-libev/build/outputs/aar/* TMessagesProj/libs
|
||||||
|
|
||||||
cd TMessagesProj/libs
|
cd TMessagesProj/libs
|
||||||
|
|
||||||
go get -u github.com/golang/protobuf/protoc-gen-go
|
|
||||||
go get -v golang.org/x/mobile/cmd/...
|
go get -v golang.org/x/mobile/cmd/...
|
||||||
go get -v go.starlark.net/starlark
|
|
||||||
go get -v github.com/refraction-networking/utls
|
v2rayCore="$(go env GOPATH)/src/v2ray.com/core"
|
||||||
go get -v github.com/gorilla/websocket
|
rm -rf "$v2rayCore"
|
||||||
go get -v -insecure v2ray.com/core
|
mkdir -p "$v2rayCore"
|
||||||
go get github.com/2dust/AndroidLibV2rayLite
|
git clone https://github.com/v2fly/v2ray-core.git "$v2rayCore"
|
||||||
|
go get -d github.com/2dust/AndroidLibV2rayLite
|
||||||
|
|
||||||
gomobile init
|
gomobile init
|
||||||
env GO111MODULE=off gomobile bind -v -ldflags='-s -w' github.com/2dust/AndroidLibV2rayLite
|
gomobile bind -v -ldflags='-s -w' github.com/2dust/AndroidLibV2rayLite
|
||||||
rm *-sources.jar
|
rm *-sources.jar
|
||||||
|
|
||||||
cd ../..
|
cd ../..
|
|
@ -55,7 +55,7 @@ export NINJA_PATH="$(command -v ninja)"
|
||||||
|
|
||||||
export PATH=$(echo "$ANDROID_HOME"/cmake/*/bin):$PATH
|
export PATH=$(echo "$ANDROID_HOME"/cmake/*/bin):$PATH
|
||||||
|
|
||||||
cd TMessagesProj/jni
|
cd TMessagesProj/jni || exit 1
|
||||||
|
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
./gradlew TMessagesProj:publishFullBlobEmojiRelease
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ ! -x "$(command -v ghr)" ]; then
|
||||||
|
|
||||||
|
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz &&
|
||||||
|
tar xvzf ghr.tar.gz &&
|
||||||
|
rm ghr.tar.gz &&
|
||||||
|
sudo mv ghr*linux_amd64/ghr /usr/local/bin &&
|
||||||
|
rm -rf ghr*linux_amd64 || exit 1
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf build/apks &&
|
||||||
|
mkdir -p build/apks &&
|
||||||
|
find TMessagesProj/build/outputs/apk -name "*.apk" -exec cp {} build/apks \; &&
|
||||||
|
ghr -delete -n "$1" "$1" build/apks/
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
rm -rf build/apks &&
|
||||||
|
mkdir -p build/apks &&
|
||||||
|
find TMessagesProj/build/outputs/apk -name "*.apk" -exec cp {} build/apks \; &&
|
||||||
|
cp build/update.json build/apks &&
|
||||||
|
cd build/apks &&
|
||||||
|
rm *universal* &&
|
||||||
|
xz *.apk &&
|
||||||
|
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" &&
|
||||||
|
git init &&
|
||||||
|
git config --global user.name "世界" &&
|
||||||
|
git config --global user.email "i@nekox.me" &&
|
||||||
|
git remote add origin "git@github.com:NekoX-Dev/Resources.git" &&
|
||||||
|
git add . --all &&
|
||||||
|
git commit -m "Update" &&
|
||||||
|
git push origin master -f &&
|
||||||
|
rm -rf build/apks
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function assemble() {
|
||||||
|
|
||||||
|
./gradlew TMessagesProj:assembleFullRelease \
|
||||||
|
TMessagesProj:assembleFullReleaseNoGcm \
|
||||||
|
TMessagesProj:assembleMiniRelease \
|
||||||
|
TMessagesProj:assembleMiniReleaseNoGcm \
|
||||||
|
TMessagesProj:assembleMiniNoEmojiRelease \
|
||||||
|
TMessagesProj:assembleMiniNoEmojiReleaseNoGcm
|
||||||
|
|
||||||
|
return $?
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#./gradlew TMessagesProj:assembleRelease \
|
||||||
|
# TMessagesProj:assembleReleaseNoGcm
|
||||||
|
|
||||||
|
assemble &&
|
||||||
|
assemble &&
|
||||||
|
./bin/publish_repo_apks.sh &&
|
||||||
|
./bin/publish_release_apks.sh "$1"
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
git tag "$1" -f &&
|
||||||
|
git push origin "$1" -f
|
|
@ -12,6 +12,7 @@ buildscript {
|
||||||
classpath 'com.google.gms:google-services:4.3.3'
|
classpath 'com.google.gms:google-services:4.3.3'
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
|
||||||
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3'
|
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3'
|
||||||
|
classpath 'com.github.triplet.gradle:play-publisher:2.8.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
#Fri Jul 10 12:31:49 UTC 2020
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
git tag "$1" -f
|
|
||||||
git push origin "$1" -f
|
|
Loading…
Reference in New Issue