Avatar ·

How to remove plain.jar in Spring Boot 2.5+ when building with Gradle (Kotlin DSL)?

Hi! I'm using Spring Boot 2.5.0 with Gradle (Kotlin DSL) and noticed that when building the project, two jar files are generated: `my-app-0.0.1-SNAPSHOT.jar` (working, executable) and `my-app-0.0.1-SNAPSHOT-plain.jar`. \n\nThe latter, as I understand, contains only classes without dependencies and cannot be run. It takes up space and causes confusion in the CI/CD pipeline. I want to get rid of it.\n\nMy `build.gradle.kts` looks like this:\n\n```kotlin\nplugins {\n id("org.springframework.boot") version "2.5.0"\n id("io.spring.dependency-management") version "1.0.11.RELEASE"\n kotlin("jvm") version "1.5.10"\n kotlin("plugin.spring") version "1.5.10"\n}\n\njava.sourceCompatibility = JavaVersion.VERSION_11\n\ndependencies {\n implementation("org.springframework.boot:spring-boot-starter-web")\n implementati