brigadier/build.gradle

92 lines
1.8 KiB
Groovy
Raw Normal View History

2017-06-21 08:29:26 -04:00
import groovy.io.FileType
apply plugin: 'java-library'
2014-09-15 06:03:39 -04:00
apply plugin: 'maven'
version = '0.1.27'
2014-09-15 06:03:39 -04:00
group = 'com.mojang'
task wrapper(type: Wrapper) {
gradleVersion = '4.0'
2014-09-15 06:03:39 -04:00
}
repositories {
maven {
url "https://libraries.minecraft.net"
2014-09-15 06:03:39 -04:00
}
mavenCentral()
}
dependencies {
2017-06-21 08:21:15 -04:00
api 'com.google.guava:guava:21.0'
2018-05-02 05:24:29 -04:00
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'
2014-09-15 06:03:39 -04:00
}
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']
}
}
}
2014-09-15 06:03:39 -04:00
artifacts {
archives jar
archives sourcesJar
}
test {
testLogging {
events "failed", "skipped"
2017-06-21 08:36:17 -04:00
showStandardStreams = true
showExceptions true
}
}
2014-09-15 06:03:39 -04:00
def repoDir = new File(projectDir, "repo")
repoDir.mkdirs()
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://" + repoDir.absolutePath)
pom.project {
2014-10-02 07:00:29 -04:00
description 'Command Registration & Dispatch System'
url 'http://github.com/Mojang/brigadier'
2014-09-15 06:03:39 -04:00
}
}
}
doLast {
// Purge all annoying files that arent needed
2017-06-21 08:29:26 -04:00
repoDir.traverse(type: FileType.FILES, nameFilter: ~/.*\.(xml|xml\.sha1|md5)$/) {
2014-09-15 06:03:39 -04:00
it.delete()
}
}
}
clean.doLast {
2014-09-15 06:03:39 -04:00
repoDir.deleteDir()
}