-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
96 lines (81 loc) · 2.56 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
plugins {
id 'java'
id 'java-library'
id 'signing'
id 'maven-publish'
id 'net.kyori.indra.licenser.spotless' version '2.2.0'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
group 'dev.vankka'
version '2.0.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
api 'net.kyori:adventure-api:4.9.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation 'net.kyori:adventure-text-serializer-plain:4.9.2'
}
test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
indraSpotlessLicenser {
licenseHeaderFile(rootProject.file('buildscript/LICENSE_HEADER'))
newLine(true)
property('inception', '2021')
property('year_now', String.valueOf(Calendar.getInstance().get(Calendar.YEAR)))
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = project.name
packaging = 'jar'
description = 'An alternative input format for Adventure'
url = 'https://github.com/Vankka/EnhancedLegacyText'
scm {
connection = 'scm:git:https://github.com/Vankka/EnhancedLegacyText.git'
developerConnection = 'scm:git:https://github.com/Vankka/EnhancedLegacyText.git'
url = 'https://github.com/Vankka/DependencyDownload'
}
licenses {
license {
name = 'MIT License'
url = 'https://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'Vankka'
}
}
}
}
}
}
if (System.getenv('SIGNING_KEY') != null || project.hasProperty("signing.keyId")) {
signing {
sign publishing.publications.maven
def key = System.getenv('SIGNING_KEY')
if (key != null) {
useInMemoryPgpKeys(key, System.getenv('SIGNING_KEY_PASS'))
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri('https://s01.oss.sonatype.org/service/local/'))
snapshotRepositoryUrl.set(uri('https://s01.oss.sonatype.org/content/repositories/snapshots/'))
packageGroup = rootProject.group
}
}
}