-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
84 lines (73 loc) · 2.02 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
plugins {
id("base")
id("java")
id("java-library")
id("maven-publish")
id("dev.minco.gradle.defaults-plugin") version "0.2.62"
id("org.shipkit.shipkit-auto-version") version "1.2.2"
id("org.shipkit.shipkit-changelog") version "1.2.0"
id("org.shipkit.shipkit-github-release") version "1.2.0"
}
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 {
testImplementation("junit:junit:4.13.2")
implementation("com.github.javaparser:javaparser-core:3.25.1")
api("com.google.code.findbugs:jsr305:3.0.2")
api("org.jetbrains:annotations:24.0.1")
val asmVer = "9.4"
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.26"
compileOnly(lombok)
testCompileOnly(lombok)
annotationProcessor(lombok)
testAnnotationProcessor(lombok)
}
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
}
}
}
}
}