-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
121 lines (104 loc) · 3.38 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
plugins {
id 'java'
id "com.github.johnrengelman.shadow" version "7.1.0"
id "io.freefair.aggregate-javadoc" version "6.5.0.3"
id "io.freefair.aggregate-javadoc-jar" version "6.6.3"
id 'maven-publish'
}
group 'me.epic'
version '1.4.2-SNAPSHOT'
description "Epic's Spigot Lib"
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
jar.enabled = false
subprojects {
java {
withSourcesJar()
withJavadocJar()
}
tasks.register('javadocJar', Jar) {
dependsOn javadoc
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
def javadocConfig = {
options {
links(
'https://docs.oracle.com/en/java/javase/16/docs/api/',
'https://hub.spigotmc.org/javadocs/spigot/',
'https://javadoc.io/doc/org.jetbrains/annotations/19.0.0',
'https://repo.jeff-media.com/javadoc/public/com/jeff_media/MorePersistentDataTypes/2.4.0/raw/'
)
tags(
"nms:a:Requires NMS"
)
addStringOption('Xdoclint:none', '-quiet')
}
}
javadoc { configure javadocConfig }
aggregateJavadoc { configure javadocConfig }
}
allprojects {
repositories {
mavenCentral()
maven {
url = 'https://hub.jeff-media.com/nexus/repository/jeff-media-public/'
}
maven {
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
}
}
dependencies {
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
implementation project(':epicspigotlib-core')
implementation project(path: ':spigot-1_18_R1', configuration: 'reobf')
implementation project(path: ':spigot-1_18_R2', configuration: 'reobf')
implementation project(path: ':spigot-1_19_R1', configuration: 'reobf')
implementation project(path: ':spigot-1_19_R2', configuration: 'reobf')
implementation project(path: ':spigot-1_19_R3', configuration: 'reobf')
implementation project(path: ':spigot-1_20_R1', configuration: 'reobf')
}
shadowJar {
archiveClassifier.set('')
relocate 'com.jeff_media.morepersistentdatatypes', 'me.epic.morepersistentdatatypes'
}
tasks.register('combineSourcesJar', Jar) {
archiveClassifier.set("sources")
// Collect all source directories from submodules
def packages = subprojects.collect { project ->
project.file("src/main/java")
}
// Include the source files in the combined sources JAR
from(packages) {
include '**/*.java'
}
}
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
publication.artifact(aggregateJavadocJar)
publication.artifact(combineSourcesJar)
}
}
repositories {
maven {
credentials {
username = "epic"
password = System.getenv("EPICREPO_SECRET")
}
url = 'https://repo.epicebic.xyz/public/'
}
maven {
credentials {
username = 'the-epic'
password = System.getenv("REPSY_SECRET")
}
url = 'https://repo.repsy.io/mvn/the-epic/epicspigotlib'
}
}
}