build.gradle 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import net.neoforged.moddevgradle.internal.RunUtils
  2. plugins {
  3. id 'java-library'
  4. id 'idea'
  5. }
  6. repositories {
  7. maven { url = 'https://maven.neoforged.net/releases' }
  8. maven {
  9. name 'Mojang'
  10. url 'https://libraries.minecraft.net'
  11. }
  12. mavenCentral()
  13. }
  14. java {
  15. toolchain {
  16. languageVersion.set(JavaLanguageVersion.of(21))
  17. }
  18. }
  19. compileJava.options.compilerArgs << "-Xlint:all,-classfile,-processing,-deprecation,-this-escape" << "-Werror"
  20. dependencies {
  21. compileOnly "org.jetbrains:annotations:24.0.1"
  22. compileOnly "net.neoforged.fancymodloader:loader:4.0.8"
  23. // This is for javadoc, please do not actually classload anything from the main source set!!!!!!
  24. def jankAssShit = RunUtils.getIntellijOutputDirectory(rootProject)
  25. if (jankAssShit != null) {
  26. jankAssShit = jankAssShit.apply(rootProject).toPath().resolve('production')
  27. compileOnly files(jankAssShit.resolve('classes'), jankAssShit.resolve('resources'))
  28. }
  29. }
  30. jar {
  31. manifest {
  32. attributes(
  33. 'FMLModType': "LIBRARY",
  34. 'Specification-Title': "twilightforest-asm",
  35. 'Specification-Vendor': "TeamTwilight",
  36. 'Specification-Version': "1",
  37. 'Implementation-Title': project.name,
  38. 'Implementation-Version': project.jar.archiveVersion,
  39. 'Implementation-Vendor': "TeamTwilight",
  40. 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  41. )
  42. }
  43. }