-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
67 lines (57 loc) · 1.5 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
plugins {
id 'java'
id 'net.ellune.blossom' version '1.0.1'
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
mavenCentral()
maven {
name = 'jitpack'
url = 'https://jitpack.io'
}
maven {
name = 'sponge'
url = 'http://repo.spongepowered.org/maven'
}
}
blossom {
String path = 'src/main/java/io/github/myessentials/mytown2/PluginInfo.java'
replaceToken '@project.version@', project.version, path
replaceToken '@project.id@', project.id, path
replaceToken '@project.name@', project.name, path
replaceToken '@project.description@', project.description, path
}
configurations {
shade
compile.extendsFrom shade
}
dependencies {
compile 'org.spongepowered:spongeapi:4.1.0'
shade 'com.github.Flibio:Updatifier:v1.4.0:api'
}
jar {
manifest {
attributes 'Implementation-Title': archivesBaseName, 'Implementation-Version': version
}
configurations.shade.copyRecursive().setTransitive(false).each { artifact -> from (zipTree(artifact))}
}
task apiJar(type: Jar) {
classifier = 'api'
from sourceSets.main.output
include 'io/github/myessentials/mytown2/api/**/*'
}
task apiSourceJar(type: Jar) {
classifier = 'api-sources'
from sourceSets.main.allJava
include 'io/github/myessentials/mytown2/api/**/*'
}
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
}
artifacts {
archives apiJar
archives apiSourceJar
archives sourceJar
}