diff options
author | SHsuperCM <shsupercm@gmail.com> | 2021-12-31 10:55:15 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2021-12-31 10:55:15 +0200 |
commit | 9b855d2dabad82dd6cc25581d3770aaa1d56030a (patch) | |
tree | 6c8de9f9d9862f496042e4e74e74a468583421ef /build.gradle | |
parent | f99e664abacea4b08d78c6bae0760fb2928d3d4d (diff) | |
download | CITResewn-9b855d2dabad82dd6cc25581d3770aaa1d56030a.tar.gz CITResewn-9b855d2dabad82dd6cc25581d3770aaa1d56030a.tar.bz2 CITResewn-9b855d2dabad82dd6cc25581d3770aaa1d56030a.zip |
Some gradle cleanup
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 46 |
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 |