-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
150 lines (137 loc) · 4.68 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.guardsquare:proguard-gradle:7.1.0'
}
}
plugins {
id 'java'
id 'io.freefair.lombok' version '5.2.1'
id "com.github.johnrengelman.shadow" version "7.0.0"
}
group 'com.volmit'
version '1.0'
def apiVersion = '1.17'
def name = getRootProject().getName() // See settings.gradle
def main = 'com.volmit.shapedportals.ShapedPortals'
// You need to also set command usage, aliases and description in src/main/resources/plugin.yml
// ADD YOURSELF AS A NEW LINE IF YOU WANT YOUR OWN BUILD TASK GENERATED
// ==============================================================
registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins', name)
registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/server/plugins', name)
// ==============================================================
def dependsDir = "${buildDir}/libs/dependencies/" as String
def registerCustomOutputTask(name, path, plugin) {
tasks.register('build' + name, Copy) {
group('development')
outputs.upToDateWhen { false }
dependsOn ':shadowJar'
from(file('build/libs/' + plugin + '-' + version + '-all.jar'))
into(file(path))
rename { String fileName ->
fileName.replace(plugin + '-' + version + '-all.jar', plugin + ".jar")
}
}
}
file(jar.archiveFile.get().getAsFile().getParentFile().getParentFile().getParentFile().getAbsolutePath() + '/build/resources/main/plugin.yml').delete()
shadowJar
{
minimize()
append("plugin.yml")
relocate 'com.dfsek.paralithic', 'com.volmit.iris.util.paralithic'
relocate 'io.papermc.lib', 'com.volmit.iris.util.paper'
dependencies {
include(dependency('io.papermc:paperlib'))
include(dependency('com.dfsek:Paralithic'))
include(dependency('net.kyori:'))
}
}
processResources {
filesMatching('**/plugin.yml') {
expand(
'name': name.toString(),
'version': version.toString(),
'main': main.toString(),
'apiversion': apiVersion.toString()
)
}
}
repositories {
maven {
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
content {
includeGroup 'org.spigotmc'
}
}
maven {
url 'https://papermc.io/repo/repository/maven-public/'
content {
includeGroup 'io.papermc'
}
}
maven {
url 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
content {
includeGroup 'me.clip'
}
}
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
content {
includeGroup 'net.kyori'
}
}
maven {
url 'https://repo.jeff-media.de/maven2'
content {
includeGroup 'de.jeff_media'
}
}
maven { url 'https://jitpack.io' }
maven {
url 'https://repo.codemc.io/repository/maven-releases'
content {
includeGroup 'com.dfsek'
}
}
mavenCentral()
mavenLocal()
maven {
allowInsecureProtocol true
url 'http://archive.arcane.art/repository/arcane'
content {
includeGroup 'org.bukkit.craftbukkit'
includeGroup 'io.th0rgal'
}
}
// Uncomment this line if the build is failing because of missing dependencies
// Its slow but it will resolve any cached dependencies until we can find an alternative repo
// maven { allowInsecureProtocol true, url 'http://archive.arcane.art/repository/arcane'}
}
dependencies {
// Provided or Classpath
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
implementation 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
// Dynamically Loaded
implementation 'com.google.code.gson:gson:2.8.7'
}