This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
85 lines (77 loc) · 2.64 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
plugins {
id("com.github.ben-manes.versions")
}
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath(co.anitrend.support.crunchyroll.buildSrc.Libraries.Android.Tools.buildGradle)
classpath(co.anitrend.support.crunchyroll.buildSrc.Libraries.JetBrains.Kotlin.Gradle.plugin)
classpath(co.anitrend.support.crunchyroll.buildSrc.Libraries.JetBrains.Kotlin.Serialization.serialization)
classpath(co.anitrend.support.crunchyroll.buildSrc.Libraries.Koin.Gradle.plugin)
classpath(co.anitrend.support.crunchyroll.buildSrc.Libraries.Google.Services.googleServices)
classpath(co.anitrend.support.crunchyroll.buildSrc.Libraries.Google.Firebase.Crashlytics.Gradle.plugin)
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {
setUrl(co.anitrend.support.crunchyroll.buildSrc.Libraries.Repositories.jitPack)
}
maven {
setUrl(co.anitrend.support.crunchyroll.buildSrc.Libraries.Repositories.dependencyUpdates)
}
}
configurations.all {
resolutionStrategy.eachDependency {
when (requested.group) {
"org.jetbrains.kotlin" -> {
when (requested.name) {
"kotlin-reflect",
"kotlin-stdlib",
"kotlin-stdlib-common",
"kotlin-stdlib-jdk8",
"kotlin-stdlib-jdk7" -> useVersion("1.5.31")
}
}
}
if (requested.group == "com.jakewharton.timber") {
useTarget(co.anitrend.support.crunchyroll.buildSrc.Libraries.timber)
}
}
}
}
plugins.apply("koin")
tasks.create("clean", Delete::class) {
delete(rootProject.buildDir)
}
tasks.named(
"dependencyUpdates",
DependencyUpdatesTask::class.java
).configure {
checkForGradleUpdate = false
outputFormatter = "json"
outputDir = "build/dependencyUpdates"
reportfileName = "report"
resolutionStrategy {
componentSelection {
all {
val reject = listOf("preview", "m")
.map { qualifier ->
val pattern = "(?i).*[.-]$qualifier[.\\d-]*"
Regex(pattern, RegexOption.IGNORE_CASE)
}
.any { it.matches(candidate.version) }
if (reject)
reject("Preview releases not wanted")
}
}
}
}