From 8bbfcdcb4b36b59fe1320a2e48378c3001ba42f4 Mon Sep 17 00:00:00 2001 From: UpcraftLP Date: Fri, 15 Feb 2019 21:54:29 +0100 Subject: move properties out of the main buildscript --- gradle.properties | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'gradle.properties') diff --git a/gradle.properties b/gradle.properties index d8e54c1..6a5fbb2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,16 @@ -#Done to increase the memory available to gradle. -org.gradle.jvmargs=-Xmx1G \ No newline at end of file +# Done to increase the memory available to gradle. +org.gradle.jvmargs=-Xmx1G + +# Fabric Properties + # check these on https://fabric.asie.pl/use + minecraft_version=19w07a + yarn_mappings=19w07a.6 + loader_version=0.3.6.107 + +# Mod Properties + mod_version = 1.0.0 + 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 -- cgit 1.4.1 From c11457535461a818ab5e3f7d967fbaee28d046b8 Mon Sep 17 00:00:00 2001 From: UpcraftLP Date: Fri, 15 Feb 2019 22:16:07 +0100 Subject: update fabric URL --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gradle.properties') diff --git a/gradle.properties b/gradle.properties index 6a5fbb2..0c227e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties - # check these on https://fabric.asie.pl/use + # check these on https://fabricmc.net/use minecraft_version=19w07a yarn_mappings=19w07a.6 loader_version=0.3.6.107 -- cgit 1.4.1 From 9101ee4ee98aa1a26acfc1181ccd681ff6e5c6ea Mon Sep 17 00:00:00 2001 From: UpcraftLP Date: Fri, 15 Feb 2019 22:25:50 +0100 Subject: fix maven publishing --- build.gradle | 1 + gradle.properties | 1 + 2 files changed, 2 insertions(+) (limited to 'gradle.properties') diff --git a/build.gradle b/build.gradle index 377c613..1ef975e 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,7 @@ targetCompatibility = JavaVersion.VERSION_1_8 archivesBaseName = project.archives_base_name version = project.mod_version +group = project.maven_group minecraft { } diff --git a/gradle.properties b/gradle.properties index 0c227e6..bba5f93 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,7 @@ org.gradle.jvmargs=-Xmx1G # Mod Properties mod_version = 1.0.0 + maven_group = net.fabricmc archives_base_name = fabric-example-mod # Dependencies -- cgit 1.4.1 From 8c0584bbaf15d3c63ba38e35dfc90eae2cd73ecc Mon Sep 17 00:00:00 2001 From: UpcraftLP Date: Fri, 15 Feb 2019 22:26:03 +0100 Subject: fix indentation --- build.gradle | 58 +++++++++++++++++++++++++++---------------------------- gradle.properties | 18 ++++++++--------- 2 files changed, 38 insertions(+), 38 deletions(-) (limited to 'gradle.properties') diff --git a/build.gradle b/build.gradle index 1ef975e..4815d67 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'fabric-loom' version '0.2.0-SNAPSHOT' - id 'maven-publish' + id 'maven-publish' } sourceCompatibility = JavaVersion.VERSION_1_8 @@ -14,7 +14,7 @@ minecraft { } 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}" mappings "net.fabricmc:yarn:${project.yarn_mappings}" modCompile "net.fabricmc:fabric-loader:${project.loader_version}" @@ -27,7 +27,7 @@ dependencies { // 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 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 @@ -40,46 +40,46 @@ task sourcesJar(type: Jar, dependsOn: classes) { // create a javadoc file for publishing task javadocJar(type: Jar, dependsOn: javadoc) { - from javadoc.destinationDir - from "LICENSE" - classifier = "javadoc" + from javadoc.destinationDir + from "LICENSE" + classifier = "javadoc" } // make the javadoc tool be more lenient when using Java 8 // this fixes the javadoc tool breaking on things like self-closed
tags // see https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } - } + allprojects { + tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') + } + } } jar { - from "LICENSE" + from "LICENSE" } // configure the maven publication 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) { - // add all the jars that should be included when publishing to maven - artifact jar - artifact javadocJar - artifact sourcesJar - } - } - - // select the repositories you want to publish to - repositories { - // uncomment to publish to the local maven - // mavenLocal() - } + // 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 diff --git a/gradle.properties b/gradle.properties index bba5f93..5e987a0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,16 +2,16 @@ 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 + # 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 + 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 + # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric + fabric_version=0.2.1.94 -- cgit 1.4.1