diff --git a/README.md b/README.md index 6d06c6a93..6ccffa2f2 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,43 @@ https://telegra.ph/google-cloud-trans-key-04-26 ## Compilation Guide +**NOTE: Building on Windows is, unfortunately, not supported. +Consider using a Linux VM or dual booting.** + +**Important:** + +1. Install Android Sdk and NDK ( default location is $HOME/Android/Sdk, otherwise you need to specify $ANDROID_HOME for it ) + +It is recommended to use AndroidStudio to install. + +2. Install golang ( >= 1.15 ), and add GOPATH to the PATH variable. + +It is recommended to use gvm for the installation. if you are using the system package manager, don't forget to add environment variable. + +```shell +apt install -y bison gcc make +bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) +source "$HOME/.bashrc" + +gvm install go1.15 -B +gvm use go1.15 --default +``` + +3. Install rust and its stdlib for android abis, add environment variables for it. + +It is recommended to use the official script, otherwise you may not find rustup. + +```shell +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +echo "source \$HOME/.cargo/env" >> $HOME/.bashrc && source $HOME/.cargo/env +rustup target install armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android +``` + +(One command at a time) + +4. Build native dependencies: `bin/native_libs.sh` +5. Build external libraries and native code: `bin/update_libs.sh` + ### Specify APP_ID and APP_HASH Fill out TELEGRAM_APP_ID and TELEGRAM_APP_HASH in local.properties @@ -140,8 +177,7 @@ Available variant list: `Mini` ( without ss/ssr/v2ray proxies ) `AppleEmoji` -`NotoEmoji` -`FacebookEmoji` +`TwitterEmoji` `NoEmoji` ## Localization diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 6b479af3f..d393d885f 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -1,12 +1,9 @@ -import cn.hutool.core.io.FileUtil -import cn.hutool.json.JSONObject - apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' -def verName = "7.2.1-rc01" -def verCode = 102 +def verName = "7.2.1-rc03" +def verCode = 108 def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json") @@ -32,11 +29,9 @@ void setupPlay(boolean beta) { track = beta ? "beta" : "production" defaultToAppBundles = true - userFraction = 1 } - } configurations { @@ -44,24 +39,10 @@ configurations { } def okHttpVersion = '4.9.0' -def fcmVersion = '20.3.0' +def fcmVersion = '21.0.0' def crashlyticsVersion = '17.2.2' def playCoreVersion = '1.8.3' -buildscript { - - repositories { - jcenter() - mavenCentral() - google() - } - - dependencies { - classpath 'cn.hutool:hutool-all:5.4.7' - } - -} - repositories { jcenter() @@ -116,7 +97,7 @@ dependencies { releaseImplementation "com.google.firebase:firebase-crashlytics:$crashlyticsVersion" releaseImplementation "com.google.android.play:core:$playCoreVersion" - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.0' } @@ -129,7 +110,7 @@ android { defaultConfig { minSdkVersion 16 - //noinspection OldTargetApi + //noinspection ExpiredTargetSdkVersion,OldTargetApi targetSdkVersion 28 versionName verName @@ -258,6 +239,7 @@ android { } release { + isDefault true debuggable false jniDebuggable false minifyEnabled true @@ -327,6 +309,7 @@ android { versionNameSuffix '-mini-twitter-emoji' } full { + isDefault true } fullPlay { versionNameSuffix '-play' diff --git a/build.gradle b/build.gradle index 3b95bb706..fff6da2c4 100644 --- a/build.gradle +++ b/build.gradle @@ -7,12 +7,12 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'com.android.tools.build:gradle:4.0.2' + classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10" classpath 'com.google.gms:google-services:4.3.4' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0' classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3' - classpath 'com.github.triplet.gradle:play-publisher:2.8.0' + classpath 'com.github.triplet.gradle:play-publisher:3.0.0' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 46a5a8ed9..087137a5a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip +distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/openpgp-api/build.gradle b/openpgp-api/build.gradle index 76f1997bf..0fcad802d 100644 --- a/openpgp-api/build.gradle +++ b/openpgp-api/build.gradle @@ -13,5 +13,5 @@ android { lintOptions { abortOnError false } - buildToolsVersion '30.0.1' + buildToolsVersion '30.0.2' } \ No newline at end of file diff --git a/ss-rust/build.gradle.kts b/ss-rust/build.gradle.kts index ce6ecf3c6..6312e112b 100644 --- a/ss-rust/build.gradle.kts +++ b/ss-rust/build.gradle.kts @@ -14,7 +14,7 @@ android { minSdkVersion(21) targetSdkVersion(30) } - buildToolsVersion = "30.0.1" + buildToolsVersion = "30.0.2" } diff --git a/ssr-libev/build.gradle b/ssr-libev/build.gradle index c8ead7008..a8ec2ab7a 100644 --- a/ssr-libev/build.gradle +++ b/ssr-libev/build.gradle @@ -4,7 +4,7 @@ plugins { android { compileSdkVersion 30 - buildToolsVersion '30.0.1' + buildToolsVersion '30.0.2' ndkVersion rootProject.ext.ndkVersion defaultConfig {