-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
87 lines (74 loc) · 2.08 KB
/
build.gradle
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
plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'io.freefair.lombok' version '8.4'
}
group = 'it.fulminazzo'
version = '1.6.4'
repositories {
mavenCentral()
maven { url = "https://repo.fulminazzo.it/releases" }
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
compileOnly 'org.jetbrains:annotations:24.1.0'
implementation 'org.yaml:snakeyaml:2.2'
api 'it.fulminazzo:FulmiCollection:latest.release'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testImplementation 'org.mockito:mockito-core:4.11.0'
}
test {
useJUnitPlatform()
}
shadowJar {
exclude("META-INF/**")
archiveFileName = "${project.name}-${project.version}.jar"
manifest {
attributes ("Manifest-Version": "${project.version}")
}
minimize()
}
jar {
manifest {
attributes(
"Main-Class": "${project.group}.${project.name.toLowerCase()}.YAMLMain",
"Manifest-Version": "${project.version}"
)
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveFileName = "${project.name}-${project.version}-original.jar"
dependsOn(shadowJar)
}
tasks.register('sourcesJar', Jar) {
from sourceSets.main.delombokTask
archiveClassifier = 'sources'
}
tasks.register('javadocJar', Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
repositories {
maven {
url "https://repo.fulminazzo.it/releases"
credentials {
username = System.getenv("REPO_USERNAME")
password = System.getenv("REPO_PASSWORD")
}
authentication {
basic(BasicAuthentication)
}
}
}
}