2019-09-18 15:29:09 -05:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'kotlin-android'
|
2020-01-19 12:07:27 -06:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2021-09-08 12:11:14 -05:00
|
|
|
apply plugin: 'kotlin-parcelize'
|
2019-09-18 15:29:09 -05:00
|
|
|
apply plugin: 'com.google.gms.google-services'
|
2021-02-17 07:42:08 -06:00
|
|
|
apply plugin: 'com.google.firebase.crashlytics'
|
2019-09-18 15:29:09 -05:00
|
|
|
|
2021-03-27 06:53:01 -05:00
|
|
|
apply from: 'git-info.gradle'
|
|
|
|
|
2019-09-18 15:29:09 -05:00
|
|
|
android {
|
2020-01-19 12:07:27 -06:00
|
|
|
compileSdkVersion setup.compileSdk
|
2021-03-21 15:01:28 -05:00
|
|
|
|
2019-09-18 15:29:09 -05:00
|
|
|
defaultConfig {
|
|
|
|
applicationId 'pl.szczodrzynski.edziennik'
|
|
|
|
minSdkVersion setup.minSdk
|
|
|
|
targetSdkVersion setup.targetSdk
|
2021-03-21 15:01:28 -05:00
|
|
|
|
2019-09-18 15:29:09 -05:00
|
|
|
versionCode release.versionCode
|
|
|
|
versionName release.versionName
|
2021-03-21 15:01:28 -05:00
|
|
|
|
2021-03-27 06:53:01 -05:00
|
|
|
buildConfigField "java.util.Map<String, String>", "GIT_INFO", gitInfoMap
|
2021-03-27 08:06:30 -05:00
|
|
|
buildConfigField "String", "VERSION_BASE", "\"${release.versionName}\""
|
2021-04-05 13:00:38 -05:00
|
|
|
manifestPlaceholders = [
|
|
|
|
buildTimestamp: String.valueOf(System.currentTimeMillis())
|
|
|
|
]
|
2021-03-27 06:53:01 -05:00
|
|
|
|
2021-03-21 15:01:28 -05:00
|
|
|
multiDexEnabled = true
|
2019-12-14 15:56:56 -06:00
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
cppFlags "-std=c++11"
|
|
|
|
}
|
|
|
|
}
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|
2021-03-27 08:00:06 -05:00
|
|
|
|
2019-09-18 15:29:09 -05:00
|
|
|
buildTypes {
|
|
|
|
debug {
|
2021-03-21 15:01:28 -05:00
|
|
|
minifyEnabled = false
|
2021-09-10 10:17:31 -05:00
|
|
|
manifestPlaceholders = [
|
|
|
|
buildTimestamp: 0
|
|
|
|
]
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|
|
|
|
release {
|
2021-03-21 15:01:28 -05:00
|
|
|
minifyEnabled = true
|
|
|
|
shrinkResources = true
|
2021-03-21 16:49:43 -05:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2019-09-18 15:29:09 -05:00
|
|
|
proguardFiles fileTree('proguard').asList().toArray()
|
|
|
|
}
|
|
|
|
}
|
2021-03-27 08:00:06 -05:00
|
|
|
flavorDimensions "platform"
|
|
|
|
productFlavors {
|
|
|
|
main {
|
|
|
|
versionName gitInfo.versionHuman
|
|
|
|
}
|
|
|
|
official {}
|
|
|
|
play {}
|
|
|
|
}
|
|
|
|
variantFilter { variant ->
|
|
|
|
def flavors = variant.flavors*.name
|
|
|
|
setIgnore(variant.buildType.name == "debug" && !flavors.contains("main"))
|
|
|
|
}
|
|
|
|
|
2019-09-18 15:29:09 -05:00
|
|
|
defaultConfig {
|
|
|
|
vectorDrawables.useSupportLibrary = true
|
|
|
|
}
|
|
|
|
lintOptions {
|
2021-03-21 15:01:28 -05:00
|
|
|
checkReleaseBuilds = false
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|
2021-02-17 07:42:08 -06:00
|
|
|
buildFeatures {
|
|
|
|
dataBinding = true
|
2021-03-21 15:01:28 -05:00
|
|
|
viewBinding = true
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|
|
|
|
compileOptions {
|
2021-03-21 15:01:28 -05:00
|
|
|
coreLibraryDesugaringEnabled = true
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/library-core_release.kotlin_module'
|
|
|
|
}
|
2019-12-14 15:56:56 -06:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path "src/main/cpp/CMakeLists.txt"
|
|
|
|
version "3.10.2"
|
|
|
|
}
|
|
|
|
}
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|
|
|
|
|
2021-03-31 03:51:59 -05:00
|
|
|
tasks.whenTaskAdded { task ->
|
|
|
|
if (!task.name.endsWith("Release") && !task.name.endsWith("ReleaseWithR8"))
|
|
|
|
return
|
|
|
|
def renameTaskName = "rename${task.name.capitalize()}"
|
|
|
|
|
|
|
|
def flavor = ""
|
|
|
|
if (task.name.startsWith("bundle"))
|
|
|
|
flavor = task.name.substring("bundle".length(), task.name.indexOf("Release")).uncapitalize()
|
|
|
|
if (task.name.startsWith("assemble"))
|
|
|
|
flavor = task.name.substring("assemble".length(), task.name.indexOf("Release")).uncapitalize()
|
|
|
|
if (task.name.startsWith("minify"))
|
|
|
|
flavor = task.name.substring("minify".length(), task.name.indexOf("Release")).uncapitalize()
|
|
|
|
|
|
|
|
if (flavor != "") {
|
|
|
|
tasks.create(renameTaskName, Copy) {
|
2021-04-05 03:56:13 -05:00
|
|
|
from file("${projectDir}/${flavor}/release/"),
|
|
|
|
file("${buildDir}/outputs/mapping/${flavor}Release/"),
|
|
|
|
file("${buildDir}/outputs/apk/${flavor}/release/"),
|
|
|
|
file("${buildDir}/outputs/bundle/${flavor}Release/")
|
2021-03-31 03:51:59 -05:00
|
|
|
include "*.aab", "*.apk", "mapping.txt", "output-metadata.json"
|
|
|
|
destinationDir file("${projectDir}/release/")
|
|
|
|
rename ".+?\\.(.+)", "Edziennik_${android.defaultConfig.versionName}_${flavor}." + '$1'
|
|
|
|
}
|
|
|
|
task.finalizedBy(renameTaskName)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-18 15:29:09 -05:00
|
|
|
dependencies {
|
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
|
|
|
2021-03-21 15:01:28 -05:00
|
|
|
// Language cores
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
|
|
|
|
|
|
|
// Android Jetpack
|
2021-09-02 10:49:01 -05:00
|
|
|
implementation "androidx.appcompat:appcompat:1.3.1"
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "androidx.cardview:cardview:1.0.0"
|
2021-09-02 10:49:01 -05:00
|
|
|
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
|
|
|
|
implementation "androidx.core:core-ktx:1.6.0"
|
|
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"
|
|
|
|
implementation "androidx.navigation:navigation-fragment-ktx:2.3.5"
|
|
|
|
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
|
|
|
implementation "androidx.room:room-runtime:2.3.0"
|
|
|
|
implementation "androidx.work:work-runtime-ktx:2.6.0"
|
|
|
|
kapt "androidx.room:room-compiler:2.3.0"
|
2021-03-21 15:01:28 -05:00
|
|
|
|
|
|
|
// Google design libs
|
2021-09-02 10:49:01 -05:00
|
|
|
implementation "com.google.android.material:material:1.4.0"
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "com.google.android:flexbox:2.0.1"
|
|
|
|
|
|
|
|
// Play Services/Firebase
|
2021-09-02 10:49:01 -05:00
|
|
|
implementation "com.google.android.gms:play-services-wearable:17.1.0"
|
|
|
|
implementation "com.google.firebase:firebase-core:19.0.1"
|
|
|
|
implementation "com.google.firebase:firebase-crashlytics:18.2.1"
|
2021-03-21 17:47:14 -05:00
|
|
|
implementation("com.google.firebase:firebase-messaging") { version { strictly "20.1.3" } }
|
2021-03-21 15:01:28 -05:00
|
|
|
|
|
|
|
// OkHttp, Retrofit, Gson, Jsoup
|
|
|
|
implementation("com.squareup.okhttp3:okhttp") { version { strictly "3.12.13" } }
|
|
|
|
implementation "com.squareup.retrofit2:retrofit:2.9.0"
|
|
|
|
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
|
|
|
|
implementation "com.squareup.retrofit2:converter-scalars:2.9.0"
|
|
|
|
implementation 'com.google.code.gson:gson:2.8.6'
|
|
|
|
implementation "org.jsoup:jsoup:1.13.1"
|
|
|
|
implementation "pl.droidsonroids:jspoon:1.3.2"
|
|
|
|
implementation "pl.droidsonroids.retrofit2:converter-jspoon:1.3.2"
|
2019-09-18 15:29:09 -05:00
|
|
|
|
2021-03-21 15:01:28 -05:00
|
|
|
// Szkolny.eu libraries/forks
|
2021-04-12 10:18:53 -05:00
|
|
|
implementation "eu.szkolny:android-snowfall:1ca9ea2da3"
|
2021-09-08 15:48:48 -05:00
|
|
|
implementation "eu.szkolny:agendacalendarview:ac0f3dcf42"
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "eu.szkolny:cafebar:5bf0c618de"
|
2021-03-21 16:30:19 -05:00
|
|
|
implementation "eu.szkolny.fslogin:lib:2.0.0"
|
2021-03-25 05:18:40 -05:00
|
|
|
implementation "eu.szkolny:material-about-library:1d5ebaf47c"
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "eu.szkolny:mhttp:af4b62e6e9"
|
|
|
|
implementation "eu.szkolny:nachos:0e5dfcaceb"
|
|
|
|
implementation "eu.szkolny.selective-dao:annotation:27f8f3f194"
|
2021-03-24 17:02:18 -05:00
|
|
|
implementation "eu.szkolny:ssl-provider:1.0.0"
|
2021-03-29 15:51:48 -05:00
|
|
|
implementation "pl.szczodrzynski:navlib:0.8.0"
|
2021-03-21 16:30:19 -05:00
|
|
|
implementation "pl.szczodrzynski:numberslidingpicker:2921225f76"
|
|
|
|
implementation "pl.szczodrzynski:recyclertablayout:700f980584"
|
|
|
|
implementation "pl.szczodrzynski:tachyon:551943a6b5"
|
2021-03-21 15:01:28 -05:00
|
|
|
kapt "eu.szkolny.selective-dao:codegen:27f8f3f194"
|
2019-09-18 15:29:09 -05:00
|
|
|
|
2021-03-21 15:01:28 -05:00
|
|
|
// Iconics & related
|
2021-03-29 15:51:48 -05:00
|
|
|
implementation "com.mikepenz:iconics-core:5.3.0-b01"
|
|
|
|
implementation "com.mikepenz:iconics-views:5.3.0-b01"
|
2021-03-21 17:39:51 -05:00
|
|
|
implementation "com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar"
|
2021-03-25 09:50:14 -05:00
|
|
|
implementation "eu.szkolny:szkolny-font:1.3"
|
2019-09-18 15:29:09 -05:00
|
|
|
|
2021-03-21 15:01:28 -05:00
|
|
|
// Other dependencies
|
|
|
|
implementation "cat.ereza:customactivityoncrash:2.3.0"
|
2019-09-18 15:29:09 -05:00
|
|
|
implementation "com.applandeo:material-calendar-view:1.5.0"
|
|
|
|
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
|
|
|
|
implementation "com.github.antonKozyriatskyi:CircularProgressIndicator:1.2.2"
|
|
|
|
implementation "com.github.bassaer:chatmessageview:2.0.1"
|
2021-03-25 10:36:38 -05:00
|
|
|
implementation "com.github.CanHub:Android-Image-Cropper:2.2.2"
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "com.github.ChuckerTeam.Chucker:library:3.0.1"
|
|
|
|
implementation "com.github.wulkanowy.uonet-request-signer:hebe-jvm:a99ca50a31"
|
2021-03-21 17:47:14 -05:00
|
|
|
implementation("com.heinrichreimersoftware:material-intro") { version { strictly "1.5.8" } }
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "com.hypertrack:hyperlog:0.0.10"
|
|
|
|
implementation "com.jaredrummler:colorpicker:1.1.0"
|
|
|
|
implementation "com.qifan.powerpermission:powerpermission-coroutines:1.3.0"
|
|
|
|
implementation "com.qifan.powerpermission:powerpermission:1.3.0"
|
2019-09-18 15:29:09 -05:00
|
|
|
implementation "com.yuyh.json:jsonviewer:1.0.6"
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "io.coil-kt:coil:1.1.1"
|
2019-09-18 15:29:09 -05:00
|
|
|
implementation "me.dm7.barcodescanner:zxing:1.9.8"
|
|
|
|
implementation "me.grantland:autofittextview:0.2.1"
|
|
|
|
implementation "me.leolin:ShortcutBadger:1.1.22@aar"
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "org.greenrobot:eventbus:3.2.0"
|
2021-03-21 17:47:14 -05:00
|
|
|
implementation("pl.droidsonroids.gif:android-gif-drawable") { version { strictly "1.2.15" } }
|
2019-09-18 15:29:09 -05:00
|
|
|
|
2021-03-21 15:01:28 -05:00
|
|
|
// Debug-only dependencies
|
|
|
|
debugImplementation "com.amitshekhar.android:debug-db:1.0.5"
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|