Guest User

build.gradle

a guest
Apr 11th, 2023
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. plugins {
  2. id 'maven-publish'
  3. id 'org.quiltmc.loom' version '1.0.+'
  4. }
  5.  
  6. archivesBaseName = project.archives_base_name
  7. version = project.version
  8. group = project.maven_group
  9.  
  10. repositories {
  11. // publishing
  12. maven {
  13. name = "CurseForge"
  14. url = "https://minecraft.curseforge.com/api/maven"
  15. }
  16.  
  17. // cloth config
  18. maven { url "https://maven.shedaniel.me/" }
  19.  
  20. // satin
  21. maven {
  22. name = 'Ladysnake Mods'
  23. url = 'https://ladysnake.jfrog.io/artifactory/mods'
  24. }
  25.  
  26. // mod menu
  27. maven {
  28. name = 'TerraformersMC'
  29. url = 'https://maven.terraformersmc.com/'
  30. }
  31.  
  32. maven { url 'https://jitpack.io' }
  33.  
  34. maven {
  35. name "modrinth"
  36. url "https://api.modrinth.com/maven"
  37. }
  38.  
  39. maven { url 'https://masa.dy.fi/maven' }
  40. }
  41.  
  42. // All dependency versions are declared in the gradle.properties file
  43. dependencies {
  44. minecraft "com.mojang:minecraft:${minecraft_version}"
  45. mappings loom.layered {
  46. mappings "org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings_version}:intermediary-v2"
  47. }
  48. modImplementation "org.quiltmc:quilt-loader:${project.quilt_loader_version}"
  49. modImplementation include("maven.modrinth:midnightlib:${midnightlib_version}-fabric")
  50. modImplementation include( "com.github.Arathain:LodestoneLib-Quilt:97b8622")
  51. // QSL is not a complete API; You will need Quilted Fabric API to fill in the gaps.
  52. // Quilted Fabric API will automatically pull in the correct QSL version.
  53. modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:${quilted_fabric_api_version}-${minecraft_version}"
  54. // If you want to use QSL by itself over Quilted Fabric API, uncomment the line below (and comment out the line above):
  55. // modImplementation "org.quiltmc:qsl:${qsl_version}+${minecraft_version}"
  56. }
  57.  
  58. processResources {
  59. inputs.property "version", version
  60.  
  61. filesMatching('quilt.mod.json') {
  62. expand "version": version
  63. }
  64. }
  65.  
  66. tasks.withType(JavaCompile).configureEach {
  67. it.options.encoding = "UTF-8"
  68. // Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
  69. it.options.release = 17
  70. }
  71.  
  72. java {
  73. // Still required by IDEs such as Eclipse and Visual Studio Code
  74. sourceCompatibility = JavaVersion.VERSION_17
  75. targetCompatibility = JavaVersion.VERSION_17
  76.  
  77. // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task if it is present.
  78. // If you remove this line, sources will not be generated.
  79. withSourcesJar()
  80.  
  81. // If this mod is going to be a library, then it should also generate Javadocs in order to aid with developement.
  82. // Uncomment this line to generate them.
  83. // withJavadocJar()
  84. }
  85.  
  86. // If you plan to use a different file for the license, don't forget to change the file name here!
  87. jar {
  88. from("LICENSE") {
  89. rename { "${it}_${archivesBaseName}" }
  90. }
  91. }
  92.  
  93. // Configure the maven publication
  94. publishing {
  95. publications {
  96. mavenJava(MavenPublication) {
  97. from components.java
  98. }
  99. }
  100.  
  101. // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
  102. repositories {
  103. // Add repositories to publish to here.
  104. // Notice: This block does NOT have the same function as the block in the top level.
  105. // The repositories here will be used for publishing your artifact, not for
  106. // retrieving dependencies.
  107. }
  108. }
  109.  
Advertisement
Add Comment
Please, Sign In to add comment