-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
46 lines (37 loc) · 1.27 KB
/
build.gradle
File metadata and controls
46 lines (37 loc) · 1.27 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
plugins {
id "java-library"
id "org.spongepowered.plugin" version "0.9.0"
}
group "dev.flashlabs.flashlibs"
version "0.1.2"
ext.spongeapiVersion = "7.4.0"
dependencies {
implementation "org.spongepowered:spongeapi:$spongeapiVersion"
testImplementation "org.junit.jupiter:junit-jupiter:5.5.1"
test.useJUnitPlatform()
}
//Sets plugin metadata through Gradle build instead of the @Plugin annotation.
sponge.plugin.meta {
description = "A library for Sponge development"
url = "https://github.com/Flash-Labs/FlashLibs"
}
jar.version = "v$version"
//Produces a sources jar for providing source to consumers.
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
version = "v$version"
classifier = "sources"
}
//Produces a javadoc jar for rendering javadoc documentation.
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
version = "v$version"
classifier = "javadoc"
}
//Includes custom jars in published artifacts for external access.
artifacts.archives (sourcesJar, javadocJar)
//Copies produced jar files into a project folder for releases by version.
task copyJars(type: Copy) {
from (jar, sourcesJar, javadocJar) into project.file("releases/v${version}")
}
build.dependsOn(copyJars)