gradle configuration update #7

Merged
UpcraftLP merged 9 commits from gradle-update into master 2019-02-16 00:17:56 +00:00
3 changed files with 80 additions and 12 deletions

View File

@ -1,29 +1,82 @@
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
plugins { plugins {
id 'fabric-loom' version '0.2.0-SNAPSHOT' id 'fabric-loom' version '0.2.0-SNAPSHOT'
id 'maven-publish'
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
} }
sourceCompatibility = 1.8 sourceCompatibility = JavaVersion.VERSION_1_8
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
targetCompatibility = 1.8 targetCompatibility = JavaVersion.VERSION_1_8
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
archivesBaseName = "modid" archivesBaseName = project.archives_base_name
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
version = "1.0.0" version = project.mod_version
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
group = project.maven_group
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
minecraft { minecraft {
} }
dependencies { dependencies {
minecraft "com.mojang:minecraft:19w06a" //to change the versions see the gradle.properties file
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
mappings "net.fabricmc:yarn:19w06a.3" minecraft "com.mojang:minecraft:${project.minecraft_version}"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modCompile "net.fabricmc:fabric-loader:0.3.5.106" mappings "net.fabricmc:yarn:${project.yarn_mappings}"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// Fabric API. This is technically optional, but you probably want it anyway. // Fabric API. This is technically optional, but you probably want it anyway.
modCompile "net.fabricmc:fabric:0.2.0.91" modCompile "net.fabricmc:fabric:${project.fabric_version}"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
processResources {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// this will ensure that this task is re-run when there's a change
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
inputs.property "version", project.version
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// replace stuff in fabric.mod.json, nothing else
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
from(sourceSets.main.resources.srcDirs) {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
include "fabric.mod.json"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// add mod metadata
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
expand "version": project.version
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:55 +00:00 (Migrated from github.com)
Review

Do we really need a javadoc?

Do we really need a javadoc?
UpcraftLP commented 2019-02-15 21:04:43 +00:00 (Migrated from github.com)
Review

well I thought it'd be a nice-to-have, mainly for including it in the maven publication

well I thought it'd be a nice-to-have, mainly for including it in the maven publication
modmuss50 commented 2019-02-15 21:31:44 +00:00 (Migrated from github.com)
Review

It adds quite a bit more to the build.gradle (due to the fix bellow). And there are source jars anyway so when you depend on a mod it should give you sources.

It adds quite a bit more to the build.gradle (due to the fix bellow). And there are source jars anyway so when you depend on a mod it should give you sources.
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// copy everything else, thats not the mcmod.info
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
from(sourceSets.main.resources.srcDirs) {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
exclude "fabric.mod.json"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// ensure that the encoding is set to UTF-8, no matter what the system default is
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// this fixes some edge cases with special characters not displaying correctly
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
tasks.withType(JavaCompile) {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
options.encoding = "UTF-8"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
} }
// 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
// if it is present. // if it is present.
// If you remove this task, sources will not be generated. // If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) { task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources' classifier = "sources"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
from sourceSets.main.allSource from sourceSets.main.allSource
} }
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
jar {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
from "LICENSE"
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// configure the maven publication
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
publishing {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
publications {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
mavenJava(MavenPublication) {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// add all the jars that should be included when publishing to maven
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
artifact(jar) {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
builtBy remapJar
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
artifact(sourcesJar) {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
builtBy remapSourcesJar
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// select the repositories you want to publish to
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
repositories {
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// uncomment to publish to the local maven
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
// mavenLocal()
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
}
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation

modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation
modmuss50 commented 2019-02-15 21:03:34 +00:00 (Migrated from github.com)
Review

Bad indentation

Bad indentation

View File

@ -1,2 +1,17 @@
#Done to increase the memory available to gradle. # Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=19w07a
yarn_mappings=19w07a.6
loader_version=0.3.6.107
# Mod Properties
mod_version = 1.0.0
maven_group = net.fabricmc
archives_base_name = fabric-example-mod
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric
fabric_version=0.2.1.94

View File

@ -2,7 +2,7 @@
"id": "modid", "id": "modid",
"name": "Example Mod", "name": "Example Mod",
"description": "This is an example description! Tell everyone what your mod is about!", "description": "This is an example description! Tell everyone what your mod is about!",
"version": "1.0.0", "version": "${version}",
"side": "universal", "side": "universal",
"initializers": [ "initializers": [
"net.fabricmc.example.ExampleMod" "net.fabricmc.example.ExampleMod"