OsmAnd/OsmAnd-telegram/build.gradle

132 lines
3.4 KiB
Groovy
Raw Normal View History

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
2018-06-10 18:27:03 +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"]
}
}
defaultConfig {
2018-06-05 23:08:46 +02:00
applicationId "net.osmand.telegram"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
2018-06-05 23:08:46 +02:00
versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode
versionName "1.0"
2018-06-05 23:08:46 +02:00
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"
}
}
2018-06-05 23:24:06 +02:00
arm64 {
dimension "abi"
ndk {
2018-06-05 23:24:06 +02:00
abiFilter "arm64-v8a"
}
}
fat {
dimension "abi"
}
}
2018-06-05 23:10:35 +02:00
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")
}
}
2018-06-05 23:12:24 +02:00
buildTypes {
debug {
signingConfig signingConfigs.development
2018-06-05 23:50:28 +02:00
applicationIdSuffix ".debug"
2018-06-05 23:12:24 +02:00
}
release {
signingConfig signingConfigs.publishing
}
}
lintOptions {
// use this line to check all rules except those listed
disable 'InvalidPackage'
}
}
2018-06-05 22:45:25 +02:00
task downloadTdLibzip {
doLast {
ant.get(src: 'https://core.telegram.org/tdlib/tdlib.zip', dest: 'tdlib.zip', skipexisting: 'true')
ant.unzip(src: 'tdlib.zip', dest: 'tdlib/')
}
}
task copyNativeLibs(type: Copy) {
dependsOn downloadTdLibzip
from "tdlib/libtd/src/main/libs"
into "libs"
}
task copyJavaSources(type: Copy) {
dependsOn downloadTdLibzip
from "tdlib/libtd/src/main/java/org/drinkless/td"
2018-06-10 18:27:03 +02:00
into "src/org/drinkless/td"
2018-06-05 22:45:25 +02:00
}
task downloadPrebuiltTelegram {
dependsOn downloadTdLibzip, copyNativeLibs, copyJavaSources
}
afterEvaluate {
android.applicationVariants.all { variant ->
variant.javaCompiler.dependsOn(downloadPrebuiltTelegram)
variant.preBuild.dependsOn(downloadPrebuiltTelegram)
}
}
dependencies {
implementation project(path: ':OsmAnd-java', configuration: 'android')
implementation fileTree(dir: 'libs', include: ['*.jar'])
2018-06-10 18:27:03 +02:00
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'commons-logging:commons-logging-api:1.1'
2018-06-07 16:44:43 +02:00
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.vividsolutions:jts-core:1.14.0'
}