apply plugin: 'java' apply plugin: 'idea' apply plugin: 'maven' apply plugin: 'eclipse' version = '0.0.1' archivesBaseName = 'minecraft-commands' 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' testCompile 'junit:junit-dep:4.10' testCompile 'org.hamcrest:hamcrest-library:1.2.1' testCompile 'org.mockito:mockito-core:1.8.5' } task sourcesJar(type: Jar) { classifier = 'sources' from sourceSets.main.allSource } artifacts { archives jar archives sourcesJar } def repoDir = new File(projectDir, "repo") repoDir.mkdirs() uploadArchives { repositories { mavenDeployer { repository(url: "file://" + repoDir.absolutePath) pom.project { description 'Minecraft Command Handler' url 'http://github.com/Mojang/minecraft-commands' } } } 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() }