SHARE
TWEET

Untitled

a guest Aug 25th, 2019 218 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. plugins {
  2.     id 'fabric-loom' version '0.2.5-SNAPSHOT'
  3.     id 'maven-publish'
  4. }
  5.  
  6. sourceCompatibility = JavaVersion.VERSION_1_8
  7. targetCompatibility = JavaVersion.VERSION_1_8
  8.  
  9. archivesBaseName = project.archives_base_name
  10. version = project.mod_version
  11. group = project.maven_group
  12.  
  13. minecraft {
  14. }
  15.  
  16. dependencies {
  17.     //to change the versions see the gradle.properties file
  18.     minecraft "com.mojang:minecraft:${project.minecraft_version}"
  19.     mappings "net.fabricmc:yarn:${project.yarn_mappings}"
  20.     modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
  21.     modCompile 'com.github.Cynosphere:VariablePaxels:1.14.4-1.0.1'
  22.  
  23.     // Fabric API. This is technically optional, but you probably want it anyway.
  24.     modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
  25.  
  26.     // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
  27.     // You may need to force-disable transitiveness on them.
  28. }
  29.  
  30. processResources {
  31.     inputs.property "version", project.version
  32.  
  33.     from(sourceSets.main.resources.srcDirs) {
  34.         include "fabric.mod.json"
  35.         expand "version": project.version
  36.     }
  37.  
  38.     from(sourceSets.main.resources.srcDirs) {
  39.         exclude "fabric.mod.json"
  40.     }
  41. }
  42.  
  43. // ensure that the encoding is set to UTF-8, no matter what the system default is
  44. // this fixes some edge cases with special characters not displaying correctly
  45. // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
  46. tasks.withType(JavaCompile) {
  47.     options.encoding = "UTF-8"
  48. }
  49.  
  50. // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
  51. // if it is present.
  52. // If you remove this task, sources will not be generated.
  53. task sourcesJar(type: Jar, dependsOn: classes) {
  54.     classifier = "sources"
  55.     from sourceSets.main.allSource
  56. }
  57.  
  58. jar {
  59.     from "LICENSE"
  60. }
  61.  
  62. // configure the maven publication
  63. publishing {
  64.     publications {
  65.         mavenJava(MavenPublication) {
  66.             // add all the jars that should be included when publishing to maven
  67.             artifact(remapJar) {
  68.                 builtBy remapJar
  69.             }
  70.             artifact(sourcesJar) {
  71.                 builtBy remapSourcesJar
  72.             }
  73.         }
  74.     }
  75.  
  76.     // select the repositories you want to publish to
  77.     repositories {
  78.         maven { url 'https://jitpack.io' }
  79.         // uncomment to publish to the local maven
  80.         // mavenLocal()
  81.     }
  82. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top