-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
107 lines (93 loc) · 2.34 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id("java")
id("java-library")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
id("org.shipkit.shipkit-auto-version") version "1.2.1"
id("org.shipkit.shipkit-changelog") version "1.2.0"
id("org.shipkit.shipkit-github-release") version "1.2.0"
id("dev.minco.gradle.defaults-plugin") version "0.2.61"
}
apply(from = "properties.gradle")
apply(from = "$rootDir/gradle/shipkit.gradle")
java {
withSourcesJar()
withJavadocJar()
}
minimallyCorrectDefaults {
configureProject(project)
}
val releasing = project.hasProperty("releasing")
if (!releasing) {
version = "$version-SNAPSHOT"
}
allprojects {
repositories {
exclusiveContent {
forRepository {
maven { url = uri("https://maven.minco.dev/") }
}
filter {
includeGroupByRegex("dev\\.minco.*")
includeGroupByRegex("me\\.nallar.*")
includeGroupByRegex("org\\.minimallycorrect.*")
}
}
mavenCentral()
}
tasks.withType<Test> {
maxParallelForks = Runtime.getRuntime().availableProcessors() / 2
testLogging {
events(TestLogEvent.FAILED, TestLogEvent.SKIPPED)
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
showStandardStreams = true
}
}
configurations.all {
resolutionStrategy {
failOnVersionConflict()
failOnNonReproducibleResolution()
}
}
}
dependencies {
testImplementation("junit:junit:4.13.2")
implementation("me.nallar.whocalled:WhoCalled:1.1")
api("dev.minco:java-transformer:1.10.49")
val lombok = "org.projectlombok:lombok:1.18.24"
compileOnly(lombok)
testCompileOnly(lombok)
annotationProcessor(lombok)
testAnnotationProcessor(lombok)
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}
publishing {
repositories {
System.getenv("DEPLOYMENT_REPO_PASSWORD")?.let { deploymentRepoPassword ->
maven {
url = if (releasing) {
name = "minco.dev_releases"
uri(System.getenv("DEPLOYMENT_REPO_URL_RELEASE"))
} else {
name = "minco.dev_snapshots"
uri(System.getenv("DEPLOYMENT_REPO_URL_SNAPSHOT"))
}
credentials {
username = System.getenv("DEPLOYMENT_REPO_USERNAME")
password = deploymentRepoPassword
}
}
}
}
}