-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
73 lines (63 loc) · 1.95 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
plugins {
id("java-library")
id("org.spongepowered.plugin") version "0.9.0"
id("com.github.johnrengelman.shadow") version "4.0.4"
}
group = "dev.flashlabs.cratecrate"
version = "0.0.3"
ext.spongeapiVersion = "7.4.0"
ext.flashlibsVersion = "v0.1.2"
ext.stormVersion = "master-SNAPSHOT"
repositories {
mavenCentral()
maven {
url 'https://jitpack.io'
}
}
dependencies {
implementation("org.spongepowered:spongeapi:${spongeapiVersion}")
implementation("com.github.Flash-Labs:FlashLibs:${flashlibsVersion}")
implementation("com.github.WillBAnders:Storm:${stormVersion}")
}
//Sets plugin metadata through Gradle build instead of the @Plugin annotation.
sponge {
plugin {
meta {
name = "CrateCrate"
description = "The cratest crate plugin of all time"
url = "https://github.com/flash-labs/CrateCrate"
dependencies {
flashlibs {
version = flashlibsVersion
}
}
}
}
}
shadowJar {
dependencies {
include dependency("com.github.WillBAnders:Storm:${stormVersion}")
}
relocate("dev.willbanders.storm", "${project.group}.storm")
version = "v$version"
classifier = ""
}
//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 (shadowJar, sourcesJar, javadocJar) into project.file("releases/${version}")
}
build.dependsOn(copyJars)