diff --git a/build.gradle b/build.gradle index fc5ffb359..3b6440ba0 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ plugins { id "maven-publish" } +base.archivesName = project.archives_base_name version = project.mod_version group = project.maven_group @@ -34,10 +35,6 @@ dependencies { // modImplementation(legacy.apiModule("legacy-fabric-item-groups-v1", project.fabric_version)) } -base { - archivesName = project.archives_base_name -} - processResources { inputs.property "version", project.version @@ -46,18 +43,21 @@ processResources { } } -// Ensure that the encoding is set to UTF-8, no matter what the system default is -// 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).configureEach { + // Ensure that the encoding is set to UTF-8, no matter what the system default is + // 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 it.options.encoding = "UTF-8" - if (JavaVersion.current().isJava9Compatible()) it.options.release = 8 - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + if (JavaVersion.current().isJava9Compatible()) { + it.options.release = 8 + } } java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // if it is present. // If you remove this line, sources will not be generated.