2015-04-12 11:54:29 +00:00
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
|
|
|
|
|
|
buildscript {
|
2022-06-10 08:03:36 +00:00
|
|
|
ext {
|
2022-09-26 11:05:22 +00:00
|
|
|
target_sdk = 33
|
2022-07-19 16:51:33 +00:00
|
|
|
app_version_name = ''
|
|
|
|
|
app_version_code = 0
|
2022-06-10 08:03:36 +00:00
|
|
|
|
2022-07-27 11:04:16 +00:00
|
|
|
amplitude_version = '3.35.1'
|
2022-09-26 11:05:22 +00:00
|
|
|
appcompat_version = '1.5.1'
|
2022-07-27 11:04:16 +00:00
|
|
|
coil_version = '2.1.0'
|
2022-09-26 11:05:22 +00:00
|
|
|
compose_version = '1.2.1'
|
|
|
|
|
core_ktx_version = '1.9.0'
|
|
|
|
|
coroutines_version = '1.6.4'
|
2022-06-10 08:03:36 +00:00
|
|
|
daggerhilt_version = '2.42'
|
2022-07-27 11:04:16 +00:00
|
|
|
firebase_bom = '30.2.0'
|
2022-10-07 11:22:56 +00:00
|
|
|
kotlin_version = '1.7.20'
|
2022-09-26 11:05:22 +00:00
|
|
|
lifecycle_version = '2.5.1'
|
2022-06-10 08:03:36 +00:00
|
|
|
markwon_version = '4.6.2'
|
2022-07-27 11:04:16 +00:00
|
|
|
moshi_version = '1.13.0'
|
2022-09-26 11:05:22 +00:00
|
|
|
navigation_version = '2.5.2'
|
2022-07-27 11:04:16 +00:00
|
|
|
okhttp_version = '4.9.3'
|
2022-09-26 11:05:22 +00:00
|
|
|
play_wearables_version = '18.0.0'
|
|
|
|
|
play_auth_version = '20.3.0'
|
2022-07-27 11:04:16 +00:00
|
|
|
preferences_version = '1.2.0'
|
2022-08-22 12:55:50 +00:00
|
|
|
realm_version = '1.0.2'
|
2022-07-27 11:04:16 +00:00
|
|
|
retrofit_version = '2.9.0'
|
|
|
|
|
recyclerview_version = '1.2.1'
|
2022-06-10 08:03:36 +00:00
|
|
|
}
|
2017-10-08 16:31:48 +00:00
|
|
|
|
2015-04-12 11:54:29 +00:00
|
|
|
repositories {
|
2017-10-26 13:52:12 +00:00
|
|
|
google()
|
2017-10-03 13:19:05 +00:00
|
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
2022-06-02 08:17:28 +00:00
|
|
|
mavenCentral()
|
2015-04-12 11:54:29 +00:00
|
|
|
}
|
|
|
|
|
dependencies {
|
2022-09-26 11:05:22 +00:00
|
|
|
classpath 'com.android.tools.build:gradle:7.3.0'
|
2017-10-03 13:19:05 +00:00
|
|
|
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
|
2022-09-26 11:05:22 +00:00
|
|
|
classpath 'com.google.gms:google-services:4.3.14'
|
|
|
|
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
2022-07-07 07:12:55 +00:00
|
|
|
classpath "io.realm:realm-gradle-plugin:10.11.0"
|
2022-08-22 12:55:50 +00:00
|
|
|
classpath("io.realm.kotlin:gradle-plugin:$realm_version")
|
2017-10-03 13:19:05 +00:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
2022-01-06 12:36:08 +00:00
|
|
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.19.0"
|
2022-09-26 11:05:22 +00:00
|
|
|
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
|
2022-02-07 20:16:52 +00:00
|
|
|
classpath 'com.google.firebase:perf-plugin:1.4.1'
|
2022-06-10 08:03:36 +00:00
|
|
|
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerhilt_version"
|
2015-04-12 11:54:29 +00:00
|
|
|
}
|
|
|
|
|
}
|
2015-06-20 18:40:53 +00:00
|
|
|
|
2017-10-03 13:19:05 +00:00
|
|
|
apply plugin: 'io.gitlab.arturbosch.detekt'
|
|
|
|
|
|
2015-06-20 18:40:53 +00:00
|
|
|
allprojects {
|
|
|
|
|
repositories {
|
2017-10-26 13:52:12 +00:00
|
|
|
google()
|
2022-03-31 13:07:59 +00:00
|
|
|
mavenCentral()
|
2017-10-03 13:19:05 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-30 09:19:41 +00:00
|
|
|
Properties props = new Properties()
|
|
|
|
|
def propFile = new File('version.properties')
|
|
|
|
|
if (propFile.canRead()) {
|
|
|
|
|
props.load(new FileInputStream(propFile))
|
|
|
|
|
|
|
|
|
|
if (props != null && props.containsKey('NAME') && props.containsKey('CODE') ) {
|
|
|
|
|
ext.app_version_name = props['NAME']
|
|
|
|
|
ext.app_version_code = props['CODE'] as Integer
|
|
|
|
|
} else {
|
|
|
|
|
println 'signing.properties found but some entries are missing'
|
|
|
|
|
android.buildTypes.release.signingConfig = null
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
println 'signing.properties not found'
|
|
|
|
|
android.buildTypes.release.signingConfig = null
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-03 13:19:05 +00:00
|
|
|
detekt {
|
2022-03-21 11:56:29 +00:00
|
|
|
source = files("Habitica/src/main/java")
|
2019-10-08 12:12:39 +00:00
|
|
|
config = files("detekt.yml")
|
2021-09-14 11:41:33 +00:00
|
|
|
baseline = file("${rootProject.projectDir}/detekt_baseline.xml")
|
2019-10-08 12:12:39 +00:00
|
|
|
reports {
|
|
|
|
|
xml {
|
2021-09-14 12:13:56 +00:00
|
|
|
enabled = true
|
|
|
|
|
destination = file("build/reports/detekt.xml")
|
2019-10-08 12:12:39 +00:00
|
|
|
}
|
|
|
|
|
html {
|
2021-09-14 12:13:56 +00:00
|
|
|
enabled = true
|
|
|
|
|
destination = file("build/reports/detekt.html")
|
2019-10-08 12:12:39 +00:00
|
|
|
}
|
2021-09-14 12:08:37 +00:00
|
|
|
sarif {
|
2021-09-14 12:13:56 +00:00
|
|
|
enabled = true
|
|
|
|
|
destination = file("build/reports/detekt.sarif")
|
2019-10-08 12:12:39 +00:00
|
|
|
}
|
2015-06-20 18:40:53 +00:00
|
|
|
}
|
2022-03-21 11:56:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.named("detekt").configure {
|
|
|
|
|
reports {
|
|
|
|
|
xml.required.set(false)
|
|
|
|
|
html.required.set(true)
|
|
|
|
|
html.outputLocation.set(file("build/reports/detekt.html"))
|
|
|
|
|
txt.required.set(false)
|
|
|
|
|
sarif.required.set(true)
|
|
|
|
|
sarif.outputLocation.set(file("build/reports/detekt.sarif"))
|
|
|
|
|
}
|
2015-06-20 18:40:53 +00:00
|
|
|
}
|