60 lines
1.3 KiB
Groovy
60 lines
1.3 KiB
Groovy
apply plugin: 'maven'
|
|
apply plugin: 'java'
|
|
apply plugin: 'eclipse'
|
|
|
|
repositories {
|
|
maven {
|
|
url "https://libraries.minecraft.net/"
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
group = 'net.minecraft'
|
|
archivesBaseName = 'launchwrapper'
|
|
version = '1.11'
|
|
sourceCompatibility = 1.6
|
|
|
|
dependencies {
|
|
compile 'net.sf.jopt-simple:jopt-simple:4.5'
|
|
compile 'org.ow2.asm:asm-debug-all:5.0.3'
|
|
compile 'org.lwjgl.lwjgl:lwjgl:2.9.1'
|
|
compile 'org.apache.logging.log4j:log4j-core:2.0-beta9'
|
|
compile 'org.apache.logging.log4j:log4j-api:2.0-beta9'
|
|
}
|
|
|
|
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 LegacyLauncher'
|
|
url 'http://github.com/Mojang/LegacyLauncher'
|
|
}
|
|
}
|
|
}
|
|
|
|
doLast {
|
|
// Purge all annoying files that arent needed
|
|
repoDir.traverse(type: groovy.io.FileType.FILES, nameFilter: ~/.*\.(xml(?:\.sha1)?|md5)$/) {
|
|
it.delete()
|
|
}
|
|
}
|
|
}
|
|
|
|
clean << {
|
|
repoDir.deleteDir()
|
|
}
|