MiraiForum

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

    用shadow插件打包jar,在build目录找不到

    开发交流
    2
    3
    305
    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.
    • Q
      qingciyue last edited by

      build.gradle.kts

      plugins {
          val kotlinVersion = "1.5.30"
          kotlin("jvm") version kotlinVersion
          kotlin("plugin.serialization") version kotlinVersion
      
          id("net.mamoe.mirai-console") version "2.9.2"
          id("com.github.johnrengelman.shadow") version "7.1.2"
      }
      
      group = "org.example"
      version = "1.0-SNAPSHOT"
      
      repositories {
          maven("https://maven.aliyun.com/repository/public")
          mavenCentral()
          maven(url = "https://jitpack.io")
          maven("https://mvnrepository.com/artifact")
      }
      dependencies {
          // https://mvnrepository.com/artifact/com.alibaba/fastjson
          implementation("com.alibaba:fastjson:1.2.79")
      
      }
      mirai {
          configureShadow {
              dependencies {
                  include(dependency("com.alibaba:fastjson:1.2.79"))
              }
          }
      }
      

      terminal

      7:18:17: Executing task 'shadowJar'...
      
      Starting Gradle Daemon...
      Gradle Daemon started in 1 s 426 ms
      
      > Configure project :
      Warning: Kotlin language settings function 'useExperimentalAnnotation' is deprecated and will be removed in next major releases. Please, use 'optIn' instead.
      
      
      > Task :compileKotlin UP-TO-DATE
      > Task :compileJava UP-TO-DATE
      > Task :processResources UP-TO-DATE
      > Task :classes UP-TO-DATE
      > Task :shadowJar SKIPPED
      
      BUILD SUCCESSFUL in 5s
      3 actionable tasks: 3 up-to-date
      7:18:24: Task execution finished 'shadowJar'.
      
      1 Reply Last reply Reply Quote 0
      • Karlatemp
        Karlatemp last edited by

        使用 buildPlugin

        Q 1 Reply Last reply Reply Quote 0
        • Q
          qingciyue @Karlatemp last edited by

          @Karlatemp
          好的谢谢

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact