I have done a bit of digging and managed to find a solution. This is the build script as I have it now:
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven {
url = "https://repo.spongepowered.org/maven"
}
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
plugins {
id 'org.spongepowered.plugin' version '0.6'
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = '1.0'
group = 'net.papaprime.animationcore'
archivesBaseName = 'animationcore'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
repositories {
jcenter()
maven {
name = "spongepowered"
url = "https://repo.spongepowered.org/maven"
}
}
configurations {
inJar
}
configurations.compile.extendsFrom(configurations.inJar)
minecraft {
mappings channel: 'snapshot', version: '20200514-1.15.1'
runs {
client {
workingDirectory project.file('run')
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
mods {
animationcore {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
mods {
animationcore {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
args '--mod', 'animationcore', '--all', '--output', file('src/generated/resources/')
mods {
animationcore {
source sourceSets.main
}
}
}
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.15.2-31.2.8'
// For more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
inJar("org.spongepowered:mixin:0.8")
}
jar {
manifest {
attributes([
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
"TweakOrder": 0,
"Specification-Title": "animationcore",
"Specification-Vendor": "animationcoresareus",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"animationcoresareus",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"ContainedDeps": "mixin-0.8.jar"
])
}
from(configurations.inJar) {
into 'META-INF/libraries'
}
}
jar.finalizedBy('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}
This appears to be working.