Guest User

Untitled

a guest
Apr 7th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.89 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven {
  5.  
  6. name = "forge"
  7. url = "http://files.minecraftforge.net/maven"
  8. }
  9. mavenCentral()
  10. maven {
  11. name = "sonatype"
  12. url = "https://oss.sonatype.org/content/repositories/snapshots/"
  13. }
  14. }
  15. dependencies {
  16. classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
  17. classpath group: 'com.github.rodionmoiseev.gradle.plugins', name: 'idea-utils', version: '0.2'
  18. }
  19. }
  20.  
  21. import groovy.json.*
  22.  
  23. configurations {
  24. compile
  25. deployJars
  26. }
  27.  
  28. apply plugin: "net.minecraftforge.gradle.forge"
  29. apply plugin: "maven"
  30. apply plugin: "idea-utils"
  31.  
  32. group = "net.doubledoordev.d3core"
  33. version = "1.1.1"
  34.  
  35. targetCompatibility = 1.7
  36. sourceCompatibility = 1.7
  37.  
  38. archivesBaseName = 'D3Core'
  39. def githuborg = 'DoubleDoorDevelopment'
  40. def description = 'DoubleDoor Development Core'
  41. minecraft {
  42. version = "1.9-12.16.0.1853-1.9"
  43. mappings = "snapshot_20160324"
  44. runDir = "run"
  45. }
  46.  
  47. if (System.getenv().BUILD_NUMBER != null) version += "." + System.getenv().BUILD_NUMBER
  48. def builder = new groovy.json.JsonBuilder()
  49. builder (version: version, mcversion: project.minecraft.version, apiversion: project.minecraft.apiVersion)
  50. new File("versions.json").write(builder.toPrettyString())
  51.  
  52. processResources {
  53. from(sourceSets.main.resources.srcDirs) {
  54. expand 'version':project.version, 'mcversion':project.minecraft.version, 'modid':project.archivesBaseName, 'githuborg':githuborg, 'description':description, 'group':project.group, 'artifactId':project.archivesBaseName
  55. }
  56. }
  57.  
  58. task sourcesJar(type: Jar) {
  59. from "LICENSE.txt"
  60. from sourceSets.main.allSource
  61. classifier = 'src'
  62. appendix = project.minecraft.version
  63. manifest {
  64. attributes 'FMLAT': 'D3Core_at.cfg'
  65. }
  66. }
  67.  
  68. task deobfJar(type: Jar) {
  69. from "LICENSE.txt"
  70. from sourceSets.main.output
  71. from (sourceSets.main.allSource.srcDirs) {
  72. include '**/*.java'
  73. }
  74. classifier = 'dev'
  75. appendix = project.minecraft.version
  76. manifest {
  77. attributes 'FMLAT': 'D3Core_at.cfg'
  78. }
  79. }
  80.  
  81. jar {
  82. from "LICENSE.txt"
  83. appendix = project.minecraft.version
  84. manifest {
  85. attributes 'FMLAT': 'D3Core_at.cfg'
  86. }
  87. }
  88.  
  89. artifacts {
  90. archives jar
  91. archives sourcesJar
  92. archives deobfJar
  93. }
  94.  
  95. idea {
  96. project {
  97. copyright {
  98. name = 'New BSD License'
  99. license = file('LICENSE.txt')
  100. }
  101. }
  102. }
  103.  
  104. uploadArchives {
  105. if (project.hasProperty("dddUser") && project.hasProperty("dddUrl") && project.hasProperty("dddPass")) {
  106. repositories {
  107. mavenDeployer {
  108. repository(url: dddUrl) {
  109. authentication(userName: dddUser, password: dddPass)
  110. }
  111. pom {
  112. groupId = project.group
  113. version = project.minecraft.version + "-" + project.version
  114. artifactId = project.archivesBaseName
  115. project {
  116. name project.archivesBaseName
  117. packaging 'jar'
  118. description = description
  119. url 'https://github.com/' + githuborg + '/' + project.archivesBaseName
  120.  
  121. scm {
  122. url 'https://github.com/' + githuborg + '/' + project.archivesBaseName
  123. connection 'scm:git:git://github.com/' + githuborg + '/' + project.archivesBaseName + '.git'
  124. developerConnection 'scm:git:git@github.com:' + githuborg + '/' + project.archivesBaseName + '.git'
  125. }
  126.  
  127. issueManagement {
  128. system 'github'
  129. url 'https://github.com/' + githuborg + '/' + project.archivesBaseName + '/issues'
  130. }
  131.  
  132. licenses {
  133. license {
  134. name 'New BSD License'
  135. url 'https://raw.github.com/' + githuborg + '/' + project.archivesBaseName + '/master/LICENCE.txt'
  136. distribution 'repo'
  137. }
  138. }
  139.  
  140. developers {
  141. developer {
  142. id 'Dries007'
  143. name 'Dries007'
  144. roles { role 'developer' }
  145. }
  146. developer {
  147. id 'Claycorp'
  148. name 'Claycorp'
  149. roles { role 'developer' }
  150. }
  151. }
  152. }
  153. }
  154. }
  155. }
  156. }
  157. }
Add Comment
Please, Sign In to add comment