123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
- buildscript {
- repositories {
- jcenter()
- mavenCentral()
- google()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- classpath 'org.ajoberstar:grgit:1.1.0'
- // https://github.com/Triple-T/gradle-play-publisher#usage
- classpath 'com.github.triplet.gradle:play-publisher:2.4.1'
- }
- }
- plugins {
- // obtain revision from git
- id 'org.ajoberstar.grgit' version '1.6.0'
- }
- allprojects {
- repositories {
- mavenLocal()
- google()
- jcenter()
- }
- }
- /////////////// yaxim specific build rules ///////////////
- apply plugin: 'com.android.application'
- apply plugin: 'com.github.triplet.play'
- // gradle rule to download sources for AS (because AS can't on its own)
- // run as: `gradle cleanIdea idea`
- apply plugin: 'idea'
- idea {
- module {
- downloadJavadoc = true
- downloadSources = true
- }
- }
- ext {
- build_date = "${new Date().format('yyyy-MM-dd')}"
- build_revision = "${grgit.describe()}"
- build_version = "yaxim ${build_revision} ${build_date}"
- }
- task buildVersion (type: Copy) {
- from("template") {
- include "version.xml"
- expand( build_date: build_date,
- build_revision: build_revision,
- build_version: build_version)
- }
- into("res/values")
- outputs.upToDateWhen {
- false
- }
- }
- android {
- compileSdkVersion 28
- buildToolsVersion "28.0.3"
- useLibrary 'org.apache.http.legacy'
- flavorDimensions ("style", "distribution")
- defaultConfig {
- applicationId "org.yaxim"
- minSdkVersion 14
- //noinspection ExpiredTargetSdkVersion
- targetSdkVersion 28
- versionName "$build_revision"
- vectorDrawables.useSupportLibrary = true
- }
- if (project.hasProperty("RELEASE_KEY_ALIAS")) {
- signingConfigs {
- release {
- storeFile file(RELEASE_STORE_FILE)
- storePassword RELEASE_STORE_PASSWORD
- keyAlias RELEASE_KEY_ALIAS
- keyPassword RELEASE_KEY_PASSWORD
- }
- }
- buildTypes {
- release {
- signingConfig signingConfigs.release
- }
- }
- }
- buildTypes {
- debug {
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
- }
- release {
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
- }
- }
- productFlavors {
- yaxim {
- dimension "style"
- applicationIdSuffix "androidclient"
- }
- bruno {
- dimension "style"
- applicationIdSuffix "bruno"
- }
- play {
- dimension "distribution"
- }
- free {
- dimension "distribution"
- }
- }
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = ['src']
- resources.srcDirs = ['src']
- aidl.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- res.srcDirs = ['res']
- assets.srcDirs = ['assets']
- }
- yaxim {
- java.srcDirs = ['yaxim/src']
- res.srcDirs = ['yaxim/res']
- assets.srcDirs = ['yaxim/assets']
- }
- bruno {
- java.srcDirs = ['bruno/src']
- res.srcDirs = ['bruno/res']
- assets.srcDirs = ['bruno/assets']
- }
- play {
- manifest.srcFile 'play/AndroidManifest.xml'
- java.srcDirs = ['play/src']
- res.srcDirs = ['play/res']
- assets.srcDirs = ['play/assets']
- }
- free {
- java.srcDirs = ['free/src']
- }
- }
- lintOptions {
- disable 'MissingTranslation'
- }
- }
- play {
- serviceAccountCredentials = file('play-publish-credentials.json')
- track = 'beta'
- }
- dependencies {
- def SMACK_VERSION = "4.3.5-SNAPSHOT"
- // Google Push via FCM
- playImplementation('com.google.firebase:firebase-messaging:17.3.4') {
- exclude group: 'com.google.firebase', module: 'firebase-core'
- exclude group: 'com.google.firebase', module: 'firebase-analytics'
- exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
- }
- implementation 'com.android.support:appcompat-v7:28.0.0'
- // implicit compile 'com.android.support:support-v4:25.+'
- implementation project('MemorizingTrustManager')
- api fileTree(include: ['*.jar'], dir: 'libs')
- api fileTree(include: ['*.aar'], dir: 'libs')
- implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
- implementation 'org.hsluv:hsluv:0.2'
- implementation 'com.koushikdutta.urlimageviewhelper:urlimageviewhelper:1.0.4'
- implementation 'com.google.zxing:core:3.3.3'
- // play referrer
- playImplementation 'com.android.installreferrer:installreferrer:1.1'
- // smack4
- //compile project("Smack:smack-android-extensions")
- //compile project("Smack:smack-tcp")
- //compile project("Smack:smack-im")
- //// for Carbons, and other
- //compile project("Smack:smack-experimental")
- implementation 'org.jxmpp:jxmpp-jid:0.6.4-SNAPSHOT'
- implementation "org.igniterealtime.smack:smack-android-extensions:$SMACK_VERSION"
- implementation "org.igniterealtime.smack:smack-tcp:$SMACK_VERSION"
- implementation "org.igniterealtime.smack:smack-im:$SMACK_VERSION"
- // for Carbons, and other
- implementation "org.igniterealtime.smack:smack-experimental:$SMACK_VERSION"
- }
- // for smack4
- configurations {
- all*.exclude group: 'xpp3', module: 'xpp3'
- }
- preBuild.dependsOn buildVersion
- // required to fill applicationId into prefs XML files
- afterEvaluate {
- android.applicationVariants.all { variant ->
- variant.resValue 'string', 'application_id', variant.applicationId
- }
- }
|