-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
93 lines (80 loc) · 2.31 KB
/
build.gradle.kts
File metadata and controls
93 lines (80 loc) · 2.31 KB
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
plugins {
id("base")
id("java")
id("java-library")
id("maven-publish")
id("dev.minco.gradle.defaults-plugin") version "0.2.33"
id("org.shipkit.shipkit-auto-version") version "1.1.19"
id("org.shipkit.shipkit-changelog") version "1.1.15"
id("org.shipkit.shipkit-github-release") version "1.1.15"
}
apply(from = "properties.gradle")
apply(from = "$rootDir/gradle/shipkit.gradle")
val releasing = project.hasProperty("releasing")
if (!releasing) {
version = "$version-SNAPSHOT"
}
repositories {
exclusiveContent {
forRepository {
maven { url = uri("https://maven.minco.dev/") }
}
filter {
includeGroupByRegex("dev\\.minco.*")
includeGroupByRegex("me\\.nallar.*")
includeGroupByRegex("org\\.minimallycorrect.*")
}
}
mavenCentral()
}
minimallyCorrectDefaults.languageLevel = JavaVersion.VERSION_11
minimallyCorrectDefaults.configureProject(project)
dependencies {
implementation("com.github.javaparser:javaparser-core:3.23.0")
api("com.google.code.findbugs:jsr305:3.0.2")
api("org.jetbrains:annotations:22.0.0")
val asmVer = "9.2"
implementation("org.ow2.asm:asm:$asmVer")
implementation("org.ow2.asm:asm-util:$asmVer")
implementation("org.ow2.asm:asm-tree:$asmVer")
val lombok = "org.projectlombok:lombok:1.18.20"
compileOnly(lombok)
testCompileOnly(lombok)
annotationProcessor(lombok)
testAnnotationProcessor(lombok)
testImplementation(platform("org.junit:junit-bom:5.8.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-Xlint:-options")
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
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
}
}
}
}
}