Skip to content

Commit

Permalink
Improve build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Grayray75 committed Oct 5, 2023
1 parent 0fd1194 commit ae6fb51
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id "maven-publish"
}

base.archivesName = project.archives_base_name
version = project.mod_version
group = project.maven_group

Expand Down Expand Up @@ -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

Expand All @@ -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.
Expand Down

0 comments on commit ae6fb51

Please sign in to comment.