Skip to content

Commit

Permalink
Update to 4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DrKLO committed Jul 30, 2018
1 parent e9e40cb commit d073b80
Show file tree
Hide file tree
Showing 1,874 changed files with 307,063 additions and 135,993 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[Telegram](https://telegram.org) is a messaging app with a focus on speed and security. It’s superfast, simple and free.
This repo contains the official source code for [Telegram App for Android](https://play.google.com/store/apps/details?id=org.telegram.messenger).

##Creating your Telegram Application
## Creating your Telegram Application

We welcome all developers to use our API and source code to create applications on our platform.
There are several things we require from **all developers** for the moment.
Expand Down
139 changes: 102 additions & 37 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,36 @@ apply plugin: 'com.android.application'

repositories {
mavenCentral()
google()
jcenter()
}

configurations {
compile.exclude module: 'support-v4'
}

dependencies {
compile 'com.google.android.gms:play-services-gcm:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-vision:11.0.4'
compile 'com.google.android.gms:play-services-wallet:11.0.4'
compile 'com.google.android.gms:play-services-wearable:11.0.4'
compile 'com.android.support:support-core-ui:25.3.1'
compile 'com.android.support:support-compat:25.3.1'
compile 'com.android.support:support-core-utils:25.3.1'
compile 'com.android.support:support-v13:25.3.1'
compile 'com.android.support:palette-v7:25.3.1'
compile 'net.hockeyapp.android:HockeySDK:4.1.3'
compile 'com.google.firebase:firebase-messaging:17.1.0'
compile 'com.google.firebase:firebase-config:16.0.0'
compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-vision:15.0.2'
compile 'com.google.android.gms:play-services-wallet:15.0.1'
compile 'com.google.android.gms:play-services-wearable:15.0.1'
implementation 'com.android.support:support-core-ui:27.1.1'
implementation 'com.android.support:support-compat:27.1.1'
implementation 'com.android.support:support-core-utils:27.1.1'
implementation 'com.android.support:support-v13:27.1.1'
implementation 'com.android.support:palette-v7:27.1.1'
implementation 'com.android.support:exifinterface:27.1.1'
compile 'net.hockeyapp.android:HockeySDK:5.1.0'
compile 'com.googlecode.mp4parser:isoparser:1.0.6'
compile 'com.stripe:stripe-android:2.0.2'
}

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
compileSdkVersion 27
buildToolsVersion '27.0.3'


useLibrary 'org.apache.http.legacy'
defaultConfig.applicationId = "org.telegram.messenger"

sourceSets.main.jniLibs.srcDirs = ['./jni/']
Expand All @@ -40,6 +42,11 @@ android {
}
}

lintOptions {
disable 'MissingTranslation'
disable 'ExtraTranslation'
}

dexOptions {
jumboMode = true
}
Expand All @@ -55,15 +62,13 @@ android {
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
v2SigningEnabled false
}

release {
storeFile file("config/release.keystore")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
v2SigningEnabled false
}
}

Expand All @@ -73,13 +78,15 @@ android {
jniDebuggable true
signingConfig signingConfigs.debug
applicationIdSuffix ".beta"
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

release {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
minifyEnabled false
minifyEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
Expand All @@ -91,7 +98,7 @@ android {
}
}

defaultConfig.versionCode = 1155
defaultConfig.versionCode = 1340

sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest.xml'
Expand All @@ -108,21 +115,40 @@ android {
flavorDimensions "minApi"

productFlavors {
armv7 {
ndk {
abiFilters "armeabi-v7a"
}
ext {
abiVersionCode = 1
}
}
x86 {
ndk {
abiFilter "x86"
abiFilters "x86"
}
ext {
abiVersionCode = 2
}
versionCode = 2
}
armv7 {
armv7_SDK23 {
ndk {
abiFilter "armeabi-v7a"
abiFilters "armeabi-v7a"
}
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml'
}
sourceSets.release {
manifest.srcFile 'config/release/AndroidManifest_SDK23.xml'
}
minSdkVersion 23
ext {
abiVersionCode = 3
}
versionCode = 1
}
x86_SDK23 {
ndk {
abiFilter "x86"
abiFilters "x86"
}
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml'
Expand All @@ -131,11 +157,44 @@ android {
manifest.srcFile 'config/release/AndroidManifest_SDK23.xml'
}
minSdkVersion 23
versionCode = 4
ext {
abiVersionCode = 4
}
}
armv7_SDK23 {
arm64 {
ndk {
abiFilter "armeabi-v7a"
abiFilters "arm64-v8a"
}
ext {
abiVersionCode = 5
}
}
x64 {
ndk {
abiFilters "x86_64"
}
ext {
abiVersionCode = 6
}
}
arm64_SDK23 {
ndk {
abiFilters "arm64-v8a"
}
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml'
}
sourceSets.release {
manifest.srcFile 'config/release/AndroidManifest_SDK23.xml'
}
minSdkVersion 23
ext {
abiVersionCode = 7
}
}
x64_SDK23 {
ndk {
abiFilters "x86_64"
}
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml'
Expand All @@ -144,40 +203,46 @@ android {
manifest.srcFile 'config/release/AndroidManifest_SDK23.xml'
}
minSdkVersion 23
versionCode = 3
ext {
abiVersionCode = 8
}
}
fat {
afat {
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml'
}
sourceSets.release {
manifest.srcFile 'config/release/AndroidManifest_SDK23.xml'
}
versionCode = 5
ext {
abiVersionCode = 0
}
}
}

applicationVariants.all { variant ->
variant.outputs.all { output ->
output.processManifest.doLast {
def abiVersion = variant.productFlavors.get(0).versionCode
def abiVersion = variant.productFlavors.get(0).abiVersionCode
String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml"
def manifestContent = file(manifestPath).getText()
manifestContent = manifestContent.replace(String.format('android:versionCode="%d"', abiVersion), String.format('android:versionCode="%s"', defaultConfig.versionCode * 10 + abiVersion))
manifestContent = manifestContent.replace(String.format('android:versionCode="%d"', defaultConfig.versionCode), String.format('android:versionCode="%s"', defaultConfig.versionCode * 10 + abiVersion))
file(manifestPath).write(manifestContent)
}
}
}

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionName "4.6.0"
targetSdkVersion 27
versionName "4.9.0"

vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']

externalNativeBuild {
ndkBuild {
arguments "NDK_APPLICATION_MK:=jni/Application.mk", "APP_PLATFORM:=android-14"
abiFilters "armeabi-v7a", "x86"
arguments "NDK_APPLICATION_MK:=jni/Application.mk", "APP_PLATFORM:=android-16", "-j8"
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}
}
Expand Down
32 changes: 7 additions & 25 deletions TMessagesProj/config/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@

<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE"/>
<uses-permission android:name="org.telegram.messenger.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<permission android:name="org.telegram.messenger.permission.C2D_MESSAGE" android:protectionLevel="signature" />

<application
android:allowBackup="false"
Expand All @@ -27,40 +25,24 @@
android:theme="@style/Theme.TMessages.Start"
android:name=".ApplicationLoader"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true">
android:largeHeap="true"
android:supportsRtl="false"
tools:replace="android:supportsRtl">

<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />

<activity android:name="net.hockeyapp.android.UpdateActivity" />

<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="org.telegram.messenger" />
</intent-filter>
</receiver>
<service
android:name=".GcmPushListenerService"
android:exported="false" >
android:name=".GcmPushListenerService">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".GcmInstanceIDListenerService"
android:exported="false">
android:name=".GcmInstanceIDListenerService">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service
android:name=".GcmRegistrationIntentService"
android:exported="false">
</service>

<uses-library android:name="com.google.android.maps" android:required="false"/>

Expand Down
33 changes: 8 additions & 25 deletions TMessagesProj/config/debug/AndroidManifest_SDK23.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@

<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE"/>
<uses-permission android:name="org.telegram.messenger.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.WRITE_CALL_LOG" />

<permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<permission android:name="org.telegram.messenger.permission.C2D_MESSAGE" android:protectionLevel="signature" />

<application
android:allowBackup="false"
Expand All @@ -30,40 +29,24 @@
android:theme="@style/Theme.TMessages.Start"
android:name=".ApplicationLoader"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true">
android:largeHeap="true"
android:supportsRtl="false"
tools:replace="android:supportsRtl">

<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />

<activity android:name="net.hockeyapp.android.UpdateActivity" />

<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="org.telegram.messenger" />
</intent-filter>
</receiver>
<service
android:name=".GcmPushListenerService"
android:exported="false" >
android:name=".GcmPushListenerService">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".GcmInstanceIDListenerService"
android:exported="false">
android:name=".GcmInstanceIDListenerService">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service
android:name=".GcmRegistrationIntentService"
android:exported="false">
</service>

<uses-library android:name="com.google.android.maps" android:required="false"/>

Expand Down
Loading

0 comments on commit d073b80

Please sign in to comment.