forked from bonn2/BigDoorsPhysics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
86 lines (74 loc) · 2.22 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
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
allprojects {
apply plugin: 'java'
group = 'net.bonn2'
version = '2.4.2'
repositories {
mavenCentral()
maven {
name 'spigot'
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'papermc-repo'
url = 'https://repo.papermc.io/repository/maven-public/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
maven {
name = 'eldonexus'
url = 'https://eldonexus.de/repository/maven-public/'
}
maven {
name = 'dmulloy2-repo'
url = 'https://repo.dmulloy2.net/repository/public/'
}
}
}
dependencies {
implementation project(':versions')
implementation 'org.jetbrains:annotations:24.0.1'
shadow 'org.reflections:reflections:0.10.2'
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
compileOnly 'nl.pim16aap2:BigDoors:0.1.8.46'
compileOnly 'com.comphenix.protocol:ProtocolLib:5.0.0'
}
java {
sourceCompatibility = "11"
targetCompatibility = "11"
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
def mainProjects = [':', ':versions', ':versions:v1_16_3', ':versions:v1_19', ':versions:v1_19_3']
tasks.register('oneJar', Jar) {
archiveClassifier = 'versioned'
dependsOn mainProjects.collect { it + ":compileJava" }
from files(mainProjects.collect { project(it).sourceSets.main.output })
}
shadowJar {
archiveClassifier = 'shadowed'
exclude 'javax/**', 'org/jetbrains/**', 'org/slf4j/**'
relocate 'org.reflections', 'net.bonn2.bigdoorsphysics.relocated.org.reflections'
relocate 'javassist', 'net.bonn2.bigdoorsphysics.relocated.javassist'
minimize()
}
tasks.register('mergeJars', Jar) {
dependsOn 'shadowJar', 'oneJar'
duplicatesStrategy = 'exclude'
from zipTree(shadowJar.archivePath)
from zipTree(oneJar.archivePath)
archiveClassifier = ''
}
tasks.named('build') {
finalizedBy mergeJars
}