mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
136 lines
No EOL
3.4 KiB
Groovy
136 lines
No EOL
3.4 KiB
Groovy
plugins {
|
|
id 'fabric-loom' version "1.11-SNAPSHOT"
|
|
id 'maven-publish'
|
|
id "me.modmuss50.mod-publish-plugin" version "0.8.4"
|
|
id 'co.uzzu.dotenv.gradle' version '4.0.0'
|
|
}
|
|
|
|
version = project.mod_version
|
|
group = project.maven_group
|
|
|
|
base {
|
|
archivesName = project.file_name
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven {
|
|
name = "DevAuth"
|
|
url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1"
|
|
}
|
|
maven {
|
|
name = "Terraformers"
|
|
url = "https://maven.terraformersmc.com/"
|
|
}
|
|
maven {
|
|
name "oth3rMavenSnapshots"
|
|
url "https://maven.oth3r.one/snapshots"
|
|
}
|
|
}
|
|
|
|
loom {
|
|
accessWidenerPath = file("src/main/resources/sit!.accesswidener")
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
|
|
// required dependencies
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
|
modImplementation "one.oth3r:otterlib:${project.otterlib_version}"
|
|
|
|
// optional dependencies
|
|
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
|
modRuntimeOnly "me.djtheredstoner:DevAuth-fabric:${project.devauth_version}"
|
|
}
|
|
|
|
processResources {
|
|
filteringCharset = "UTF-8"
|
|
|
|
var replaceProperties = [
|
|
version : project.version,
|
|
minecraft_version : minecraft_version,
|
|
min_minecraft_version : min_minecraft_version,
|
|
max_minecraft_version : max_minecraft_version,
|
|
otterlib_version : otterlib_version,
|
|
otterlib_max_version : otterlib_max_version,
|
|
loader_version : loader_version
|
|
]
|
|
|
|
inputs.properties replaceProperties
|
|
filesMatching("fabric.mod.json") {
|
|
expand replaceProperties
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
it.options.release = 17
|
|
}
|
|
|
|
java {
|
|
// 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.
|
|
withSourcesJar()
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
jar {
|
|
from("LICENSE") {
|
|
rename { "${it}_${project.base.archivesName.get()}"}
|
|
}
|
|
}
|
|
|
|
// configure the maven publication
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
|
|
// 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.
|
|
}
|
|
}
|
|
|
|
publishMods {
|
|
changelog = file('changelog.md').text
|
|
type = STABLE
|
|
|
|
file = remapJar.archiveFile
|
|
modLoaders.add("fabric")
|
|
modLoaders.add("quilt")
|
|
|
|
version = mod_version
|
|
displayName = "v${mod_version} [Fabric]"
|
|
|
|
curseforge {
|
|
accessToken = env.fetchOrNull('CURSEFORGE')
|
|
projectId = "892424"
|
|
projectSlug = "sit1"
|
|
minecraftVersions.addAll(minecraft_versions.split(",").toList())
|
|
|
|
requires("fabric-api", "otterlib")
|
|
|
|
announcementTitle = "Download from CurseForge"
|
|
}
|
|
|
|
modrinth {
|
|
accessToken = env.fetchOrNull('MODRINTH')
|
|
projectId = "EsYqsGV4"
|
|
minecraftVersions.addAll(minecraft_versions.split(",").toList())
|
|
|
|
requires("fabric-api", "otterlib")
|
|
|
|
announcementTitle = "Download from Modrinth"
|
|
}
|
|
} |