Advertisement
Scouter456

Untitled

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