-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
106 lines (88 loc) · 3.79 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
plugins {
id 'idea'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
allprojects {
group 'dev.peri.yetanothermessageslibrary'
version '6.8.0-SNAPSHOT'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding = 'UTF-8'
}
subprojects {
repositories {
mavenCentral()
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://repo.papermc.io/repository/maven-public/" }
maven { url "https://storehouse.okaeri.eu/repository/maven-public/" }
maven { url "https://repo.extendedclip.com/content/repositories/placeholderapi/" }
}
java {
withSourcesJar()
withJavadocJar()
}
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
publishing {
publications {
libraries(MavenPublication) {
artifactId = project.name.toLowerCase()
from components.java
pom {
url = "https://github.com/P3ridot/YetAnotherMessagesLibrary"
name = project.name
description = "YetAnotherMessagesLibrary is simple Miecraft Messages Library based on `adventure`. It allows to easily send messages to players with built-in support for localization and placeholders."
developers {
developer {
id = "peridot"
name = "Peridot"
email = "peridot491@pm.me"
}
}
scm {
url = "https://github.com/P3ridot/YetAnotherMessagesLibrary.git"
connection = "git@github.com:P3ridot/YetAnotherMessagesLibrary.git"
developerConnection = "git@github.com:P3ridot/YetAnotherMessagesLibrary.git"
}
licenses {
license {
name = "The MIT License"
url = "http://www.opensource.org/licenses/MIT"
distribution = 'repo'
}
}
}
// Add external repositories to published artifacts
// ~ btw: pls don't touch this
// Original code: https://github.com/FunnyGuilds/FunnyGuilds/blob/master/build.gradle
pom.withXml {
def repositories = asNode().appendNode('repositories')
project.getRepositories().findAll { repo ->
if (repo.getUrl().toString().startsWith('http')) {
def repository = repositories.appendNode('repository')
repository.appendNode('id', repo.getUrl().toString().replace("https://", "").replace("/", "-").replace(".", "-").trim())
repository.appendNode('url', repo.getUrl().toString())
}
}
}
}
}
repositories {
maven {
name "titanvale-repo"
url "https://repo.titanvale.net/${version.toString().endsWith('SNAPSHOT') ? 'snapshots' : 'releases'}"
credentials {
username = System.getenv("MAVEN_NAME")
password = System.getenv("MAVEN_TOKEN")
}
}
}
}
}