-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (90 loc) · 3.36 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
plugins {
id 'idea'
}
allprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
group = 'org.mythicprojects.commons'
version = '0.19.0-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
compileJava.options.encoding = 'UTF-8'
}
subprojects {
repositories {
mavenCentral()
// Mythic Projects
maven { url "https://repo.mythicprojects.org/releases" }
maven { url "https://repo.mythicprojects.org/snapshots" }
// Paper
maven { url "https://repo.papermc.io/repository/maven-public" }
}
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/Mythic-Projects/MythicCommons"
name = project.name
description = "MythicCommons is general purpose library for Java and Minecraft projects."
developers {
developer {
id = "peridot"
name = "Peridot"
email = "peridot491@pm.me"
}
}
scm {
url = "https://github.com/Mythic-Projects/MythicCommons.git"
connection = "git@github.com:Mythic-Projects/MythicCommons.git"
developerConnection = "git@github.com:Mythic-Projects/MythicCommons.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
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 "mythicprojects-repo"
url "https://repo.mythicprojects.org/${version.toString().endsWith('SNAPSHOT') ? 'snapshots' : 'releases'}"
credentials {
username = System.getenv("MAVEN_NAME")
password = System.getenv("MAVEN_TOKEN")
}
}
}
}
}
idea {
project {
jdkName = "17"
}
}