habitica-android/build.gradle

111 lines
3.6 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 {
2022-10-12 15:50:02 +00:00
min_sdk = 21
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-12-20 12:36:34 +00:00
accompanist_version = '0.28.0'
2023-02-13 13:24:37 +00:00
amplitude_version = '1.6.1'
appcompat_version = '1.6.1'
2022-11-17 13:19:21 +00:00
coil_version = '2.2.2'
2023-02-13 13:24:37 +00:00
compose_version = '1.3.3'
2022-09-26 11:05:22 +00:00
core_ktx_version = '1.9.0'
coroutines_version = '1.6.4'
2022-11-17 13:19:21 +00:00
daggerhilt_version = '2.44.2'
2023-02-13 13:24:37 +00:00
firebase_bom = '31.2.0'
kotlin_version = '1.8.10'
ktlint_version = '0.48.2'
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-11-17 13:19:21 +00:00
moshi_version = '1.14.0'
2022-10-31 14:12:55 +00:00
navigation_version = '2.5.3'
2022-11-17 13:19:21 +00:00
okhttp_version = '4.10.0'
2022-09-26 11:05:22 +00:00
play_wearables_version = '18.0.0'
2023-02-13 13:24:37 +00:00
play_auth_version = '20.4.1'
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 {
2023-02-13 13:24:37 +00:00
classpath 'com.android.tools.build:gradle:7.4.1'
2017-10-03 13:19:05 +00:00
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
2023-02-13 13:24:37 +00:00
classpath 'com.google.gms:google-services:4.3.15'
2022-09-26 11:05:22 +00:00
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"
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-10-31 14:12:55 +00:00
classpath 'com.google.firebase:perf-plugin:1.4.2'
2022-06-10 08:03:36 +00:00
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerhilt_version"
2023-02-13 13:24:37 +00:00
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.1.0"
2015-04-12 11:54:29 +00:00
}
}
2017-10-03 13:19:05 +00:00
apply plugin: 'io.gitlab.arturbosch.detekt'
allprojects {
2023-02-13 13:24:37 +00:00
apply plugin: "org.jlleitschuh.gradle.ktlint"
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"))
}
}