SHARE
TWEET

build.gradle

FlowArg Oct 21st, 2019 (edited) 255 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. buildscript {
  2.     repositories {
  3.         jcenter()
  4.         maven { url = "http://files.minecraftforge.net/maven" }
  5.     }
  6.     dependencies {
  7.         classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
  8.     }
  9. }
  10. apply plugin: 'net.minecraftforge.gradle.forge'
  11. apply plugin: 'maven-publish'
  12. //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  13.  
  14. version = "3.0"
  15. group = "fr.flowarg.gunsofchickens" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  16. archivesBaseName = "Guns of Chickens-1.12.2"
  17.  
  18. sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  19. compileJava {
  20.     sourceCompatibility = targetCompatibility = '1.8'
  21. }
  22.  
  23. minecraft {
  24.     version = "1.12.2-14.23.5.2768"
  25.     runDir = "run"
  26.    
  27.     // the mappings can be changed at any time, and must be in the following format.
  28.     // snapshot_YYYYMMDD   snapshot are built nightly.
  29.     // stable_#            stables are built at the discretion of the MCP team.
  30.     // Use non-default mappings at your own risk. they may not always work.
  31.     // simply re-run your setup task after changing the mappings to update your workspace.
  32.     mappings = "snapshot_20171003"
  33.     // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  34. }
  35.  
  36. repositories
  37. {
  38.     mavenCentral()
  39.     maven
  40.     {
  41.         url "https://flowarg.github.io/maven/"
  42.     }
  43. }
  44.  
  45. dependencies
  46. {
  47.  
  48.     // you may put jars on which you depend on in ./libs
  49.     // or you may define them like this...
  50.     //compile "some.group:artifact:version:classifier"
  51.     //compile "some.group:artifact:version"
  52.      
  53.     // real examples
  54.     // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
  55.     //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  56.     // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
  57.     //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  58.     // my mod : https://minecraft.curseforge.com/api/maven/guns-of-chickens/Guns%20of%20Chickens/1.12.2/Guns%20of%20Chickens-1.12.2-release2.4.jar
  59.     // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
  60.     // except that these dependencies get remapped to your current MCP mappings
  61.     //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  62.     //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  63.  
  64.     // for more info...
  65.     // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  66.     // http://www.gradle.org/docs/current/userguide/dependency_management.html
  67. }
  68.  
  69. publishing
  70. {
  71.     publications
  72.     {
  73.         mavenJava(MavenPublication)
  74.         {
  75.             pom
  76.             {
  77.                 groupId = 'fr.flowarg'
  78.                 version = '3.0'
  79.                 artifactId = 'gunsofchickens'
  80.                 name = 'gunsofchickens'
  81.                 description = 'A Minecraft mod.'
  82.                 url = 'https://github.com/FlowArg/Guns-of-Chickens'
  83.  
  84.                 scm
  85.                 {
  86.                     url = 'https://github.com/FlowArg/Guns-of-Chickens'
  87.                     connection = 'scm:git:git://github.com/FlowArg/Guns-of-Chickens.git'
  88.                     developerConnection = 'scm:git:git@github.com:FlowArg/Guns-of-Chickens.git'
  89.                 }
  90.  
  91.                 issueManagement
  92.                 {
  93.                     system = 'github'
  94.                     url = 'https://github.com/FlowArg/Guns-of-Chickens/issues'
  95.                 }
  96.  
  97.                 licenses
  98.                 {
  99.                     license
  100.                     {
  101.                         name = 'Mod LICENSE'
  102.                         url = 'https://github.com/FlowArg/Guns-of-Chickens/blob/master/LICENSE'
  103.                         distribution = 'repo'
  104.                     }
  105.                 }
  106.             }
  107.         }
  108.     }
  109.     repositories
  110.     {
  111.         maven
  112.         {
  113.             url "https://flowarg.github.io/maven/"
  114.         }
  115.     }
  116. }
  117.  
  118.  
  119. processResources {
  120.     // this will ensure that this task is redone when the versions change.
  121.     inputs.property "version", project.version
  122.     inputs.property "mcversion", project.minecraft.version
  123.  
  124.     // replace stuff in mcmod.info, nothing else
  125.     from(sourceSets.main.resources.srcDirs) {
  126.         include 'mcmod.info'
  127.                
  128.         // replace version and mcversion
  129.         expand 'version':project.version, 'mcversion':project.minecraft.version
  130.     }
  131.        
  132.     // copy everything else except the mcmod.info
  133.     from(sourceSets.main.resources.srcDirs) {
  134.         exclude 'mcmod.info'
  135.     }
  136. }
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