aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle46
1 files changed, 5 insertions, 41 deletions
diff --git a/build.gradle b/build.gradle
index b1c6758..6d29cb2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,9 +1,9 @@
plugins {
- id 'fabric-loom' version '0.9-SNAPSHOT'
+ id 'fabric-loom' version '0.10-SNAPSHOT'
id 'maven-publish'
}
-version = project.mod_version
+version = project.mod_version + "+" + project.minecraft_version
group = project.maven_group
repositories {
@@ -46,23 +46,10 @@ loom {
accessWidenerPath = file("src/main/resources/citresewn.accesswidener")
}
-def targetJavaVersion = 16
-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
- // If Javadoc is generated, this must be specified in that task too.
- it.options.encoding = "UTF-8"
- if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
- it.options.release = targetJavaVersion
- }
-}
+sourceCompatibility = JavaVersion.VERSION_16
+targetCompatibility = JavaVersion.VERSION_16
java {
- def javaVersion = JavaVersion.toVersion(targetJavaVersion)
- if (JavaVersion.current() < javaVersion) {
- toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
- }
archivesBaseName = project.archives_base_name
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
@@ -74,27 +61,4 @@ jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
-}
-
-// configure the maven publication
-publishing {
- publications {
- mavenJava(MavenPublication) {
- // add all the jars that should be included when publishing to maven
- artifact(remapJar) {
- builtBy remapJar
- }
- artifact(sourcesJar) {
- builtBy remapSourcesJar
- }
- }
- }
-
- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
- repositories {
- // Add repositories to publish to here.
- // Notice: This block does NOT have the same function as the block in the top level.
- // The repositories here will be used for publishing your artifact, not for
- // retrieving dependencies.
- }
-}
+} \ No newline at end of file