-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
74 lines (62 loc) · 1.62 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
plugins {
`java-library`
`maven-publish`
jacoco
}
group = "dev.emortal.api"
version = "1.1.1"
repositories {
mavenCentral()
}
dependencies {
api("org.slf4j:slf4j-api:2.0.13")
api("org.jetbrains:annotations:24.1.0")
implementation("org.jgrapht:jgrapht-core:1.5.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.2")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withSourcesJar()
withJavadocJar()
}
tasks {
test {
useJUnitPlatform()
}
jacocoTestReport {
dependsOn(test)
}
}
publishing {
repositories {
maven {
name = "development"
url = uri("https://repo.emortal.dev/snapshots")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_SECRET")
}
}
maven {
name = "release"
url = uri("https://repo.emortal.dev/releases")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_SECRET")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "dev.emortal.api"
artifactId = "module-system"
val commitHash = System.getenv("COMMIT_HASH_SHORT")
val releaseVersion = System.getenv("RELEASE_VERSION")
version = commitHash ?: releaseVersion ?: "local"
from(components["java"])
}
}
}