forked from pyamsoft/tetherfusenet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
171 lines (143 loc) · 4 KB
/
build.gradle
File metadata and controls
171 lines (143 loc) · 4 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/*
* Copyright 2021 Peter Kenji Yamanaka
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
// SDK
minSdk = 24
targetSdk = 34
compileSdk = 34
// Kotlin
kotlin = "1.9.10"
coroutines = "1.7.3"
// Us
pydroid = "26.8.5"
// Leak Canary
leakCanary = "2.12"
// Dagger
dagger = "2.48"
// Compose
compose = "1.5.2"
composeCompiler = "1.5.3"
composeMaterial = "1.5.2"
accompanist = "0.32.0"
desugar = "2.0.3"
// Testing
testRunner = "1.5.2"
}
}
plugins {
// Android AGP
// https://developer.android.com/studio/build#top-level
id("com.android.library") version "8.1.2" apply false
// Fix Android build cache
// https://github.com/gradle/android-cache-fix-gradle-plugin
id("org.gradle.android.cache-fix") version "2.8.1" apply false
// Kotlin
// https://developer.android.com/studio/build#top-level
id("org.jetbrains.kotlin.android") version "${kotlin}" apply false
// Gradle version checker
// https://github.com/ben-manes/gradle-versions-plugin
id("com.github.ben-manes.versions") version "0.48.0" apply false
// Version Filter Plugin
// https://github.com/janderssonse/gradle-versions-filter-plugin
id("se.ascp.gradle.gradle-versions-filter") version "0.1.16" apply false
// Spotless
// https://github.com/diffplug/spotless
id("com.diffplug.spotless") version "6.22.0" apply false
// KSP
// https://github.com/google/ksp
id("com.google.devtools.ksp") version "${kotlin}-1.0.13" apply false
// Gradle Doctor
// https://runningcode.github.io/gradle-doctor/
id("com.osacky.doctor") version "0.8.1" apply true
}
subprojects {
// If this project has an Android plugin applied
plugins.withType(com.android.build.gradle.api.AndroidBasePlugin) {
project.apply plugin: "org.gradle.android.cache-fix"
project.apply plugin: "kotlin-android"
project.apply plugin: "kotlin-kapt"
// Configure matching toolchains
// https://kotlinlang.org/docs/gradle-configure-project.html#2c42d1dc
kotlin {
jvmToolchain(17)
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
}
}
allprojects {
apply plugin: "com.diffplug.spotless"
apply plugin: "com.github.ben-manes.versions"
apply plugin: "se.ascp.gradle.gradle-versions-filter"
repositories {
mavenLocal()
gradlePluginPortal()
google()
mavenCentral()
// Jitpack
maven {
setUrl("https://jitpack.io")
content {
includeGroup("com.github.pyamsoft.pydroid")
includeGroup("com.github.pyamsoft")
}
}
}
// Java compile show
tasks.withType(JavaCompile) {
options.compilerArgs += [
"-Xlint:unchecked",
"-Xlint:deprecation"
]
options.deprecation = true
}
// Spotless plugin
spotless {
java {
target("src/**/*.java")
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
indentWithSpaces(2)
}
kotlin {
target("src/**/*.kt", "*.kts")
ktfmt()
trimTrailingWhitespace()
endWithNewline()
indentWithSpaces(2)
}
groovyGradle {
target("*.gradle")
greclipse()
trimTrailingWhitespace()
endWithNewline()
indentWithSpaces(2)
}
format "xml", {
target("src/**/*.xml")
eclipseWtp("xml")
trimTrailingWhitespace()
endWithNewline()
indentWithSpaces(2)
}
}
}