Advertisement
Guest User

Untitled

a guest
Aug 9th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. apply plugin: 'forge'
  2. apply plugin: 'kotlin'
  3. apply plugin: 'idea'
  4.  
  5. buildscript {
  6. ext.kotlinVersion = '1.3.41'
  7. repositories {
  8. mavenCentral()
  9. maven {
  10. name = "forge"
  11. url = "http://files.minecraftforge.net/maven"
  12. }
  13. maven {
  14. name = "sonatype"
  15. url = "https://oss.sonatype.org/content/repositories/snapshots/"
  16. }
  17. }
  18. dependencies {
  19. classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
  20. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
  21. }
  22. }
  23.  
  24. version = "1.0"
  25. group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  26. archivesBaseName = "modid"
  27.  
  28. minecraft {
  29. version = "1.7.10-10.13.4.1614-1.7.10"
  30. runDir = "eclipse"
  31. }
  32.  
  33. configurations {
  34. embed
  35. compile.extendsFrom(embed)
  36. }
  37.  
  38. dependencies {
  39. compile files(
  40. "libs/GalacticraftCore-Dev-1.7-3.0.12.504.jar",
  41. "libs/Galacticraft-Planets-Dev-1.7-3.0.12.504.jar",
  42. "libs/MicdoodleCore-Dev-1.7-3.0.12.504.jar",
  43. "libs/Galacticraft-API-1.7-3.0.12.504.jar",
  44. "libs/industrialcraft-2-2.2.828-experimental-dev.jar",
  45. "libs/CodeChickenCore-1.7.10-1.0.7.47-universal.jar",
  46. "libs/CodeChickenLib-1.7.10-1.1.3.138-universal.jar",
  47. "libs/NotEnoughItems-1.7.10-1.0.5.118-universal.jar")
  48.  
  49. compile fileTree(dir: 'lib', include: ['*.jar'])
  50. embed "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
  51. embed "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
  52. }
  53.  
  54. compileJava {
  55. options.encoding = "UTF-8"
  56. sourceCompatibility = targetCompatibility = '1.8'
  57. }
  58.  
  59. sourceCompatibility = targetCompatibility = '1.8'
  60. compileKotlin.kotlinOptions.jvmTarget = "1.8"
  61.  
  62. manifest {
  63. attributes 'FMLAT': 'example_at.cfg'
  64. }
  65.  
  66. processResources {
  67. // this will ensure that this task is redone when the versions change.
  68. inputs.property "version", project.version
  69. inputs.property "mcversion", project.minecraft.version
  70.  
  71. // replace stuff in mcmod.info, nothing else
  72. from(sourceSets.main.resources.srcDirs) {
  73. include 'mcmod.info'
  74.  
  75. // replace version and mcversion
  76. expand 'version':project.version, 'mcversion':project.minecraft.version
  77. }
  78.  
  79. // copy everything else, thats not the mcmod.info
  80. from(sourceSets.main.resources.srcDirs) {
  81. exclude 'mcmod.info'
  82. }
  83. }
  84.  
  85.  
  86. idea {
  87. module {
  88. inheritOutputDirs = false
  89. outputDir = file('build/classes/main/')
  90. }
  91. }
  92.  
  93. subprojects {
  94. apply plugin: 'idea'
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement