build.gradle 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. loom {
  2. accessWidener = file("src/main/resources/architectury.accessWidener")
  3. }
  4. dependencies {
  5. minecraft "com.mojang:minecraft:${rootProject.architectury.minecraft}"
  6. mappings minecraft.officialMojangMappings()
  7. // We depend on fabric loader here to use the fabric @Environment annotations
  8. // Do NOT use other classes from fabric loader
  9. modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
  10. implementation "net.jodah:typetools:0.6.2"
  11. }
  12. architectury {
  13. common()
  14. }
  15. task sourcesJar(type: Jar, dependsOn: classes) {
  16. classifier = "sources"
  17. from sourceSets.main.allSource
  18. }
  19. publishing {
  20. publications {
  21. mavenCommon(MavenPublication) {
  22. artifactId = rootProject.archivesBaseName
  23. artifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}.jar")) {
  24. builtBy build
  25. }
  26. artifact(sourcesJar) {
  27. builtBy remapSourcesJar
  28. }
  29. }
  30. }
  31. repositories {
  32. if (System.getenv("MAVEN_PASS") != null) {
  33. maven {
  34. url = "https://deploy.shedaniel.me/"
  35. credentials {
  36. username = "shedaniel"
  37. password = System.getenv("MAVEN_PASS")
  38. }
  39. }
  40. }
  41. }
  42. }