fix indentation
parent
9101ee4ee9
commit
8c0584bbaf
58
build.gradle
58
build.gradle
|
@ -1,6 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.2.0-SNAPSHOT'
|
id 'fabric-loom' version '0.2.0-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
@ -14,7 +14,7 @@ minecraft {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
//to change the versions see the gradle.properties file
|
//to change the versions see the gradle.properties file
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
|
||||||
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
|
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
|
@ -27,7 +27,7 @@ dependencies {
|
||||||
// this fixes some edge cases with special characters not displaying correctly
|
// this fixes some edge cases with special characters not displaying correctly
|
||||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||||
|
@ -40,46 +40,46 @@ task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
|
|
||||||
// create a javadoc file for publishing
|
// create a javadoc file for publishing
|
||||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||||
from javadoc.destinationDir
|
from javadoc.destinationDir
|
||||||
from "LICENSE"
|
from "LICENSE"
|
||||||
classifier = "javadoc"
|
classifier = "javadoc"
|
||||||
}
|
}
|
||||||
|
|
||||||
// make the javadoc tool be more lenient when using Java 8
|
// make the javadoc tool be more lenient when using Java 8
|
||||||
// this fixes the javadoc tool breaking on things like self-closed <br /> tags
|
// this fixes the javadoc tool breaking on things like self-closed <br /> tags
|
||||||
// see https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
|
// see https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
|
||||||
if (JavaVersion.current().isJava8Compatible()) {
|
if (JavaVersion.current().isJava8Compatible()) {
|
||||||
allprojects {
|
allprojects {
|
||||||
tasks.withType(Javadoc) {
|
tasks.withType(Javadoc) {
|
||||||
options.addStringOption('Xdoclint:none', '-quiet')
|
options.addStringOption('Xdoclint:none', '-quiet')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
from "LICENSE"
|
from "LICENSE"
|
||||||
}
|
}
|
||||||
|
|
||||||
// configure the maven publication
|
// configure the maven publication
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
|
mavenJava(MavenPublication) {
|
||||||
|
// add all the jars that should be included when publishing to maven
|
||||||
|
artifact(jar) {
|
||||||
|
builtBy remapJar
|
||||||
|
}
|
||||||
|
artifact javadocJar
|
||||||
|
artifact(sourcesJar) {
|
||||||
|
builtBy remapSourcesJar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mavenJava(MavenPublication) {
|
// select the repositories you want to publish to
|
||||||
// add all the jars that should be included when publishing to maven
|
repositories {
|
||||||
artifact jar
|
// uncomment to publish to the local maven
|
||||||
artifact javadocJar
|
// mavenLocal()
|
||||||
artifact sourcesJar
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// select the repositories you want to publish to
|
|
||||||
repositories {
|
|
||||||
// uncomment to publish to the local maven
|
|
||||||
// mavenLocal()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure that jars are properly remapped before uploading
|
|
||||||
tasks.publish.dependsOn build
|
|
||||||
tasks.build.dependsOn javadocJar
|
tasks.build.dependsOn javadocJar
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx1G
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version=19w07a
|
minecraft_version=19w07a
|
||||||
yarn_mappings=19w07a.6
|
yarn_mappings=19w07a.6
|
||||||
loader_version=0.3.6.107
|
loader_version=0.3.6.107
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0.0
|
mod_version = 1.0.0
|
||||||
maven_group = net.fabricmc
|
maven_group = net.fabricmc
|
||||||
archives_base_name = fabric-example-mod
|
archives_base_name = fabric-example-mod
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric
|
||||||
fabric_version=0.2.1.94
|
fabric_version=0.2.1.94
|
||||||
|
|
Loading…
Reference in New Issue