forked from Lenni0451/LambdaEvents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
101 lines (87 loc) · 2.92 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
plugins {
id "java-library"
id "maven-publish"
id "signing"
id "me.champeau.jmh" version "0.7.0"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
compileJava.options.encoding = compileTestJava.options.encoding = javadoc.options.encoding = "UTF-8"
archivesBaseName = project.maven_name
group = project.maven_group
version = project.maven_version
repositories {
mavenCentral()
}
dependencies {
implementation "com.google.code.findbugs:jsr305:3.0.2"
jmh "org.openjdk.jmh:jmh-core:1.36"
jmh "org.openjdk.jmh:jmh-generator-annprocess:1.36"
jmhAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:1.36"
}
java {
withSourcesJar()
withJavadocJar()
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
repositories {
maven {
name = "reposilite"
def releasesUrl = "https://maven.lenni0451.net/releases"
def snapshotsUrl = "https://maven.lenni0451.net/snapshots"
url = project.maven_version.endsWith("SNAPSHOT") ? snapshotsUrl : releasesUrl
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.maven_version.endsWith("SNAPSHOT") ? snapshotsUrl : releasesUrl
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
publications {
maven(MavenPublication) {
artifactId = project.maven_name
groupId = project.maven_group
version = project.maven_version
from components.java
pom {
name = rootProject.name
description = "A template for gradle projects"
url = "https://github.com/Lenni0451/GradleTemplate"
licenses {
license {
name = "MIT License"
url = "https://github.com/Lenni0451/GradleTemplate/blob/main/LICENSE"
}
}
developers {
developer {
id = "Lenni0451"
}
}
scm {
connection = "scm:git:git://github.com/Lenni0451/GradleTemplate.git"
developerConnection = "scm:git:ssh://github.com/Lenni0451/GradleTemplate.git"
url = "github.com/Lenni0451/GradleTemplate"
}
}
}
}
}
signing {
sign configurations.archives
sign publishing.publications.maven
}
project.tasks.withType(PublishToMavenRepository).forEach {
it.dependsOn(project.tasks.withType(Sign))
}