-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
123 lines (100 loc) · 3.29 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
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'maven-publish'
id 'java'
}
group = 'net.foulest'
version = '1.1.5'
description = 'PixelAddons'
// Set the project's language level
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
repositories {
// Maven repositories
mavenCentral()
mavenLocal()
// Local libraries
flatDir {
dirs 'libs'
}
maven {
name 'Sonatype Central'
url 'https://oss.sonatype.org/content/repositories/central'
}
maven {
name 'Sonatype Snapshots'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven {
name 'Spigot Snapshots'
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots'
content {
includeGroup 'org.bukkit'
includeGroup 'org.spigotmc'
}
}
}
dependencies {
// Spigot API - necessary for project
// Note: Keep this version at 1.12.2-R0.1-SNAPSHOT
// https://hub.spigotmc.org/nexus/content/repositories/snapshots
compileOnly group: 'org.spigotmc', name: 'spigot-api', version: '1.12.2-R0.1-SNAPSHOT'
// AtomDev - for accessing Minecraft classes; provided in libs
// https://github.com/josephworks/AtomMC/releases/download/v2.1/AtomDev.jar
compileOnly group: 'org.atom', name: 'AtomDev', version: '1.12.2'
// CatServer - for listening to Forge events; provided in libs
// https://catmc.org/download/universal
compileOnly group: 'catserver', name: 'CatServer', version: '1.12.2'
// Pixelmon - for listening to Pixelmon events; provided in libs
// https://reforged.gg (Download 1.12.2)
compileOnly group: 'com.pixelmonmod', name: 'Pixelmon', version: '1.12.2'
// PixelHunt Remastered - for listening to PixelHunt events; provided in libs
// https://pixelmonmod.com/wiki/PixelHunt_Remastered
compileOnly group: 'com.envyful', name: 'PixelHuntRemastered', version: '3.0.2'
// JetBrains Annotations - for code inspection and documentation
// https://mvnrepository.com/artifact/org.jetbrains/annotations
compileOnly group: 'org.jetbrains', name: 'annotations', version: '26.0.2'
// Lombok - for reducing boilerplate code
// https://projectlombok.org
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.36'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.36'
}
tasks {
jar {
archiveFileName.set("${project.name}-${project.version}-default.jar")
}
shadowJar {
archiveFileName.set("${project.name}-${project.version}.jar")
enableRelocation = true
relocationPrefix = 'net.foulest.pixeladdons.shaded'
minimize()
}
compileJava {
dependsOn(clean)
options.encoding = 'UTF-8'
}
build {
dependsOn(shadowJar)
}
processResources {
filesMatching('**/plugin.yml') {
expand(project.properties)
}
}
tasks.register('sourceJar', Jar) {
from sourceSets.main.allJava
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'net.foulest.pixeladdons'
artifactId = project.name
version = project.version
from components.java
}
}
}