2019-03-27 21:24:47 +01:00
|
|
|
apply plugin: 'com.android.application'
|
2019-03-28 01:14:55 +01:00
|
|
|
apply plugin: 'checkstyle'
|
2019-03-27 21:24:47 +01:00
|
|
|
|
|
|
|
android {
|
2019-05-04 00:27:02 +02:00
|
|
|
compileSdkVersion 28
|
2019-03-27 21:24:47 +01:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.olomono.messenger"
|
|
|
|
minSdkVersion 19
|
2019-05-04 00:27:02 +02:00
|
|
|
targetSdkVersion 28
|
2019-03-27 21:24:47 +01:00
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
2019-04-14 18:11:29 +02:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2019-05-04 00:27:02 +02:00
|
|
|
multiDexEnabled true
|
2019-03-27 21:24:47 +01:00
|
|
|
}
|
2019-05-04 00:27:02 +02:00
|
|
|
|
2019-03-27 21:24:47 +01:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
disable 'GoogleAppIndexingWarning', 'AllowBackup'
|
|
|
|
// Warn about invalid packages instead of failing
|
|
|
|
warning 'InvalidPackage'
|
|
|
|
}
|
2019-04-05 00:38:01 +02:00
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility 1.8
|
|
|
|
targetCompatibility 1.8
|
|
|
|
}
|
2019-05-04 00:27:02 +02:00
|
|
|
|
|
|
|
dataBinding {
|
|
|
|
enabled true
|
|
|
|
}
|
2019-03-27 21:24:47 +01:00
|
|
|
}
|
|
|
|
|
2019-03-28 01:37:09 +01:00
|
|
|
checkstyle {
|
|
|
|
toolVersion = '8.17'
|
2019-03-28 01:14:55 +01:00
|
|
|
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
|
2019-03-28 01:37:09 +01:00
|
|
|
}
|
2019-03-28 01:14:55 +01:00
|
|
|
|
2019-03-28 01:37:09 +01:00
|
|
|
task checkstyleMain(type: Checkstyle) {
|
2019-03-28 01:14:55 +01:00
|
|
|
source 'src/main/java'
|
|
|
|
include '**/*.java'
|
|
|
|
exclude '**/gen/**'
|
2019-03-28 01:37:09 +01:00
|
|
|
classpath = files()
|
|
|
|
}
|
|
|
|
|
|
|
|
task checkstyleTest(type: Checkstyle) {
|
|
|
|
source 'src/test/java'
|
|
|
|
include '**/*.java'
|
|
|
|
exclude '**/gen/**'
|
|
|
|
classpath = files()
|
|
|
|
}
|
2019-03-28 01:14:55 +01:00
|
|
|
|
2019-03-28 01:37:09 +01:00
|
|
|
task checkstyleAndroidTest(type: Checkstyle) {
|
|
|
|
source 'src/androidTest/java'
|
|
|
|
include '**/*.java'
|
|
|
|
exclude '**/gen/**'
|
2019-03-28 01:14:55 +01:00
|
|
|
classpath = files()
|
|
|
|
}
|
|
|
|
|
2019-03-28 01:37:09 +01:00
|
|
|
check.configure {
|
2019-03-28 01:45:38 +01:00
|
|
|
dependsOn(checkstyleMain)
|
|
|
|
// dependsOn(checkstyleTest)
|
|
|
|
// dependsOn(checkstyleAndroidTest)
|
2019-03-28 01:14:55 +01:00
|
|
|
}
|
|
|
|
|
2019-04-14 18:11:29 +02:00
|
|
|
// Dependency versions are located in version.gradle
|
2019-03-27 21:24:47 +01:00
|
|
|
dependencies {
|
2019-04-14 18:11:29 +02:00
|
|
|
|
|
|
|
// architecture components for database and lifecycle management
|
|
|
|
implementation "android.arch.lifecycle:extensions:$archCompVersion"
|
|
|
|
implementation "android.arch.persistence.room:runtime:$archCompVersion"
|
2019-05-04 00:27:02 +02:00
|
|
|
implementation "android.arch.lifecycle:extensions:$archCompVersion"
|
|
|
|
|
2019-04-14 18:11:29 +02:00
|
|
|
annotationProcessor "android.arch.lifecycle:compiler:$archCompVersion"
|
|
|
|
annotationProcessor "android.arch.persistence.room:compiler:$archCompVersion"
|
|
|
|
|
|
|
|
// Dagger 2 for dependency injection
|
|
|
|
implementation "com.google.dagger:dagger:$daggerVersion"
|
|
|
|
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
|
|
|
|
|
|
|
|
// support libraries
|
|
|
|
implementation "com.android.support:appcompat-v7:$supportLibVersion"
|
|
|
|
implementation "com.android.support:design:$supportLibVersion"
|
|
|
|
implementation "com.android.support:support-v4:$supportLibVersion"
|
|
|
|
implementation "com.android.support:support-vector-drawable:$supportLibVersion"
|
2019-04-22 04:54:02 +02:00
|
|
|
implementation "com.android.support:cardview-v7:$supportLibVersion"
|
2019-04-14 18:11:29 +02:00
|
|
|
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
|
|
|
|
2019-03-27 21:24:47 +01:00
|
|
|
testImplementation 'junit:junit:4.12'
|
|
|
|
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
|
|
|
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
|
|
|
|
2019-04-14 18:11:29 +02:00
|
|
|
// circular image viewer for avatars
|
|
|
|
implementation 'de.hdodenhof:circleimageview:2.2.0'
|
|
|
|
|
2019-03-27 21:24:47 +01:00
|
|
|
// Smack
|
|
|
|
// Not all of those are needed, but it may be a good idea to define those versions explicitly
|
|
|
|
implementation "org.igniterealtime.smack:smack-android:$smackAndroidVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-android-extensions:$smackAndroidExtensionsVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-core:$smackCoreVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-experimental:$smackExperimentalVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-extensions:$smackExtensionsVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-im:$smackImVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-omemo:$smackOmemoVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-omemo-signal:$smackOmemoSignalVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-openpgp:$smackOpenPGPVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-resolver-minidns:$smackResolverMiniDnsVersion"
|
|
|
|
implementation "org.igniterealtime.smack:smack-tcp:$smackTcpVersion"
|
|
|
|
|
|
|
|
// Exclude XmlPullParser from Smack dependencies, as its now provided by Android
|
|
|
|
// https://stackoverflow.com/questions/48488563/gradle-xpp3-error/48746294#48746294
|
|
|
|
configurations {
|
|
|
|
all*.exclude group: 'xpp3', module: 'xpp3'
|
|
|
|
}
|
|
|
|
}
|