80 lines
1.7 KiB
Groovy
80 lines
1.7 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'eclipse'
|
|
|
|
version = '0.0.1'
|
|
archivesBaseName = 'brigadier'
|
|
group = 'com.mojang'
|
|
|
|
sourceCompatibility = 1.6
|
|
|
|
test {
|
|
testLogging {
|
|
events "failed", "skipped"
|
|
showStandardStreams true
|
|
showExceptions true
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "http://s3.amazonaws.com/Minecraft.Download/libraries"
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.google.code.findbugs:jsr305:2.0.1'
|
|
compile 'com.google.guava:guava:17.0'
|
|
compile 'org.apache.commons:commons-lang3:3.3.2'
|
|
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:17.0'
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
events "failed", "skipped"
|
|
showStandardStreams true
|
|
showExceptions true
|
|
}
|
|
}
|
|
|
|
artifacts {
|
|
archives jar
|
|
archives sourcesJar
|
|
}
|
|
|
|
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: groovy.io.FileType.FILES, nameFilter: ~/.*\.(xml|xml\.sha1|md5)$/) {
|
|
it.delete()
|
|
}
|
|
}
|
|
}
|
|
|
|
clean << {
|
|
repoDir.deleteDir()
|
|
}
|