A mobile app for thmmy.gr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
5.4 KiB

import groovy.json.JsonSlurper
apply from: 'gradle/grgit.gradle'
8 years ago
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
8 years ago
android {
5 years ago
compileSdkVersion 29
buildToolsVersion = '29.0.2'
8 years ago
defaultConfig {
vectorDrawables.useSupportLibrary = true
8 years ago
applicationId "gr.thmmy.mthmmy"
minSdkVersion 19
5 years ago
targetSdkVersion 29
5 years ago
versionCode 22
versionName "1.7.4"
archivesBaseName = "mTHMMY-v$versionName"
buildConfigField "String", "CURRENT_BRANCH", "\"" + getCurrentBranch() + "\""
buildConfigField "String", "COMMIT_HASH", "\"" + getCommitHash() + "\""
buildConfigField "boolean", "IS_CLEAN", String.valueOf(isClean())
8 years ago
}
8 years ago
buildTypes {
release {
8 years ago
minifyEnabled true
shrinkResources true
8 years ago
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
multiDexEnabled true
def date = new Date().format('ddMMyy_HHmmss')
archivesBaseName = archivesBaseName + "-$date"
// Disable fabric build ID generation for debug builds
6 years ago
ext.enableCrashlytics = false
}
8 years ago
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
8 years ago
}
def firebaseReleaseProjectId = "mthmmy-release-3aef0"
tasks.whenTaskAdded { task ->
if (task.name.contains("assembleRelease")) {
task.getDependsOn().add({
def googleServicesFile = new File("app/src/release/google-services.json")
if(googleServicesFile.exists()){
def json = new JsonSlurper().parseText(googleServicesFile.text)
if (json.project_info.project_id != firebaseReleaseProjectId)
throw new GradleException('Please supply the correct google-services.json for release in app/src/release/ directory!')
}
else
throw new GradleException('Please add the release google-services.json in app/src/release/ directory!')
})
} else if (task.name.contains("assembleDebug")) {
task.getDependsOn().add({
def googleServicesFile = new File("app/src/debug/google-services.json")
if(googleServicesFile.exists()){
def json = new JsonSlurper().parseText(googleServicesFile.text)
if (json.project_info.project_id == firebaseReleaseProjectId)
throw new GradleException('Please replace google-services.json in app/src/debug/ with a debug one!')
}
else
throw new GradleException('Please add a debug google-services.json in app/src/debug/ directory!')
})
}
}
8 years ago
dependencies {
7 years ago
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(":emojis")
5 years ago
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
5 years ago
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
5 years ago
implementation 'androidx.exifinterface:exifinterface:1.1.0-rc01'
implementation 'com.google.android.material:material:1.0.0'
6 years ago
implementation 'com.google.firebase:firebase-core:17.0.0'
6 years ago
implementation 'com.google.firebase:firebase-messaging:19.0.1'
6 years ago
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.snatik:storage:2.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0' //TODO: Warning: okhttp has dropped support for Android v.19 since okhttp 3.13!
7 years ago
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
implementation 'org.jsoup:jsoup:1.10.3' //TODO: Warning: upgrading from 1.10.3 will break stuff!
implementation 'joda-time:joda-time:2.10.4'
6 years ago
implementation 'com.github.franmontiel:PersistentCookieJar:1.0.1'
implementation 'com.github.PhilJay:MPAndroidChart:3.0.3'
implementation 'com.mikepenz:materialdrawer:6.1.1'
7 years ago
implementation 'com.mikepenz:fontawesome-typeface:4.7.0.0@aar'
implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'
implementation 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'//TODO: deprecated!
7 years ago
implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2'
implementation 'com.jakewharton.timber:timber:4.7.1'
6 years ago
implementation 'ru.noties:markwon:2.0.2'
implementation 'net.gotev:uploadservice:3.5.2'
implementation 'net.gotev:uploadservice-okhttp:3.4.2' //TODO: Warning: v.3.5 depends on okhttp 3.13!
5 years ago
implementation 'com.itkacher.okhttpprofiler:okhttpprofiler:1.0.5' //Plugin: https://plugins.jetbrains.com/plugin/11249-okhttp-profiler
testImplementation 'junit:junit:4.12'
testImplementation 'org.powermock:powermock-core:2.0.2'
testImplementation 'org.powermock:powermock-module-junit4:2.0.2'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.2'
testImplementation 'net.lachlanmckee:timber-junit-rule:1.0.1'
8 years ago
}
apply plugin: 'com.google.gms.google-services'