Advertisement
GeradesoLukas

Untitled

Jan 11th, 2024
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. plugins {
  2. id "com.github.johnrengelman.shadow" version "7.1.2"
  3. }
  4.  
  5. architectury {
  6. platformSetupLoomIde()
  7. fabric()
  8. }
  9.  
  10. loom {
  11. accessWidenerPath = project(":common").loom.accessWidenerPath
  12. }
  13.  
  14. configurations {
  15. common
  16. shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
  17. compileClasspath.extendsFrom common
  18. runtimeClasspath.extendsFrom common
  19. developmentFabric.extendsFrom common
  20. }
  21.  
  22. dependencies {
  23. modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
  24. include("com.github.LlamaLad7:MixinExtras:0.1.1")
  25. implementation 'com.electronwill.night-config:core:3.6.5'
  26. implementation 'com.electronwill.night-config:toml:3.6.5'
  27. modImplementation "curse.maven:forgeconfigapiport-547434:3943250"
  28. modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
  29. //include(annotationProcessor(implementation("com.github.LlamaLad7.MixinExtras:mixinextras-fabric:${rootProject.mixinextras_version}")))
  30.  
  31. modImplementation "curse.maven:bettercombat-639842:4428886" // Better Combat
  32. modImplementation "curse.maven:clothconfig-348521:3972420" // Cloth Config
  33. modImplementation "curse.maven:playeranim-658587:4418153" // playerAnimator
  34.  
  35. // Remove the next line if you don't want to depend on the API
  36. modApi "dev.architectury:architectury-fabric:${rootProject.architectury_version}"
  37.  
  38. common(project(path: ":common", configuration: "namedElements")) { transitive false }
  39. shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
  40. }
  41.  
  42. processResources {
  43. inputs.property "version", project.version
  44.  
  45. filesMatching("fabric.mod.json") {
  46. expand "version": project.version
  47. }
  48. }
  49.  
  50. shadowJar {
  51. exclude "architectury.common.json"
  52.  
  53. configurations = [project.configurations.shadowCommon]
  54. archiveClassifier = "dev-shadow"
  55. relocate("com.llamalad7.mixinextras", "net.geradesolukas.mixinextras")
  56. mergeServiceFiles()
  57. }
  58.  
  59. remapJar {
  60. injectAccessWidener = true
  61. input.set shadowJar.archiveFile
  62. dependsOn shadowJar
  63. archiveClassifier = "fabric"
  64. }
  65.  
  66. jar {
  67. archiveClassifier = "dev"
  68. }
  69.  
  70. sourcesJar {
  71. def commonSources = project(":common").sourcesJar
  72. dependsOn commonSources
  73. from commonSources.archiveFile.map { zipTree(it) }
  74. }
  75.  
  76. components.java {
  77. withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
  78. skip()
  79. }
  80. }
  81.  
  82. publishing {
  83. publications {
  84. mavenFabric(MavenPublication) {
  85. artifactId = rootProject.archives_base_name + "-fabric-" + project.name
  86. from components.java
  87. }
  88. }
  89.  
  90. // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
  91. repositories {
  92. // Add repositories to publish to here.
  93. }
  94. }
  95.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement