-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
132 lines (115 loc) · 3.8 KB
/
build.gradle
File metadata and controls
132 lines (115 loc) · 3.8 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
123
124
125
126
127
128
129
130
131
132
plugins {
id 'java'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "7.1.2"
}
group = 'com.github.getplusm'
description = 'ProtectionBlocks'
version = '2.0.1'
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
java.sourceCompatibility = JavaVersion.VERSION_17
repositories {
mavenLocal()
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
// PAPI
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
// Holographic Displays
maven { url = 'https://repo.codemc.io/repository/maven-public/' }
maven { url = 'https://jitpack.io' }
// Fancy
maven { url = 'https://repo.fancyplugins.de/releases' }
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT'
// holo
compileOnly 'me.filoghost.holographicdisplays:holographicdisplays-api:3.0.0'
compileOnly 'com.github.decentsoftware-eu:decentholograms:2.8.3'
compileOnly 'de.oliver:FancyHolograms:2.2.0'
// LP
compileOnly 'net.luckperms:api:5.4'
// PAPI
compileOnly 'me.clip:placeholderapi:2.10.10'
// Engine
compileOnly 'com.github.getplusm:PLAZMER-ENGINE:2.4.12'
compileOnly 'com.github.ben-manes.caffeine:caffeine:3.1.8'
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
}
shadowJar {
archiveClassifier.set(null)
configurations = [project.configurations.runtimeClasspath, project.configurations.shadow]
archiveFileName.set(project.description + '-' + project.version + '.jar')
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
javadoc {
options {
encoding = 'UTF-8'
charSet = 'UTF-8'
version = true
}
}
tasks.register('javadocJar', Jar) {
dependsOn javadoc
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
tasks.register('sourcesJar', Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId rootProject.group
artifactId "protectionblocks"
version rootProject.version
def compileClasspathDependencies = configurations.compileClasspath.allDependencies
compileClasspathDependencies = compileClasspathDependencies
.findAll { !(it instanceof ProjectDependency) }
pom {
withXml {
def dependenciesNode = asNode().children().find {
it.name().getQualifiedName().equals('dependencies')
}
if (dependenciesNode == null) dependenciesNode = asNode().appendNode('dependencies')
compileClasspathDependencies.each { dependency ->
dependenciesNode.appendNode('dependency').with {
appendNode('groupId', dependency.getGroup())
appendNode('artifactId', dependency.getName())
appendNode('version', dependency.getVersion())
appendNode('scope', 'compile')
}
}
}
}
artifact sourcesJar
artifact javadocJar
repositories {
maven {
name = 'jitpack'
url = 'https://jitpack.io'
}
}
}
}
}