add gradle plugin marker (#11)

format build.gradle
format


do tabs
dev/0.11
NikkyAI 2018-11-03 14:01:34 +01:00 committed by Modmuss50
parent 356a7c4d00
commit b3a5f4ebd7
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
!/.gitattributes
!/.gitignore
!/.editorconfig
!/build.gradle
!/gradle.properties
!/gradlew

View File

@ -1,8 +1,7 @@
plugins {
id 'java'
id 'groovy'
id 'maven'
id 'maven-publish'
id 'java-gradle-plugin'
id 'idea'
id 'eclipse'
}
@ -14,11 +13,14 @@ group = 'net.fabricmc'
archivesBaseName = project.name
version = '0.0.12-SNAPSHOT'
// Remove the gradleApi so it isn't merged into the jar file.
configurations.compile.dependencies.remove dependencies.gradleApi()
repositories {
mavenCentral()
maven {
name "Modmuss"
url 'http://maven.modmuss50.me/'
name = "Modmuss"
url = 'http://maven.modmuss50.me/'
}
maven {
name = 'Mojang'
@ -41,16 +43,16 @@ configurations {
}
dependencies {
compile gradleApi()
implementation 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('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.15'
shade('net.fabricmc:tiny-remapper:0.1.0.15')
shade('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
exclude module: 'launchwrapper'
@ -58,13 +60,6 @@ dependencies {
}
}
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) }) {
@ -79,15 +74,22 @@ task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
}
gradlePlugin {
plugins {
register("fabricLoom") {
id = "fabric-loom"
implementationClass = "net.fabricmc.loom.LoomGradlePlugin"
}
}
}
publishing {
publications {
maven(MavenPublication) {
pluginMaven(MavenPublication) { publication ->
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'))

View File

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