Advertisement
Scouter456

Untitled

Sep 22nd, 2022
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 2.41 KB | None | 0 0
  1. plugins {
  2.     id 'fabric-loom' version '0.12-SNAPSHOT'
  3.     id 'maven-publish'
  4. }
  5.  
  6. sourceCompatibility = JavaVersion.VERSION_17
  7. targetCompatibility = JavaVersion.VERSION_17
  8.  
  9. archivesBaseName = project.archives_base_name
  10. version = project.mod_version
  11. group = project.maven_group
  12.  
  13. repositories {
  14.     // Add repositories to retrieve artifacts from in here.
  15.     // You should only use this when depending on other mods because
  16.     // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
  17.     // See https://docs.gradle.org/current/userguide/declaring_repositories.html
  18.     // for more information about repositories.
  19.     maven {url = "https://maven.parchmentmc.org"}
  20.     maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' }
  21. }
  22.  
  23. dependencies {
  24.     // To change the versions see the gradle.properties file
  25.     minecraft "com.mojang:minecraft:${project.minecraft_version}"
  26.     mappings loom.layered() {
  27.         officialMojangMappings()
  28.         parchment("org.parchmentmc.data:parchment-1.18.2:2022.09.04@zip")
  29.     }
  30.     modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
  31.  
  32.  
  33.     // Fabric API. This is technically optional, but you probably want it anyway.
  34.     modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
  35.     modImplementation 'software.bernie.geckolib:geckolib-fabric-1.18:3.0.62'
  36.  
  37. }
  38.  
  39. processResources {
  40.     inputs.property "version", project.version
  41.  
  42.     filesMatching("fabric.mod.json") {
  43.         expand "version": project.version
  44.     }
  45. }
  46.  
  47. tasks.withType(JavaCompile).configureEach {
  48.     // Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
  49.     it.options.release = 17
  50. }
  51.  
  52. java {
  53.     // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
  54.     // if it is present.
  55.     // If you remove this line, sources will not be generated.
  56.     withSourcesJar()
  57. }
  58.  
  59. jar {
  60.     from("LICENSE") {
  61.         rename { "${it}_${project.archivesBaseName}"}
  62.     }
  63. }
  64.  
  65. // configure the maven publication
  66. publishing {
  67.     publications {
  68.         mavenJava(MavenPublication) {
  69.             from components.java
  70.         }
  71.     }
  72.  
  73.     // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
  74.     repositories {
  75.         // Add repositories to publish to here.
  76.         // Notice: This block does NOT have the same function as the block in the top level.
  77.         // The repositories here will be used for publishing your artifact, not for
  78.         // retrieving dependencies.
  79.     }
  80. }
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement