forked from Mojang/brigadier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
92 lines (78 loc) · 1.82 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import groovy.io.FileType
apply plugin: 'java-library'
apply plugin: 'maven'
version = '0.1.24'
group = 'com.mojang'
task wrapper(type: Wrapper) {
gradleVersion = '4.0'
}
repositories {
maven {
url "https://libraries.minecraft.net"
}
mavenCentral()
}
dependencies {
api 'com.google.guava:guava:21.0'
testCompile 'junit:junit-dep:4.10'
testCompile 'org.hamcrest:hamcrest-library:1.2.1'
testCompile 'org.mockito:mockito-core:1.8.5'
testCompile 'com.google.guava:guava-testlib:21.0'
testCompile 'org.openjdk.jmh:jmh-core:1.19'
testCompile 'org.openjdk.jmh:jmh-generator-annprocess:1.19'
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources']
}
}
test {
java {
srcDirs = ['src/test/java']
}
resources {
srcDirs = ['src/test/resources']
}
}
}
artifacts {
archives jar
archives sourcesJar
}
test {
testLogging {
events "failed", "skipped"
showStandardStreams = true
showExceptions true
}
}
def repoDir = new File(projectDir, "repo")
repoDir.mkdirs()
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://" + repoDir.absolutePath)
pom.project {
description 'Command Registration & Dispatch System'
url 'http://github.com/Mojang/brigadier'
}
}
}
doLast {
// Purge all annoying files that arent needed
repoDir.traverse(type: FileType.FILES, nameFilter: ~/.*\.(xml|xml\.sha1|md5)$/) {
it.delete()
}
}
}
clean.doLast {
repoDir.deleteDir()
}