4

`java-library`

 1 year ago
source link: https://pastebin.com/E3Gf83fg
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Untitled

a guest

May 31st, 2023

12 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. plugins {
  2. `java-library`
  3. id("io.papermc.paperweight.userdev") version "1.5.4"
  4. id("xyz.jpenilla.run-paper") version "2.0.1" // Adds runServer and runMojangMappedServer tasks for testing
  5. kotlin("jvm") version "1.8.21"
  6. id("com.github.johnrengelman.shadow") version "7.0.0"
  7. id("io.ktor.plugin") version "2.3.0"
  8. group = "com.github.gameoholic"
  9. version = "0.0.1"
  10. description = "Test"
  11. java {
  12. // Configure the java toolchain. This allows gradle to auto-provision JDK 17 on systems that only have JDK 8 installed for example.
  13. toolchain.languageVersion.set(JavaLanguageVersion.of(17))
  14. application {
  15. mainClass.set("com.github.gameoholic.fancy2fa.ktor.ApplicationKt")
  16. dependencies {
  17. paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT") //the paper dev bundle is a compile-only dependency, paper itself provides it. No need to shade
  18. implementation(kotlin("stdlib-jdk8"))
  19. implementation ("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  20. implementation ("org.mindrot:jbcrypt:0.4") //todo: shade
  21. implementation("net.dv8tion:JDA:5.0.0-beta.9") { //todo: shade
  22. exclude(module = "opus-java")
  23. implementation("io.ktor:ktor-server-netty") //todo: shade
  24. implementation("io.ktor:ktor-server-core") //todo: shade
  25. implementation("ch.qos.logback:logback-classic:1.4.7") //todo: shade
  26. tasks {
  27. // Configure reobfJar to run when invoking the build task
  28. assemble {
  29. dependsOn(reobfJar)
  30. compileJava {
  31. options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
  32. // Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
  33. // See https://openjdk.java.net/jeps/247 for more information.
  34. options.release.set(17)
  35. javadoc {
  36. options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
  37. processResources {
  38. filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
  39. val props = mapOf(
  40. "name" to project.name,
  41. "version" to project.version,
  42. "description" to project.description,
  43. "apiVersion" to "1.19"
  44. inputs.properties(props)
  45. filesMatching("plugin.yml") {
  46. expand(props)
  47. reobfJar {
  48. outputJar.set(layout.buildDirectory.file("libs/PaperweightTestPlugin-${project.version}.jar"))
  49. repositories {
  50. mavenCentral()
  51. application {
  52. mainClass.set("com.github.gameoholic.fancy2fa.ktor.ApplicationKt")

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK