habitica-android/build.gradle

105 lines
3.3 KiB
Groovy
Raw Normal View History

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 {
target_sdk = 32
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'
appcompat_version = '1.5.0'
2022-07-27 11:04:16 +00:00
coil_version = '2.1.0'
core_ktx_version = '1.8.0'
2022-07-05 15:31:03 +00:00
coroutines_version = '1.6.2'
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'
kotlin_version = '1.7.10'
lifecycle_version = '2.5.0'
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'
okhttp_version = '4.9.3'
2022-06-10 08:03:36 +00:00
play_wearables_version = '17.1.0'
play_auth_version = '20.2.0'
2022-07-27 11:04:16 +00:00
preferences_version = '1.2.0'
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
}
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-07-07 07:12:55 +00:00
classpath 'com.android.tools.build:gradle:7.1.3'
2017-10-03 13:19:05 +00:00
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'
2022-07-07 07:12:55 +00:00
classpath "io.realm:realm-gradle-plugin:10.11.0"
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"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.1"
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
}
}
2017-10-03 13:19:05 +00:00
apply plugin: 'io.gitlab.arturbosch.detekt'
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
}
}
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")
config = files("detekt.yml")
2021-09-14 11:41:33 +00:00
baseline = file("${rootProject.projectDir}/detekt_baseline.xml")
reports {
xml {
2021-09-14 12:13:56 +00:00
enabled = true
destination = file("build/reports/detekt.xml")
}
html {
2021-09-14 12:13:56 +00:00
enabled = true
destination = file("build/reports/detekt.html")
}
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")
}
}
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"))
}
}