OsmAnd/OsmAnd-telegram/build.gradle

158 lines
3.6 KiB
Groovy
Raw Normal View History

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
2018-06-17 23:08:29 +02:00
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
2019-11-05 12:35:39 +01:00
targetSdkVersion 28
2018-06-17 23:08:29 +02:00
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'
disable 'MissingTranslation'
2018-06-17 23:08:29 +02:00
}
packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro'
}
}
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
}
task collectFonts(type: Copy) {
from "../../resources/fonts"
2018-06-28 11:16:22 +02:00
from "../../resources/fonts-telegram"
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 ->
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
}
dependencies {
2018-06-17 23:08:29 +02:00
implementation project(path: ':OsmAnd-java', configuration: 'android')
implementation fileTree(dir: 'libs', include: ['*.jar'])
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'
}
2020-03-04 13:28:12 +01:00
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
2018-06-17 23:08:29 +02:00
implementation 'commons-logging:commons-logging-api:1.1'
2020-03-04 13:28:12 +01:00
implementation 'com.android.support:recyclerview-v7:28.0.0'
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'
implementation 'androidx.annotation:annotation:1.1.0'
}