Update build script to support Gradle 9 / fix deprecations added in 8.2 (#244)

* Update build script to support Gradle 9

* Another fix

* Fix
This commit is contained in:
modmuss50 2023-03-27 11:05:42 +01:00 committed by GitHub
parent 9b028bdcd4
commit 3935c0f71d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,10 +3,6 @@ plugins {
id 'maven-publish' id 'maven-publish'
} }
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name
version = project.mod_version version = project.mod_version
group = project.maven_group group = project.maven_group
@ -33,6 +29,10 @@ dependencies {
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}" // modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
} }
base {
archivesName = project.archives_base_name
}
processResources { processResources {
inputs.property "version", project.version inputs.property "version", project.version
@ -51,11 +51,14 @@ java {
// if it is present. // if it is present.
// If you remove this line, sources will not be generated. // If you remove this line, sources will not be generated.
withSourcesJar() withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
} }
jar { jar {
from("LICENSE") { from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"} rename { "${it}_${base.archivesName.get()}"}
} }
} }