-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbuild.gradle
More file actions
122 lines (109 loc) · 3.17 KB
/
build.gradle
File metadata and controls
122 lines (109 loc) · 3.17 KB
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
/*
* Copyright 2026 Benjamin Martin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'java'
id 'maven-publish'
id "com.gradleup.shadow" version "9.0.0-rc1"
}
group = 'net.lapismc'
archivesBaseName = "AFKPlus"
version = '3.5.2'
description = 'AFK for professional servers'
sourceCompatibility = '21'
targetCompatibility = '21'
defaultTasks 'clean', 'build', 'shadowJar'
repositories {
mavenCentral()
//Paper Repo
maven {
url = 'https://repo.papermc.io/repository/maven-public/'
}
//Personal Repo
maven {
name = "lapismc-repo"
url = "https://maven.lapismc.net/releases/"
}
//Essentials Repo
maven {
url = uri('https://repo.essentialsx.net/releases/')
}
//DiscordSRV Repo
maven {
url 'https://nexus.scarsz.me/content/groups/public/'
}
}
dependencies {
implementation 'net.lapismc:LapisCore:1.13.11'
implementation 'org.ocpsoft.prettytime:prettytime:5.0.8.Final'
compileOnly 'io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT'
compileOnly('net.essentialsx:EssentialsX:2.20.1') {
//This exclusion is so we can use the paper api without class collisions
exclude group: "org.spigotmc", module: "spigot-api"
}
compileOnly 'net.luckperms:api:5.4'
compileOnly 'com.discordsrv:discordsrv:1.29.0'
}
processResources {
filter {
it.replace('${project.version}', project.getVersion())
}
}
shadowJar {
archiveFileName.set(archivesBaseName + "-" + project.getVersion() + ".jar")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude 'javax/**'
relocate("org.ocpsoft.prettytime", "net.lapismc.afkplus.util.prettytime")
relocate("net.lapismc.lapiscore", "net.lapismc.afkplus.util.core")
}
javadoc {
source = sourceSets.main.allJava
include("net/lapismc/afkplus/api/*.java")
include("net/lapismc/afkplus/playerdata/*.java")
}
tasks.register('javadocJar', Jar) {
archiveClassifier.set('javadoc')
from javadoc
}
tasks.register('sourcesJar', Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar, shadowJar
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
shadow(MavenPublication) {
from components.java
}
}
repositories {
maven {
url "https://reposilite.dnablue2112.com/releases/"
credentials {
username project.findProperty('reposiliteUser') ?: ""
password project.findProperty('reposilitePassword') ?: ""
}
}
}
}