More-Red-CCT-Compat/build.gradle
2023-05-29 08:35:46 +03:00

96 lines
3.0 KiB
Groovy

plugins {
id 'eclipse'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
}
version = "${project.mc_version}-${project.mod_version}"
group = 'ru.yurannnzzz'
archivesBaseName = 'MoreRed-CCT-Compat'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: 'parchment', version: "${project.parchment_version}-${project.mc_version}"
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'debug'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods {
moreredxcctcompat {
source sourceSets.main
}
}
}
}
}
repositories {
maven {
url 'https://squiddev.cc/maven/'
content {
includeGroup 'org.squiddev'
}
}
maven {
url 'https://cubicinterpolation.net/maven/'
content {
includeGroup 'commoble.morered'
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:${project.mc_version}-${project.forge_version}"
compileOnly fg.deobf("org.squiddev:cc-tweaked-${project.mc_version}:${project.cctweaked_version}:api")
implementation fg.deobf("org.squiddev:cc-tweaked-${project.mc_version}:${project.cctweaked_version}")
implementation fg.deobf("commoble.morered:morered-${project.mc_version}:${morered_version}")
}
// Example for how to get properties into the manifest for reading at runtime.
jar {
manifest {
attributes([
"Specification-Title" : "More Red x CC:T Compat",
"Specification-Vendor" : "YuRaNnNzZZ",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "YuRaNnNzZZ",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
// Example configuration to allow publishing using the maven-publish plugin
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
// publish.dependsOn('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}