Port of The Aether mod for versions of Minecraft after 1.14
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
5.4 KiB

  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. // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  13. apply plugin: 'eclipse'
  14. apply plugin: 'maven-publish'
  15. version = '1.15.2-v1.5.0'
  16. group = 'com.aether' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  17. archivesBaseName = 'aether'
  18. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  19. minecraft {
  20. // The mappings can be changed at any time, and must be in the following format.
  21. // snapshot_YYYYMMDD Snapshot are built nightly.
  22. // stable_# Stables are built at the discretion of the MCP team.
  23. // Use non-default mappings at your own risk. they may not always work.
  24. // Simply re-run your setup task after changing the mappings to update your workspace.
  25. mappings channel: 'snapshot', version: '20200720-1.15.1'
  26. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  27. accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  28. // Default run configurations.
  29. // These can be tweaked, removed, or duplicated as needed.
  30. runs {
  31. client {
  32. workingDirectory project.file('run')
  33. // Recommended logging data for a userdev environment
  34. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  35. // Recommended logging level for the console
  36. property 'forge.logging.console.level', 'debug'
  37. mods {
  38. examplemod {
  39. source sourceSets.main
  40. }
  41. }
  42. }
  43. server {
  44. workingDirectory project.file('run')
  45. // Recommended logging data for a userdev environment
  46. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  47. // Recommended logging level for the console
  48. property 'forge.logging.console.level', 'debug'
  49. mods {
  50. aether {
  51. source sourceSets.main
  52. }
  53. }
  54. }
  55. data {
  56. workingDirectory project.file('run')
  57. // Recommended logging data for a userdev environment
  58. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  59. // Recommended logging level for the console
  60. property 'forge.logging.console.level', 'debug'
  61. args '--mod', 'aether', '--all', '--output', file('src/generated/resources/')
  62. mods {
  63. aether {
  64. source sourceSets.main
  65. }
  66. }
  67. }
  68. }
  69. }
  70. dependencies {
  71. // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
  72. // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
  73. // The userdev artifact is a special name and will get all sorts of transformations applied to it.
  74. minecraft 'net.minecraftforge:forge:1.15.2-31.2.31'
  75. // You may put jars on which you depend on in ./libs or you may define them like so..
  76. // compile "some.group:artifact:version:classifier"
  77. // compile "some.group:artifact:version"
  78. // Real examples
  79. // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
  80. // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  81. // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
  82. // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  83. // These dependencies get remapped to your current MCP mappings
  84. // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  85. // For more info...
  86. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  87. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  88. }
  89. // Example for how to get properties into the manifest for reading by the runtime..
  90. jar {
  91. manifest {
  92. attributes([
  93. "Specification-Title": "aether",
  94. "Specification-Vendor": "aether",
  95. "Specification-Version": "1", // We are version 1 of ourselves
  96. "Implementation-Title": project.name,
  97. "Implementation-Version": "${version}",
  98. "Implementation-Vendor" :"aether",
  99. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  100. ])
  101. }
  102. }
  103. // Example configuration to allow publishing using the maven-publish task
  104. // we define a custom artifact that is sourced from the reobfJar output task
  105. // and then declare that to be published
  106. // Note you'll need to add a repository here
  107. def reobfFile = file("$buildDir/reobfJar/output.jar")
  108. def reobfArtifact = artifacts.add('default', reobfFile) {
  109. type 'jar'
  110. builtBy 'reobfJar'
  111. }
  112. publishing {
  113. publications {
  114. mavenJava(MavenPublication) {
  115. artifact reobfArtifact
  116. }
  117. }
  118. repositories {
  119. maven {
  120. url "file:///${project.projectDir}/mcmodsrepo"
  121. }
  122. }
  123. }