MiraiForum

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

    Solved 构建不会打包依赖库...

    开发交流
    2
    7
    135
    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.
    • S
      SakiDream last edited by

      刚更新的笨比(从2.9.2更到2.12.3)
      使用 buildPlugin 编译出来的 .mirai2.jar 不会打包依赖库
      但用 buildPluginLegacy 编译出来的 .mirai.jar 可以打包

      29e0e757-a95b-4752-b27f-044a16a3ab65-图片.png

      不知道怎么改才能读到库
      文件位置 项目/libs/xxx.jar

      ae6fd6c8-3caa-4eb0-adcf-632aec0e9183-图片.png

      有大佬能指点一下我这个笨比吗

      1 Reply Last reply Reply Quote 0
      • cssxsh
        cssxsh last edited by

        2022 年了,为什么还在用 libs 文件夹

        S 1 Reply Last reply Reply Quote 0
        • S
          SakiDream @cssxsh last edited by

          @cssxsh 因为我是笨比
          我只会这么整

          cssxsh 1 Reply Last reply Reply Quote 0
          • cssxsh
            cssxsh @SakiDream last edited by

            @SakiDream
            那你应该把你想要引用的库列出来
            让坛友 给你提供 现代化的引用方式

            S 1 Reply Last reply Reply Quote 0
            • S
              SakiDream @cssxsh last edited by

              @cssxsh
              jsoup
              fastjson
              83746d3f-f4d1-43d1-a8ba-a236fa2e5a0e-图片.png

              cssxsh 1 Reply Last reply Reply Quote 0
              • cssxsh
                cssxsh @SakiDream last edited by

                @SakiDream 在 构建不会打包依赖库... 中说:

                jsoup

                implementation("org.jsoup:jsoup:1.15.3")
                implementation("com.alibaba.fastjson2:fastjson2:2.0.14")

                bugjson 我还是建议你不要再用了

                用 Jackson 或者 gson

                implementation("com.google.code.gson:gson:2.9.1")

                其实想用什么库都可以直接到 maven 官网搜
                https://search.maven.org/

                S 1 Reply Last reply Reply Quote 0
                • S
                  SakiDream @cssxsh last edited by

                  @cssxsh 射射大佬

                  1 Reply Last reply Reply Quote 0
                  • Topic has been marked as solved  S SakiDream 
                  • 1 / 1
                  • First post
                    Last post
                  Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact