build.gradle 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. plugins {
  2. id 'java-library'
  3. id 'idea'
  4. id 'net.neoforged.gradle.platform' version '7.0.133'
  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. base {
  21. archivesName = "${project.mod_id}-asm-${project.minecraft_version}"
  22. }
  23. dependencies {
  24. compileOnly "org.jetbrains:annotations:24.0.1"
  25. compileOnly "net.neoforged.fancymodloader:loader:3.0.45"
  26. // This is for javadoc, please do not actually classload anything from the main source set!!!!!!
  27. compileOnly project(":")
  28. }
  29. jar {
  30. manifest {
  31. attributes(
  32. 'FMLModType': "LIBRARY",
  33. 'Specification-Title': "twilightforest-asm",
  34. 'Specification-Vendor': "TeamTwilight",
  35. 'Specification-Version': "1",
  36. 'Implementation-Title': project.name,
  37. 'Implementation-Version': project.jar.archiveVersion,
  38. 'Implementation-Vendor': "TeamTwilight",
  39. 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  40. )
  41. }
  42. }