-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
68 lines (61 loc) · 2.02 KB
/
build.gradle.kts
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
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import com.android.build.gradle.BaseExtension
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(Dependencies.Gradle.androidBuildPlugin)
classpath(Dependencies.Gradle.kotlinPlugin)
classpath(Dependencies.Hilt.plugin)
}
}
plugins {
id(Dependencies.Gradle.VersionsPlugin.id) version Dependencies.Gradle.VersionsPlugin.version
}
allprojects {
repositories {
google()
mavenCentral()
}
}
subprojects {
apply(plugin = "plugins.ktlint")
afterEvaluate {
tasks.withType(KotlinCompile::class).all {
kotlinOptions {
jvmTarget = Config.javaVersion.toString()
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn", "-Xcontext-receivers")
}
}
extensions.findByType<BaseExtension>() ?: return@afterEvaluate
configure<BaseExtension> {
compileSdkVersion(Config.compileSdk)
defaultConfig {
minSdk = Config.minSdk
targetSdk = Config.targetSdk
versionName = Config.versionName
versionCode = Config.versionCode
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = Config.javaVersion
targetCompatibility = Config.javaVersion
}
}
}
}
tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
checkForGradleUpdate = true
gradleReleaseChannel = GradleReleaseChannel.RELEASE_CANDIDATE.id
revision = "integration"
outputFormatter = "plain"
outputDir = "build/dependencyUpdates"
reportfileName = "dependency_update_report"
}
task("clean", Delete::class) {
delete(rootProject.buildDir)
}