-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.gradle
86 lines (60 loc) · 1.63 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlinVersion = '1.9.0'
repositories {
google()
maven {
url "https://jitpack.io"
}
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.5.1'
classpath 'com.google.gms:google-services:4.4.2'
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id "com.diffplug.spotless" version "6.19.0"
}
allprojects {
repositories {
google()
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}
spotless {
java {
licenseHeaderFile 'spotless-header'
importOrder('android', 'androidx', 'com', 'java', 'phone', '')
target 'app/src/**/*.java'
googleJavaFormat('1.17.0').aosp()
removeUnusedImports()
delete rootProject.buildDir
}
kotlin {
licenseHeaderFile 'spotless-header'
target 'app/src/**/*.kt'
ktlint("0.49.1")
trimTrailingWhitespace()
delete rootProject.buildDir
}
format 'xml', {
target 'app/src/**/*.xml'
trimTrailingWhitespace()
indentWithTabs()
}
}
apply plugin: "com.diffplug.spotless"