-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
94 lines (84 loc) · 2.9 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
min_sdk_version = 24
target_sdk_version = 34
compose_ui_version = "1.5.4"
compose_compiler_version = '1.5.7'
kotlin_version = "1.9.21"
androidx_appcompat_version = "1.6.0"
androidx_activity_compose_version = "1.6.0"
accompanist_version = "0.32.0"
coil_version = '2.5.0'
constraintComposeVersion = '1.0.1'
detekt_version = '1.23.7'
roborazzi_version = "1.26.0"
}
repositories {
google()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.android.tools.build:gradle:8.1.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "gradle.plugin.com.betomorrow.gradle:appcenter-plugin:2.0.3"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detekt_version"
}
}
plugins {
id 'org.jetbrains.kotlin.android' version '1.5.21' apply false
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' apply false
id "io.github.takahirom.roborazzi" version '1.26.0' apply false
id "io.gitlab.arturbosch.detekt" version '1.23.7'
}
dependencies {
apply plugin: "io.gitlab.arturbosch.detekt"
}
allprojects {
group = 'com.telefonica.mistica'
if (System.getProperty("SNAPSHOT_VERSION") != null) {
version = System.getProperty("SNAPSHOT_VERSION")+"-SNAPSHOT"
} else {
version = System.getProperty("LIBRARY_VERSION") ?: "undefined"
}
tasks.withType(io.gitlab.arturbosch.detekt.Detekt).all {
exclude("build/")
exclude("**/build/**")
exclude("**/resources/**")
exclude("**/tmp/**")
exclude("**/*Autogenerated.kt")
}
tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach {
reports {
html {
outputLocation.set(file("$buildDir/reports/detekt/detekt-report.html"))
required.set(true)
}
xml {
outputLocation.set(file("$buildDir/reports/detekt/detekt-checkstyle.xml"))
required.set(true)
}
}
}
task detektProjectBaseline(type: io.gitlab.arturbosch.detekt.DetektCreateBaselineTask) {
description = "Overrides current baseline."
ignoreFailures.set(true)
parallel.set(true)
buildUponDefaultConfig.set(true)
setSource(files("$projectDir"))
config.setFrom(files("$projectDir/build-tools/detekt/detekt.yml"))
include("**/*.kt")
include("**/*.kts")
}
repositories {
google()
mavenCentral()
}
}
apply from: "${rootProject.projectDir}/publish_maven_central.gradle"
apply from: "build-tools/detekt.gradle"
tasks.withType(io.gitlab.arturbosch.detekt.Detekt) {
autoCorrect = true
}