plugins { id 'dev.architectury.loom' version '1.6-SNAPSHOT' id 'maven-publish' id 'java' } group = project.maven_group version = project.mod_version base { archivesName = project.archives_name } loom { silentMojangMappingsLicense() forge { mixinConfig 'libzontreck.mixins.json' } } 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. maven { name = "zontreck Maven" url = "https://git.zontreck.com/api/packages/AriasCreations/maven" } } dependencies { minecraft "net.minecraft:minecraft:$project.minecraft_version" mappings loom.officialMojangMappings() forge "net.minecraftforge:forge:$project.forge_version" } processResources { inputs.property 'version', project.version filesMatching('META-INF/mods.toml') { expand version: project.version } } 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() withJavadocJar() sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } tasks.withType(JavaCompile).configureEach { it.options.release = 17 } tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : project.name, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } // This is the preferred method to reobfuscate your jar file finalizedBy 'reobfJar' } def MAVEN_PASSWORD = "AriasCreationsMavenPassword" def MAVEN_USER = "AriasCreationsMavenUser" // Configure Maven publishing. publishing { publications { register('mavenJava', MavenPublication) { artifact jar artifact sourcesJar artifact javadocJar } } repositories { maven { url = "https://git.zontreck.com/api/packages/MinecraftMods/maven" name = "ariascreations" credentials { username = project.findProperty(MAVEN_USER) password = project.findProperty(MAVEN_PASSWORD) } } } }