-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
129 lines (112 loc) · 4.24 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
124
125
126
127
128
129
allprojects {
apply plugin: "java-library"
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: "checkstyle"
base {
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
compileJava.options.encoding = compileTestJava.options.encoding = javadoc.options.encoding = "UTF-8"
archivesName = project.maven_name ?: rootProject.maven_name
group = project.maven_group ?: rootProject.maven_group
version = project.maven_version ?: rootProject.maven_version
}
repositories {
mavenCentral()
}
dependencies {
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
compileOnly(annotationProcessor("org.projectlombok:lombok:1.18.36"))
testCompileOnly "com.google.code.findbugs:jsr305:3.0.2"
testImplementation(platform("org.junit:junit-bom:5.11.4"))
testImplementation "org.junit.jupiter:junit-jupiter"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
testCompileOnly(testAnnotationProcessor("org.projectlombok:lombok:1.18.36"))
}
java {
withSourcesJar()
withJavadocJar()
}
artifacts {
archives javadocJar, sourcesJar
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
maxParallelForks Runtime.runtime.availableProcessors()
}
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 ?: rootProject.maven_name
groupId = rootProject.maven_group
version = rootProject.maven_version
from components.java
pom {
name = rootProject.name
description = rootProject.maven_description
url = "https://github.com/" + rootProject.github_repo
licenses {
license {
name = "MIT License"
url = "https://github.com/" + rootProject.github_repo + "/blob/main/LICENSE"
}
}
developers {
developer {
id = "Lenni0451"
}
}
scm {
connection = "scm:git:git://github.com/" + rootProject.github_repo + ".git"
developerConnection = "scm:git:ssh://github.com/" + rootProject.github_repo + ".git"
url = "github.com/" + rootProject.github_repo
}
}
}
}
}
checkstyle {
toolVersion = "9.3" //Latest version for Java 8: 9.3
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
}
signing {
setRequired false
sign configurations.archives
sign publishing.publications.maven
}
project.tasks.withType(PublishToMavenRepository).forEach {
it.dependsOn(project.tasks.withType(Sign))
}
build.dependsOn(test)
build.dependsOn(check)
}
dependencies {
api "org.ow2.asm:asm:9.7.1"
api "org.ow2.asm:asm-commons:9.7.1"
api "org.ow2.asm:asm-tree:9.7.1"
api "org.ow2.asm:asm-analysis:9.7.1"
}