2018-06-05 21:51:08 +02:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
|
|
|
|
android {
|
2018-08-09 15:51:58 +02:00
|
|
|
compileSdkVersion 28
|
2018-06-17 23:08:29 +02:00
|
|
|
buildToolsVersion "27.0.3"
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
|
|
|
jni.srcDirs = []
|
|
|
|
jniLibs.srcDirs = ["libs"]
|
|
|
|
aidl.srcDirs = ["src"]
|
|
|
|
java.srcDirs = ["src"]
|
|
|
|
resources.srcDirs = ["src"]
|
|
|
|
res.srcDirs = ["res"]
|
2018-06-27 16:12:32 +02:00
|
|
|
assets.srcDirs = ["assets"]
|
2018-06-17 23:08:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "net.osmand.telegram"
|
|
|
|
minSdkVersion 15
|
|
|
|
targetSdkVersion 27
|
|
|
|
versionCode 1
|
|
|
|
versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode
|
|
|
|
versionName "1.0"
|
|
|
|
versionName System.getenv("APK_VERSION") ? System.getenv("APK_VERSION").toString() : versionName
|
|
|
|
}
|
|
|
|
|
|
|
|
flavorDimensions "abi"
|
|
|
|
|
|
|
|
productFlavors {
|
|
|
|
x86 {
|
|
|
|
dimension "abi"
|
|
|
|
ndk {
|
|
|
|
abiFilter "x86"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
armv7 {
|
|
|
|
dimension "abi"
|
|
|
|
ndk {
|
|
|
|
abiFilter "armeabi-v7a"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
arm64 {
|
|
|
|
dimension "abi"
|
|
|
|
ndk {
|
|
|
|
abiFilter "arm64-v8a"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fat {
|
|
|
|
dimension "abi"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
signingConfigs {
|
|
|
|
development {
|
|
|
|
storeFile file("../keystores/debug.keystore")
|
|
|
|
storePassword "android"
|
|
|
|
keyAlias "androiddebugkey"
|
|
|
|
keyPassword "android"
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
storeFile file("/var/lib/jenkins/osmand_key")
|
|
|
|
storePassword System.getenv("OSMAND_APK_PASSWORD")
|
|
|
|
keyAlias "osmand"
|
|
|
|
keyPassword System.getenv("OSMAND_APK_PASSWORD")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
|
|
|
signingConfig signingConfigs.development
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
}
|
|
|
|
release {
|
|
|
|
signingConfig signingConfigs.publishing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
// use this line to check all rules except those listed
|
|
|
|
disable 'InvalidPackage'
|
2018-10-19 13:25:42 +02:00
|
|
|
disable 'MissingTranslation'
|
2018-06-17 23:08:29 +02:00
|
|
|
}
|
2019-06-11 11:25:24 +02:00
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/proguard/androidx-annotations.pro'
|
|
|
|
}
|
2018-06-05 21:51:08 +02:00
|
|
|
}
|
|
|
|
|
2018-06-05 22:45:25 +02:00
|
|
|
task downloadTdLibzip {
|
2018-06-17 23:08:29 +02:00
|
|
|
doLast {
|
|
|
|
ant.get(src: 'https://core.telegram.org/tdlib/tdlib.zip', dest: 'tdlib.zip', skipexisting: 'true')
|
|
|
|
ant.unzip(src: 'tdlib.zip', dest: 'tdlib/')
|
|
|
|
}
|
2018-06-05 22:45:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task copyNativeLibs(type: Copy) {
|
2018-06-17 23:08:29 +02:00
|
|
|
dependsOn downloadTdLibzip
|
|
|
|
from "tdlib/libtd/src/main/libs"
|
|
|
|
into "libs"
|
2018-06-05 22:45:25 +02:00
|
|
|
}
|
|
|
|
|
2018-06-17 23:08:29 +02:00
|
|
|
task copyJavaSources(type: Copy) {
|
|
|
|
dependsOn downloadTdLibzip
|
|
|
|
from "tdlib/libtd/src/main/java/org/drinkless/td"
|
|
|
|
into "src/org/drinkless/td"
|
2018-06-05 22:45:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task downloadPrebuiltTelegram {
|
2018-06-17 23:08:29 +02:00
|
|
|
dependsOn downloadTdLibzip, copyNativeLibs, copyJavaSources
|
2018-06-05 22:45:25 +02:00
|
|
|
}
|
|
|
|
|
2018-06-27 13:56:45 +02:00
|
|
|
task collectFonts(type: Copy) {
|
|
|
|
from "../../resources/fonts"
|
2018-06-28 11:16:22 +02:00
|
|
|
from "../../resources/fonts-telegram"
|
2018-06-27 13:56:45 +02:00
|
|
|
into "assets/fonts"
|
|
|
|
include "*.ttf"
|
|
|
|
}
|
|
|
|
|
|
|
|
task collectExternalResources {
|
|
|
|
dependsOn collectFonts
|
|
|
|
}
|
2018-06-05 22:45:25 +02:00
|
|
|
|
|
|
|
afterEvaluate {
|
2018-06-17 23:08:29 +02:00
|
|
|
android.applicationVariants.all { variant ->
|
2018-06-27 13:56:45 +02:00
|
|
|
variant.javaCompiler.dependsOn(downloadPrebuiltTelegram, collectExternalResources)
|
2018-06-17 23:08:29 +02:00
|
|
|
variant.preBuild.dependsOn(downloadPrebuiltTelegram)
|
|
|
|
}
|
2018-06-05 22:45:25 +02:00
|
|
|
}
|
|
|
|
|
2018-06-05 21:51:08 +02:00
|
|
|
dependencies {
|
2018-06-17 23:08:29 +02:00
|
|
|
implementation project(path: ':OsmAnd-java', configuration: 'android')
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2019-10-11 09:25:49 +02:00
|
|
|
implementation project(':OsmAnd-api')
|
2018-06-17 23:08:29 +02:00
|
|
|
|
2019-01-25 18:37:32 +01:00
|
|
|
implementation( "org.jetbrains.kotlin:kotlin-stdlib:1.2.71") {
|
2019-01-21 12:13:56 +01:00
|
|
|
exclude group: 'org.jetbrains', module: 'annotations'
|
|
|
|
}
|
2018-08-09 15:51:58 +02:00
|
|
|
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
|
|
|
|
implementation 'com.android.support:design:28.0.0-rc01'
|
|
|
|
implementation 'com.android.support:customtabs:28.0.0-rc01'
|
|
|
|
implementation 'com.android.support:support-annotations:28.0.0-rc01'
|
2018-06-17 23:08:29 +02:00
|
|
|
implementation 'commons-logging:commons-logging-api:1.1'
|
2018-08-09 15:51:58 +02:00
|
|
|
implementation 'com.android.support:recyclerview-v7:28.0.0-rc01'
|
2018-06-17 23:08:29 +02:00
|
|
|
implementation 'com.vividsolutions:jts-core:1.14.0'
|
|
|
|
implementation("com.github.HITGIF:TextFieldBoxes:1.4.4") {
|
|
|
|
exclude group: 'com.android.support'
|
|
|
|
}
|
2019-01-21 12:13:56 +01:00
|
|
|
implementation 'org.jetbrains:annotations-java5:15.0'
|
2019-06-11 11:25:24 +02:00
|
|
|
implementation 'androidx.annotation:annotation:1.1.0'
|
2018-06-05 21:51:08 +02:00
|
|
|
}
|