-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
108 lines (89 loc) · 2.31 KB
/
Copy pathbuild.gradle
File metadata and controls
108 lines (89 loc) · 2.31 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
plugins {
id 'java-library'
id 'maven-publish'
}
repositories {
mavenLocal()
mavenCentral()
maven {
url = 'https://www.jitpack.io'
}
maven {
url = 'https://repo.stardevllc.com/releases'
}
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
}
maven {
url = 'https://repo.codemc.org/repository/maven-public/'
}
}
group = 'com.stardevllc'
version = '0.6.1'
publishing {
repositories {
maven {
name="stardev"
url="https://repo.stardevllc.com/releases"
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
publications {
maven(MavenPublication) {
from components.java
}
}
}
processResources {
filesMatching("*.yml") {
expand(project.properties)
}
}
dependencies {
compileOnly "org.spigotmc:spigot-api:${spigotVersion}"
compileOnly "me.clip:placeholderapi:${papiVersion}"
compileOnly "de.tr7zw:item-nbt-api-plugin:${nbtapiVersion}"
compileOnly "com.stardevllc:StarCore:${starcoreVersion}"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
tasks.named("javadoc", Javadoc) {
subprojects { subproject ->
source += subproject.sourceSets.main.allJava
}
// source += project.sourceSets.main.allJava
subprojects { subproject ->
classpath += subproject.sourceSets.main.compileClasspath
classpath += subproject.sourceSets.main.runtimeClasspath
}
// classpath += project.sourceSets.main.compileClasspath
}
tasks.named('sourcesJar', Jar) {
archiveClassifier.set("sources")
// from sourceSets.main.allSource
subprojects { subproject ->
from subproject.sourceSets.main.allSource
}
exclude('plugin.yml')
}
tasks.compileJava.dependsOn(clean)
tasks.build.finalizedBy(publishToMavenLocal)
tasks.withType(PublishToMavenLocal).configureEach {
dependsOn(javadocJar)
dependsOn(sourcesJar)
}
tasks.withType(PublishToMavenRepository).configureEach {
dependsOn(javadocJar)
dependsOn(sourcesJar)
}