build.gradle 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. loom {
  2. accessWidener = file("src/main/resources/cloth-config.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("me.shedaniel.cloth:basic-math:0.5.1")
  11. implementation("blue.endless:jankson:${rootProject.jankson_version}")
  12. implementation("com.moandjiezana.toml:toml4j:${rootProject.toml4j_version}")
  13. implementation("org.yaml:snakeyaml:${rootProject.snakeyaml_version}")
  14. }
  15. architectury {
  16. common()
  17. }
  18. task sourcesJar(type: Jar, dependsOn: classes) {
  19. classifier = "sources"
  20. from sourceSets.main.allSource
  21. }
  22. task javadocs(type: Javadoc) {
  23. source = sourceSets.main.allJava
  24. }
  25. task javadocsJar(type: Jar, dependsOn: javadocs) {
  26. archiveClassifier.set("javadocs")
  27. javadocs.failOnError false
  28. from javadocs.destinationDir
  29. }
  30. publishing {
  31. publications {
  32. mavenCommon(MavenPublication) {
  33. artifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}.jar")) {
  34. builtBy build
  35. }
  36. artifact(sourcesJar) {
  37. builtBy remapSourcesJar
  38. }
  39. artifact javadocsJar
  40. }
  41. }
  42. repositories {
  43. if (System.getenv("MAVEN_PASS") != null) {
  44. maven {
  45. url = "https://deploy.shedaniel.me/"
  46. credentials {
  47. username = "shedaniel"
  48. password = System.getenv("MAVEN_PASS")
  49. }
  50. }
  51. }
  52. }
  53. }