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"
|
|
|
|
}
|
|
|
|
}
|
2021-10-28 15:35:30 -05:00
|
|
|
|
|
|
|
kapt {
|
|
|
|
arguments {
|
|
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
|
|
}
|
|
|
|
}
|
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 {
|
2022-02-21 13:19:29 -06:00
|
|
|
getIsDefault().set(true)
|
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 {
|
2022-02-21 13:19:29 -06:00
|
|
|
unofficial {
|
|
|
|
getIsDefault().set(true)
|
2021-10-29 10:32:05 -05:00
|
|
|
versionName "${release.versionName}-${gitInfo.versionSuffix}"
|
2021-03-27 08:00:06 -05:00
|
|
|
}
|
|
|
|
official {}
|
|
|
|
play {}
|
|
|
|
}
|
|
|
|
variantFilter { variant ->
|
|
|
|
def flavors = variant.flavors*.name
|
2022-02-21 13:19:29 -06:00
|
|
|
setIgnore(variant.buildType.name == "debug" && !flavors.contains("unofficial") || flavors.contains("main"))
|
|
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
unofficial {
|
|
|
|
java.srcDirs = ["src/main/java", "src/play-not/java"]
|
2022-09-18 16:05:46 -05:00
|
|
|
manifest.srcFile("src/play-not/AndroidManifest.xml")
|
2022-02-21 13:19:29 -06:00
|
|
|
}
|
|
|
|
official {
|
|
|
|
java.srcDirs = ["src/main/java", "src/play-not/java"]
|
2022-09-18 16:05:46 -05:00
|
|
|
manifest.srcFile("src/play-not/AndroidManifest.xml")
|
2022-02-21 13:19:29 -06:00
|
|
|
}
|
|
|
|
play {
|
|
|
|
java.srcDirs = ["src/main/java", "src/play/java"]
|
|
|
|
}
|
2021-03-27 08:00:06 -05:00
|
|
|
}
|
|
|
|
|
2019-09-18 15:29:09 -05:00
|
|
|
defaultConfig {
|
|
|
|
vectorDrawables.useSupportLibrary = true
|
|
|
|
}
|
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 {
|
2022-09-09 05:47:20 -05:00
|
|
|
resources {
|
|
|
|
excludes += ['META-INF/library-core_release.kotlin_module']
|
|
|
|
}
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|
2019-12-14 15:56:56 -06:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path "src/main/cpp/CMakeLists.txt"
|
|
|
|
version "3.10.2"
|
|
|
|
}
|
|
|
|
}
|
2022-09-09 05:47:20 -05:00
|
|
|
lint {
|
|
|
|
checkReleaseBuilds false
|
|
|
|
}
|
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"
|
2022-09-17 05:31:35 -05:00
|
|
|
implementation "androidx.multidex:multidex:2.0.1"
|
2021-03-21 15:01:28 -05:00
|
|
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
|
|
|
|
|
|
|
// Android Jetpack
|
2022-09-09 05:47:20 -05:00
|
|
|
implementation "androidx.appcompat:appcompat:1.5.1"
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "androidx.cardview:cardview:1.0.0"
|
2022-09-09 05:47:20 -05:00
|
|
|
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
|
|
|
implementation "androidx.core:core-ktx:1.9.0"
|
|
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
|
|
|
|
implementation "androidx.navigation:navigation-fragment-ktx:2.5.2"
|
2021-09-02 10:49:01 -05:00
|
|
|
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
2022-09-09 05:47:20 -05:00
|
|
|
implementation "androidx.room:room-runtime:2.4.3"
|
|
|
|
implementation "androidx.work:work-runtime-ktx:2.7.1"
|
|
|
|
kapt "androidx.room:room-compiler:2.4.3"
|
2021-03-21 15:01:28 -05:00
|
|
|
|
|
|
|
// Google design libs
|
2022-09-09 05:47:20 -05:00
|
|
|
implementation "com.google.android.material:material:1.6.1"
|
2021-10-15 15:37:46 -05:00
|
|
|
implementation "com.google.android.flexbox:flexbox:3.0.0"
|
2021-03-21 15:01:28 -05:00
|
|
|
|
|
|
|
// Play Services/Firebase
|
2021-09-02 10:49:01 -05:00
|
|
|
implementation "com.google.android.gms:play-services-wearable:17.1.0"
|
2022-09-09 05:47:20 -05:00
|
|
|
implementation("com.google.firebase:firebase-core") { version { strictly "19.0.2" } }
|
|
|
|
implementation "com.google.firebase:firebase-crashlytics:18.2.13"
|
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"
|
2021-10-15 15:37:46 -05:00
|
|
|
implementation 'com.google.code.gson:gson:2.8.8'
|
|
|
|
implementation 'org.jsoup:jsoup:1.14.3'
|
2021-03-21 15:01:28 -05:00
|
|
|
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-10-15 15:37:46 -05:00
|
|
|
implementation "eu.szkolny:agendacalendarview:1.0.4"
|
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"
|
2022-02-21 13:36:11 -06:00
|
|
|
officialImplementation "eu.szkolny:ssl-provider:1.0.0"
|
|
|
|
unofficialImplementation "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-10-13 12:23:17 -05:00
|
|
|
implementation "com.mikepenz:iconics-core:5.3.2"
|
|
|
|
implementation "com.mikepenz:iconics-views:5.3.2"
|
2021-03-21 17:39:51 -05:00
|
|
|
implementation "com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar"
|
2021-09-21 17:03:31 -05:00
|
|
|
implementation "eu.szkolny:szkolny-font:77e33acc2a"
|
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"
|
2021-10-15 15:37:46 -05:00
|
|
|
implementation "com.android.volley:volley:1.2.1"
|
2019-09-18 15:29:09 -05:00
|
|
|
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
|
2021-10-15 15:37:46 -05:00
|
|
|
implementation "com.github.Applandeo:Material-Calendar-View:15de569cbc" // https://github.com/Applandeo/Material-Calendar-View
|
|
|
|
implementation "com.github.CanHub:Android-Image-Cropper:2.2.2" // https://github.com/CanHub/Android-Image-Cropper
|
2022-10-23 16:16:08 -05:00
|
|
|
implementation "com.github.ChuckerTeam.Chucker:library:3.5.2" // https://github.com/ChuckerTeam/chucker
|
2021-10-15 15:37:46 -05:00
|
|
|
implementation "com.github.antonKozyriatskyi:CircularProgressIndicator:1.2.2" // https://github.com/antonKozyriatskyi/CircularProgressIndicator
|
|
|
|
implementation "com.github.bassaer:chatmessageview:2.0.1" // https://github.com/bassaer/ChatMessageView
|
|
|
|
implementation "com.github.hypertrack:hyperlog-android:0.0.10" // https://github.com/hypertrack/hyperlog-android
|
|
|
|
implementation "com.github.smuyyh:JsonViewer:V1.0.6" // https://github.com/smuyyh/JsonViewer
|
|
|
|
implementation "com.github.underwindfall.PowerPermission:powerpermission-coroutines:1.4.0" // https://github.com/underwindfall/PowerPermission
|
|
|
|
implementation "com.github.underwindfall.PowerPermission:powerpermission:1.4.0" // https://github.com/underwindfall/PowerPermission
|
|
|
|
implementation "com.github.wulkanowy.uonet-request-signer:hebe-jvm:a99ca50a31" // https://github.com/wulkanowy/uonet-request-signer
|
2021-03-21 15:01:28 -05:00
|
|
|
implementation "com.jaredrummler:colorpicker:1.1.0"
|
|
|
|
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-10-15 15:37:46 -05:00
|
|
|
implementation("com.heinrichreimersoftware:material-intro") { version { strictly "1.5.8" } }
|
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
|
2021-10-15 15:37:46 -05:00
|
|
|
debugImplementation "com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:v1.0.6"
|
2019-09-18 15:29:09 -05:00
|
|
|
}
|