-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
58 lines (49 loc) · 1.22 KB
/
build.gradle.kts
File metadata and controls
58 lines (49 loc) · 1.22 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
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "7.0.0"
}
group = "org.semgus"
version = "1.1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://jitpack.io") {
name = "Jitpack"
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
dependencies {
implementation("com.github.phantamanta44:jsr305:1.0.1")
implementation("com.googlecode.json-simple:json-simple:1.1.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}
tasks.getByName<Jar>("jar") {
manifest {
attributes(
"Main-Class" to "org.semgus.java.Main"
)
}
}
tasks.shadowJar {
configurations = listOf(project.configurations.getByName("runtimeClasspath")) // Include runtime dependencies in shadow JAR
manifest {
attributes(
"Main-Class" to "org.semgus.java.Main"
)
}
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "semgus-java"
from(components["java"])
}
}
}