Merge remote-tracking branch 'origin/dev' into dev

dev/0.11
modmuss50 2018-11-03 13:51:07 +00:00
commit ecd512c54d
4 changed files with 50 additions and 43 deletions

5
.editorconfig Normal file
View File

@ -0,0 +1,5 @@
[*.kt]
indent_style = tab
[*.gradle]
indent_style = tab

1
.gitignore vendored
View File

@ -8,6 +8,7 @@
# Files # Files
!/.gitattributes !/.gitattributes
!/.gitignore !/.gitignore
!/.editorconfig
!/build.gradle !/build.gradle
!/gradle.properties !/gradle.properties
!/gradlew !/gradlew

View File

@ -1,10 +1,9 @@
plugins { plugins {
id 'java' id 'java'
id 'groovy' id 'maven-publish'
id 'maven' id 'java-gradle-plugin'
id 'maven-publish' id 'idea'
id 'idea' id 'eclipse'
id 'eclipse'
} }
sourceCompatibility = 1.8 sourceCompatibility = 1.8
@ -14,11 +13,14 @@ group = 'net.fabricmc'
archivesBaseName = project.name archivesBaseName = project.name
version = '0.0.12-SNAPSHOT' version = '0.0.12-SNAPSHOT'
// Remove the gradleApi so it isn't merged into the jar file.
configurations.compile.dependencies.remove dependencies.gradleApi()
repositories { repositories {
mavenCentral() mavenCentral()
maven { maven {
name "Modmuss" name = "Modmuss"
url 'http://maven.modmuss50.me/' url = 'http://maven.modmuss50.me/'
} }
maven { maven {
name = 'Mojang' name = 'Mojang'
@ -28,46 +30,39 @@ repositories {
name = 'Forge' //For ModLauncher name = 'Forge' //For ModLauncher
url = 'http://files.minecraftforge.net/maven/' url = 'http://files.minecraftforge.net/maven/'
} }
maven { maven {
name = 'SpongePowered' name = 'SpongePowered'
url = 'http://repo.spongepowered.org/maven' url = 'http://repo.spongepowered.org/maven'
} }
} }
configurations { configurations {
deployerJars deployerJars
shade shade
compile.extendsFrom shade compile.extendsFrom shade
} }
dependencies { dependencies {
compile gradleApi() implementation gradleApi()
shade 'commons-io:commons-io:2.6' shade('commons-io:commons-io:2.6')
shade 'org.zeroturnaround:zt-zip:1.13' shade('org.zeroturnaround:zt-zip:1.13')
shade 'com.google.code.gson:gson:2.8.5' shade('com.google.code.gson:gson:2.8.5')
shade 'com.google.guava:guava:27.0-jre' shade('com.google.guava:guava:27.0-jre')
shade ('net.fabricmc:stitch:0.1.0.+'){ shade('net.fabricmc:stitch:0.1.0.+') {
transitive = false transitive = false
} }
shade 'net.fabricmc:tiny-remapper:0.1.0.15' shade('net.fabricmc:tiny-remapper:0.1.0.15')
shade('org.spongepowered:mixin:0.7.11-SNAPSHOT') { shade('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
exclude module: 'launchwrapper' exclude module: 'launchwrapper'
exclude module: 'guava' exclude module: 'guava'
} }
}
sourceSets {
main.compileClasspath += configurations.shade;
main.runtimeClasspath += configurations.shade;
test.compileClasspath += configurations.shade;
test.runtimeClasspath += configurations.shade;
} }
jar { jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from (configurations.shade.collect { it.isDirectory() ? it : zipTree(it) }) { from(configurations.shade.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude 'META-INF/*' exclude 'META-INF/*'
exclude 'META-INF' exclude 'META-INF'
} }
@ -76,18 +71,25 @@ jar {
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle' apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle'
task wrapper(type: Wrapper) { task wrapper(type: Wrapper) {
gradleVersion = '4.10.2' gradleVersion = '4.10.2'
}
gradlePlugin {
plugins {
register("fabricLoom") {
id = "fabric-loom"
implementationClass = "net.fabricmc.loom.LoomGradlePlugin"
}
}
} }
publishing { publishing {
publications { publications {
maven(MavenPublication) { pluginMaven(MavenPublication) { publication ->
groupId project.group groupId project.group
artifactId project.archivesBaseName artifactId project.archivesBaseName
version project.version 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 //Removes all of the dependencies from the maven pom, prevents sub projects downloading all the libs, as we use a fat jar
pom.withXml { pom.withXml {
asNode().remove(asNode().get('dependencies')) asNode().remove(asNode().get('dependencies'))
@ -105,4 +107,4 @@ publishing {
} }
} }
} }
} }

View File

@ -1 +0,0 @@
implementation-class=net.fabricmc.loom.LoomGradlePlugin