build.gradle 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. plugins {
  2. id 'fabric-loom' version '0.2.4-SNAPSHOT'
  3. id 'maven-publish'
  4. id 'com.jfrog.bintray' version '1.8.4'
  5. }
  6. sourceCompatibility = 1.8
  7. targetCompatibility = 1.8
  8. group = "me.shedaniel"
  9. archivesBaseName = "ClothConfig2"
  10. version = project.mod_version
  11. minecraft {
  12. }
  13. processResources {
  14. filesMatching('fabric.mod.json') {
  15. expand 'version': project.version
  16. }
  17. inputs.property "version", project.version
  18. }
  19. dependencies {
  20. minecraft "com.mojang:minecraft:${project.minecraft_version}"
  21. mappings "net.fabricmc:yarn:${project.yarn_version}"
  22. modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}"
  23. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
  24. modApi "io.github.prospector.modmenu:ModMenu:${modmenu_version}"
  25. }
  26. bintray {
  27. user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
  28. key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY')
  29. publications = ["MyPublication"]
  30. pkg {
  31. repo = "ClothConfig"
  32. name = "ClothConfig2"
  33. userOrg = "shedaniel"
  34. licenses = ["Unlicense"]
  35. vcsUrl = "https://github.com/shedaniel/ClothConfig.git"
  36. version {
  37. name = project.version
  38. vcsTag = project.version
  39. released = new Date()
  40. }
  41. }
  42. }
  43. // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
  44. // if it is present.
  45. // If you remove this task, sources will not be generated.
  46. task sourcesJar(type: Jar, dependsOn: classes) {
  47. classifier = 'sources'
  48. from sourceSets.main.allSource
  49. }
  50. publishing {
  51. publications {
  52. MyPublication(MavenPublication) {
  53. artifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}.jar")) {
  54. builtBy remapJar
  55. }
  56. artifact(sourcesJar) {
  57. builtBy remapSourcesJar
  58. }
  59. }
  60. }
  61. // select the repositories you want to publish to
  62. repositories {
  63. // uncomment to publish to the local maven
  64. // mavenLocal()
  65. }
  66. }