137 lines
4.4 KiB
Groovy
137 lines
4.4 KiB
Groovy
plugins {
|
|
id 'eclipse'
|
|
id 'maven-publish'
|
|
id 'net.minecraftforge.gradle' version '5.1.+'
|
|
id 'org.spongepowered.mixin' version '0.7.+'
|
|
}
|
|
|
|
version = mod_version
|
|
group = maven_group // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
|
archivesBaseName = archives_base_name
|
|
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: 'official', version: '1.19.2'
|
|
|
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
|
|
runs {
|
|
client {
|
|
properties 'mixin.env.remapRefMap': 'true'
|
|
property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg"
|
|
workingDirectory project.file('run')
|
|
arg "-mixin.config=forgecef.mixins.json"
|
|
property 'forge.logging.console.level', 'debug'
|
|
|
|
mods {
|
|
webdisplays {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
server {
|
|
properties 'mixin.env.remapRefMap': 'true'
|
|
property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg"
|
|
workingDirectory project.file('run')
|
|
arg "-mixin.config=forgecef.mixins.json"
|
|
|
|
|
|
property 'forge.logging.console.level', 'debug'
|
|
|
|
mods {
|
|
webdisplays {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
data {
|
|
workingDirectory project.file('run')
|
|
properties 'mixin.env.remapRefMap': 'true'
|
|
property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg"
|
|
property 'forge.logging.console.level', 'debug'
|
|
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', sourceSets.main.resources.srcDirs[0]
|
|
mods {
|
|
webdisplays {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories{
|
|
maven { url "https://maven.shedaniel.me/" }
|
|
maven { url 'https://jitpack.io' }
|
|
maven {
|
|
name = "cursemaven"
|
|
url = "https://www.cursemaven.com"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft 'net.minecraftforge:forge:1.19.2-43.2.6'
|
|
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
|
|
|
implementation fg.deobf("com.github.Mysticpasta1:mcef-forge:d45957d9f6")
|
|
implementation fg.deobf("curse.maven:cloth_config_forge-348521:3972423")
|
|
implementation fg.deobf("curse.maven:SU-370704:4410614")
|
|
implementation fg.deobf("curse.maven:spark-361579:4381167")
|
|
|
|
implementation fg.deobf("curse.maven:vivecraft-667903:4409427")
|
|
}
|
|
|
|
sourceSets {
|
|
main.resources.srcDirs += 'src/generated/resources'
|
|
}
|
|
|
|
// Example for how to get properties into the manifest for reading by the runtime..
|
|
jar {
|
|
manifest {
|
|
attributes([
|
|
"Specification-Title": "webdisplays",
|
|
"Specification-Vendor": "webdisplays",
|
|
"Specification-Version": "1", // We are version 1 of ourselves
|
|
"Implementation-Title": project.name,
|
|
"Implementation-Version": "${version}",
|
|
"Implementation-Vendor" :"webdisplays",
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
|
"MixinConfigs": "forgecef.mixins.json"
|
|
])
|
|
}
|
|
}
|
|
|
|
// Example configuration to allow publishing using the maven-publish task
|
|
// we define a custom artifact that is sourced from the reobfJar output task
|
|
// and then declare that to be published
|
|
// Note you'll need to add a repository here
|
|
def reobfFile = file("$buildDir/reobfJar/output.jar")
|
|
def reobfArtifact = artifacts.add('default', reobfFile) {
|
|
type 'jar'
|
|
builtBy 'reobfJar'
|
|
}
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifact reobfArtifact
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
url "file:///${project.projectDir}/mcmodsrepo"
|
|
}
|
|
}
|
|
}
|
|
|
|
apply plugin: 'org.spongepowered.mixin'
|
|
|
|
mixin {
|
|
add sourceSets.main, "webdisplays.refmap.json"
|
|
}
|
|
|
|
task deobfJar(type: Jar) {
|
|
from sourceSets.main.output
|
|
classifier = 'deobf'
|
|
} |