-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
80 lines (67 loc) · 2.32 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
// file:noinspection GroovyAssignabilityCheck
plugins {
id 'idea'
id "com.github.ben-manes.versions" version '0.44.0'
alias(libs.plugins.nexus)
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.allure.gradle) apply false
}
wrapper { distributionType = Wrapper.DistributionType.ALL; gradleVersion = gradleWrapperVersion }
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)
}
}
subprojects {
apply plugin: 'kotlin'
apply plugin: 'io.qameta.allure'
repositories { mavenLocal(); mavenCentral() }
java {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
suppressWarnings = true
jvmTarget = JavaVersion.VERSION_11.majorVersion
}
}
tasks.withType(Test) {
useJUnitPlatform()
systemProperties["kotest.listener.spring.ignore.warning"] = true
systemProperties["gradle.build.dir"] = buildDir
}
dependencies {
// MAIN //
api 'org.jetbrains.kotlin:kotlin-reflect'
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
api libs.awaitility
api(libs.awaitility.kotlin) { transitive = false }
api libs.kotest.assertions
/* Logging API*/
api libs.slf4j
api libs.kotlin.logging
/* Logging IMPL*/
runtimeOnly libs.logback
// TEST //
testImplementation libs.kotest.allure
testImplementation libs.mockk
testImplementation libs.kotest.runner
testImplementation libs.kotest.containers
testImplementation(platform(libs.testcontainers))
}
}
nexusStaging {
packageGroup = "org.brewcode"
numberOfRetries = 50
delayBetweenRetriesInMillis = 5000
serverUrl = "https://s01.oss.sonatype.org/service/local/"
username = project.findProperty('ossrhUsername') ?: ''
password = project.findProperty('ossrhPassword') ?: ''
}