build.gradle 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. subprojects {
  2. apply plugin: 'java'
  3. java.toolchain.languageVersion = JavaLanguageVersion.of(17)
  4. java.withSourcesJar()
  5. java.withJavadocJar()
  6. jar {
  7. manifest {
  8. attributes([
  9. 'Specification-Title' : mod_name,
  10. 'Specification-Vendor' : mod_author,
  11. 'Specification-Version' : project.jar.archiveVersion,
  12. 'Implementation-Title' : project.name,
  13. 'Implementation-Version' : project.jar.archiveVersion,
  14. 'Implementation-Vendor' : mod_author,
  15. 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
  16. 'Timestampe' : System.currentTimeMillis(),
  17. 'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
  18. 'Build-On-Minecraft' : minecraft_version
  19. ])
  20. }
  21. }
  22. repositories {
  23. mavenCentral()
  24. maven {
  25. name = 'Sponge / Mixin'
  26. url = 'https://repo.spongepowered.org/repository/maven-public/'
  27. }
  28. maven {
  29. name = 'BlameJared Maven (CrT / Bookshelf)'
  30. url = 'https://maven.blamejared.com'
  31. }
  32. }
  33. dependencies {
  34. implementation 'org.jetbrains:annotations:21.0.1'
  35. }
  36. tasks.withType(JavaCompile).configureEach {
  37. it.options.encoding = 'UTF-8'
  38. it.options.release = 17
  39. }
  40. }