Advertisement
Guest User

Untitled

a guest
Apr 29th, 2019
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. maven { url = 'https://files.minecraftforge.net/maven' }
  4. jcenter()
  5. mavenCentral()
  6. }
  7. dependencies {
  8. classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
  9. }
  10. }
  11. apply plugin: 'net.minecraftforge.gradle'
  12.  
  13. apply plugin: 'eclipse'
  14. apply plugin: 'maven-publish'
  15.  
  16. version = '1.0'
  17. group = 'com.yourname.modid'
  18. archivesBaseName = 'modid'
  19.  
  20. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
  21.  
  22. minecraft {
  23. mappings channel: 'snapshot', version: '20180921-1.13'
  24. runs {
  25. client {
  26. workingDirectory project.file('run')
  27. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  28. property 'forge.logging.console.level', 'debug'
  29. mods {
  30. examplemod {
  31. source sourceSets.main
  32. }
  33. }
  34. }
  35.  
  36. server {
  37. workingDirectory project.file('run')
  38. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  39. property 'forge.logging.console.level', 'debug'
  40. mods {
  41. examplemod {
  42. source sourceSets.main
  43. }
  44. }
  45. }
  46. }
  47. }
  48.  
  49. repositories {
  50. mavenCentral()
  51. }
  52.  
  53. configurations {
  54. embed
  55. }
  56.  
  57. dependencies {
  58. minecraft 'net.minecraftforge:forge:1.13.2-25.0.191'
  59. embed 'org.hibernate:hibernate-agroal:5.3.10.Final'
  60. embed group: 'mysql', name: 'mysql-connector-java', version: '8.0.15'
  61. compile 'org.hibernate:hibernate-agroal:5.3.10.Final'
  62. compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.15'
  63. }
  64.  
  65. jar {
  66. manifest {
  67. attributes([
  68. "Specification-Title": "examplemod",
  69. "Specification-Vendor": "examplemodsareus",
  70. "Specification-Version": "1", // We are version 1 of ourselves
  71. "Implementation-Title": project.name,
  72. "Implementation-Version": "${version}",
  73. "Implementation-Vendor" :"examplemodsareus",
  74. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  75. ])
  76. }
  77. from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
  78. }
  79.  
  80. def reobfFile = file("$buildDir/reobfJar/output.jar")
  81. def reobfArtifact = artifacts.add('default', reobfFile) {
  82. type 'jar'
  83. builtBy 'reobfJar'
  84. }
  85.  
  86. publishing {
  87. publications {
  88. mavenJava(MavenPublication) {
  89. artifact reobfArtifact
  90. }
  91. }
  92. repositories {
  93. maven {
  94. url "file:///${project.projectDir}/mcmodsrepo"
  95. }
  96.  
  97. }
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement