Advertisement
Guest User

Untitled

a guest
Feb 16th, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. maven { url "https://maven.architectury.dev/" }
  4. gradlePluginPortal()
  5. mavenCentral()
  6. }
  7. dependencies {
  8. classpath "dev.architectury:architectury-loom:1.7.423"
  9. }
  10. }
  11.  
  12. plugins {
  13. id 'java'
  14. id 'dev.architectury.loom' version '1.7.423'
  15. id 'maven-publish'
  16. }
  17.  
  18. apply plugin: 'dev.architectury.loom'
  19.  
  20. sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
  21.  
  22. archivesBaseName = project.archives_base_name
  23. version = project.mod_version
  24. group = project.maven_group
  25.  
  26. loom {
  27. silentMojangMappingsLicense()
  28.  
  29. forge {
  30. dataGen {
  31. mod project.mod_id
  32. }
  33. }
  34. }
  35.  
  36. repositories {
  37. maven { url "https://maven.minecraftforge.net/" }
  38. maven { url "https://maven.architectury.dev/" }
  39. mavenCentral() // Fallback repository
  40. maven { url "https://maven.tterrag.com/" }
  41. maven { url "https://maven.blamejared.com" }
  42. }
  43.  
  44.  
  45.  
  46. dependencies {
  47. minecraft "com.mojang:minecraft:${project.minecraft_version}"
  48. mappings loom.officialMojangMappings()
  49. forge "net.minecraftforge:forge:1.20.1:47.0.19" // Correct Forge version
  50. modImplementation("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false }
  51. modImplementation("com.jozufozu.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}")
  52. modImplementation("com.tterrag.registrate:Registrate:${registrate_version}")
  53. modImplementation("curse.maven:lazydfu-460819:3544496")
  54. }
  55.  
  56.  
  57. processResources {
  58. inputs.property "version", project.version
  59.  
  60. filesMatching("META-INF/mods.toml") {
  61. expand "version": project.version
  62. }
  63. }
  64.  
  65. tasks.withType(JavaCompile) {
  66. options.encoding = "UTF-8"
  67. options.release = 17
  68. }
  69.  
  70. java {
  71. withSourcesJar()
  72. }
  73.  
  74. ext {
  75. mod_author = 'oscey'
  76. }
  77.  
  78. jar {
  79. manifest {
  80. attributes([
  81. "Specification-Title" : project.mod_id,
  82. "Specification-Vendor" : project.mod_author,
  83. "Specification-Version" : "1",
  84. "Implementation-Title" : project.name,
  85. "Implementation-Version" : version,
  86. "Implementation-Vendor" : project.mod_author,
  87. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  88. ])
  89. }
  90. }
  91.  
  92. publishing {
  93. publications {
  94. mavenJava(MavenPublication) {
  95. // Add all the jars that should be included when publishing to Maven
  96. artifact(remapJar) {
  97. builtBy remapJar
  98. }
  99. artifact(sourcesJar) {
  100. builtBy remapSourcesJar
  101. }
  102. }
  103. }
  104. repositories {
  105. // Add repositories to publish to here, for example:
  106. // maven {
  107. // url = uri("https://example-repo.com/maven")
  108. // }
  109. }
  110. }
  111.  
  112.  
  113.  
  114.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement