// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { target_sdk = 32 app_version_name = '4.0' app_version_code = 4020 kotlin_version = '1.7.0' core_ktx_version = '1.8.0' appcompat_version = '1.4.2' lifecycle_version = '2.4.1' coroutines_version = '1.6.1' okhttp_version = '4.9.3' retrofit_version = '2.9.0' daggerhilt_version = '2.42' recyclerview_version = '1.2.1' amplitude_version = '3.35.1' preferences_version = '1.2.0' markwon_version = '4.6.2' coil_version = '2.1.0' play_wearables_version = '17.1.0' play_auth_version = '20.2.0' moshi_version = '1.13.0' } repositories { google() maven { url "https://plugins.gradle.org/m2/" } mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:7.1.3' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' classpath 'com.google.gms:google-services:4.3.13' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1' classpath "io.realm:realm-gradle-plugin:10.10.1" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.19.0" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.0-rc02" classpath 'com.google.firebase:perf-plugin:1.4.1' classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerhilt_version" } } apply plugin: 'io.gitlab.arturbosch.detekt' allprojects { repositories { google() mavenCentral() } } 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 } detekt { source = files("Habitica/src/main/java") config = files("detekt.yml") baseline = file("${rootProject.projectDir}/detekt_baseline.xml") reports { xml { enabled = true destination = file("build/reports/detekt.xml") } html { enabled = true destination = file("build/reports/detekt.html") } sarif { enabled = true destination = file("build/reports/detekt.sarif") } } } 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")) } }