109 lines
2.3 KiB
Groovy
109 lines
2.3 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'groovy'
|
|
id 'maven'
|
|
id 'maven-publish'
|
|
id 'idea'
|
|
id 'eclipse'
|
|
}
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
group = 'net.fabricmc'
|
|
archivesBaseName = project.name
|
|
version = '0.0.12-SNAPSHOT'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name "Modmuss"
|
|
url 'http://maven.modmuss50.me/'
|
|
}
|
|
maven {
|
|
name = 'Mojang'
|
|
url = 'https://libraries.minecraft.net/'
|
|
}
|
|
maven {
|
|
name = 'Forge' //For ModLauncher
|
|
url = 'http://files.minecraftforge.net/maven/'
|
|
}
|
|
maven {
|
|
name = 'SpongePowered'
|
|
url = 'http://repo.spongepowered.org/maven'
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
deployerJars
|
|
shade
|
|
compile.extendsFrom shade
|
|
}
|
|
|
|
dependencies {
|
|
compile gradleApi()
|
|
|
|
shade 'commons-io:commons-io:2.6'
|
|
shade 'org.zeroturnaround:zt-zip:1.13'
|
|
shade 'com.google.code.gson:gson:2.8.5'
|
|
shade 'com.google.guava:guava:27.0-jre'
|
|
shade ('net.fabricmc:stitch:0.1.0.+'){
|
|
transitive = false
|
|
}
|
|
shade 'net.fabricmc:tiny-remapper:0.1.0.14'
|
|
|
|
shade('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
|
|
exclude module: 'launchwrapper'
|
|
exclude module: 'guava'
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main.compileClasspath += configurations.shade;
|
|
main.runtimeClasspath += configurations.shade;
|
|
test.compileClasspath += configurations.shade;
|
|
test.runtimeClasspath += configurations.shade;
|
|
}
|
|
|
|
jar {
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
from (configurations.shade.collect { it.isDirectory() ? it : zipTree(it) }) {
|
|
exclude 'META-INF/*'
|
|
exclude 'META-INF'
|
|
}
|
|
}
|
|
|
|
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle'
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '4.10.2'
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
groupId project.group
|
|
artifactId project.archivesBaseName
|
|
version project.version
|
|
|
|
from components.java
|
|
|
|
//Removes all of the dependencies from the maven pom, prevents sub projects downloading all the libs, as we use a fat jar
|
|
pom.withXml {
|
|
asNode().remove(asNode().get('dependencies'))
|
|
}
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
url "http://mavenupload.modmuss50.me/"
|
|
if (project.hasProperty('mavenPass')) {
|
|
credentials {
|
|
username 'buildslave'
|
|
password project.getProperty('mavenPass')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|