Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. maven {
  5. name = "forge"
  6. url = "http://files.minecraftforge.net/maven"
  7. }
  8. maven {
  9. name = "sonatype"
  10. url = "https://oss.sonatype.org/content/repositories/snapshots/"
  11. }
  12. flatDir dirs: "libs/"
  13. }
  14. dependencies {
  15. classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
  16. }
  17. }
  18.  
  19. apply plugin: 'forge'
  20.  
  21. version = "0.7.1.25"
  22. group= "minedonate" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  23. archivesBaseName = "minedonate"
  24.  
  25. [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
  26.  
  27. sourceCompatibility = targetCompatibility = "1.7" // Need this here so eclipse task generates correctly.
  28. compileJava {
  29. sourceCompatibility = targetCompatibility = "1.7"
  30. }
  31.  
  32. minecraft {
  33. version = "1.7.10-10.13.4.1558-1.7.10"
  34. runDir = "eclipse"
  35. }
  36.  
  37.  
  38. configurations {
  39. // configuration that holds jars to include in the jar
  40. extraLibs
  41. }
  42.  
  43. dependencies {
  44. compile files('libs/bukkit.jar', 'libs/we.jar', 'libs/wg.jar', 'libs/pex.jar', 'libs/vault.jar')
  45. compile 'org.apache.commons:commons-dbcp2:2.1.1'
  46. compile 'commons-logging:commons-logging:1.2'
  47. compile 'org.apache.commons:commons-pool2:2.4.2'
  48. extraLibs 'org.apache.commons:commons-dbcp2:2.1.1'
  49. // https://mvnrepository.com/artifact/commons-logging/commons-logging
  50. extraLibs 'commons-logging:commons-logging:1.2'
  51. // https://mvnrepository.com/artifact/org.apache.commons/commons-pool2
  52. extraLibs 'org.apache.commons:commons-pool2:2.4.2'
  53. // you may put jars on which you depend on in ./libs
  54. // or you may define them like so..
  55. //compile "some.group:artifact:version:classifier"
  56. //compile "some.group:artifact:version"
  57.  
  58. // real examples
  59. //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
  60. //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  61.  
  62. // for more info...
  63. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  64. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  65.  
  66. }
  67.  
  68. jar {
  69. from {
  70. configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
  71. }
  72. }
  73.  
  74. compileJava.options.encoding = 'UTF-8'
  75. tasks.withType(JavaCompile) {
  76. options.encoding = 'UTF-8'
  77. }
  78.  
  79. processResources
  80. {
  81. // this will ensure that this task is redone when the versions change.
  82. inputs.property "version", project.version
  83. inputs.property "mcversion", project.minecraft.version
  84.  
  85. // replace stuff in mcmod.info, nothing else
  86. from(sourceSets.main.resources.srcDirs) {
  87. include 'mcmod.info'
  88.  
  89. // replace version and mcversion
  90. expand 'version':project.version, 'mcversion':project.minecraft.version
  91. }
  92.  
  93. // copy everything else, thats not the mcmod.info
  94. from(sourceSets.main.resources.srcDirs) {
  95. exclude 'mcmod.info'
  96. }
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement