MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    关于mirai-console打包插件的问题

    开发交流
    1
    3
    104
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 2
      2938137849 last edited by

      目前使用打包插件时会自动引入 ktor 包,但是只有基础的几个包.
      当我想要引入其他的 ktor 相关的包时使用 buildplugin 会打包不到 jar 文件中去.
      比如这两个

      //	implementation("io.ktor:ktor-client-serialization-jvm:1.6.7")
      //	implementation("io.ktor:ktor-client-json:1.6.7")
      
      1 Reply Last reply Reply Quote 0
      • 2
        2938137849 last edited by

        请问如何解决

        1 Reply Last reply Reply Quote 0
        • 2
          2938137849 last edited by

          已寻找到解决方案
          在gradle.kts中添加shadowjar配置:

          mirai {
          	configureShadow {
          		dependencies {
          			include(dependency("io.ktor:ktor-client-serialization-jvm:1.6.7"))
          			include(dependency("io.ktor:ktor-client-json:1.6.7"))
          		}
          	}
          }
          
          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact