donatepay-integration/build.gradle
BitHeaven 629eab8032
All checks were successful
build / build (21) (push) Successful in 5m4s
Update gradle
2025-01-27 10:55:17 +05:00

96 lines
2.5 KiB
Groovy

plugins {
alias libs.plugins.fabric.loom
alias libs.plugins.compression
id 'maven-publish'
}
base {
archivesName = project.archives_base_name
}
String buildNumber = System.getenv("RUN_NUMBER")
version = "${mod_version}+${libs.versions.minecraft.get()}" + (buildNumber != null ? "-${buildNumber}" : "")
group = project.maven_group
loom {
splitEnvironmentSourceSets()
mods {
"donpayinteg" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
}
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
}
configurations {
includedJars
}
dependencies {
// To change the versions see the gradle.properties file
minecraft libs.minecraft
mappings variantOf(libs.yarn.mappings) { classifier 'v2' }
modImplementation libs.fabric.loader
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation libs.fabric.version
implementation group: 'org.yaml', name: 'snakeyaml', version: '2.3'
includedJars group: 'org.yaml', name: 'snakeyaml', version: '2.3'
implementation group: 'org.json', name: 'json', version: '20240303'
includedJars group: 'org.json', name: 'json', version: '20240303'
}
processResources {
// require dependencies to be the version compiled against or newer
Map<String, Object> properties = [
"version": version,
"minecraft_version": libs.versions.minecraft.get(),
"loader_version": libs.versions.fabric.loader.get(),
]
inputs.properties(properties)
filesMatching("fabric.mod.json") {
expand properties
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 21
}
tasks.withType(Jar) {
exclude('META-INF/maven/**')
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
// withSourcesJar()
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
from {
configurations.includedJars.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}