-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
123 lines (107 loc) · 3.37 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
plugins {
id "java"
id "maven-publish"
id "signing"
id "me.champeau.jmh" version "0.7.2"
}
base {
group = project.maven_group
archivesName = project.maven_name
version = project.maven_version
description = project.maven_description
}
repositories {
mavenCentral()
}
dependencies {
testImplementation platform("org.junit:junit-bom:5.11.4")
testImplementation "org.junit.jupiter:junit-jupiter"
jmh "org.openjdk.jmh:jmh-core:1.37"
jmh "org.openjdk.jmh:jmh-generator-annprocess:1.37"
jmhAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:1.37"
}
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
jar {
// Rename the project's license file to LICENSE_<project_name> to avoid conflicts
from("LICENSE") {
rename {
"${it}_${project.archivesBaseName}"
}
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
maxParallelForks Runtime.runtime.availableProcessors()
}
publishing {
repositories {
maven {
name = "reposilite"
url = "https://maven.lenni0451.net/" + (project.version.endsWith("SNAPSHOT") ? "snapshots" : "releases")
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
maven {
name = "ossrh"
def releasesUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = project.version.endsWith("SNAPSHOT") ? snapshotsUrl : releasesUrl
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = project.archivesBaseName
version = project.version
from components.java
pom {
name = artifactId
description = project.description
url = "https://github.com/FlorianMichael/DietrichEvents2"
licenses {
license {
name = "Apache-2.0 license"
url = "https://github.com/FlorianMichael/DietrichEvents2/blob/main/LICENSE"
}
}
developers {
developer {
id = "FlorianMichael"
name = "EnZaXD"
email = "florian.michael07@gmail.com"
}
}
scm {
connection = "scm:git:git://github.com/FlorianMichael/DietrichEvents2.git"
developerConnection = "scm:git:ssh://github.com/FlorianMichael/DietrichEvents2.git"
url = "github.com/FlorianMichael/DietrichEvents2"
}
}
}
}
}
signing {
setRequired false
sign configurations.archives
sign publishing.publications.maven
}
project.tasks.withType(PublishToMavenRepository).forEach {
it.dependsOn(project.tasks.withType(Sign))
}