-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
42 lines (37 loc) · 1.02 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
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
}
}
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.6.21"
id "com.google.devtools.ksp" version "1.6.21-1.0.5"
id "maven-publish"
id "com.github.ben-manes.versions" version "0.39.0"
id 'com.autonomousapps.dependency-analysis' version "0.80.0"
}
repositories {
google()
mavenCentral()
}
apply from: 'buildsystem/ci.gradle'
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
dependencies {
api 'com.squareup.retrofit2:retrofit:2.9.0'
api 'com.squareup.moshi:moshi-kotlin:1.12.0'
ksp 'dev.zacsweers.moshix:moshi-ksp:0.14.0'
}