@@ -7,11 +7,11 @@ import java.net.*
7
7
import java.nio.file.*
8
8
9
9
plugins {
10
- id(" com.github.johnrengelman.shadow" )
11
- id(" org.jetbrains.kotlinx.kover" ) // apply plugin to use autocomplete for Kover DSL
10
+ id(" com.github.johnrengelman.shadow" )
11
+ id(" org.jetbrains.kotlinx.kover" ) // apply plugin to use autocomplete for Kover DSL
12
12
}
13
13
14
- configurations{
14
+ configurations {
15
15
val shadowDeps by creating
16
16
compileOnly.configure {
17
17
extendsFrom(shadowDeps)
@@ -58,8 +58,6 @@ val jar by tasks.existing(Jar::class) {
58
58
enabled = false
59
59
}
60
60
61
- val versionFileTask = VersionFile .registerVersionFileTask(project)
62
-
63
61
val shadowJar by tasks.existing(ShadowJar ::class ) {
64
62
// Shadow only byte buddy, do not package kotlin stdlib
65
63
configurations = listOf (project.configurations[" shadowDeps" ])
@@ -72,17 +70,17 @@ val shadowJar by tasks.existing(ShadowJar::class) {
72
70
archiveBaseName.set(jar.flatMap { it.archiveBaseName })
73
71
archiveVersion.set(jar.flatMap { it.archiveVersion })
74
72
manifest {
75
- attributes(mapOf (
76
- " Premain-Class" to " kotlinx.coroutines.debug.AgentPremain" ,
77
- " Can-Redefine-Classes" to " true" ,
78
- " Multi-Release" to " true"
79
- ))
73
+ attributes(
74
+ mapOf (
75
+ " Premain-Class" to " kotlinx.coroutines.debug.AgentPremain" ,
76
+ " Can-Redefine-Classes" to " true" ,
77
+ " Multi-Release" to " true"
78
+ )
79
+ )
80
80
}
81
- VersionFile .fromVersionFile(this , versionFileTask)
82
- duplicatesStrategy = DuplicatesStrategy .FAIL
81
+ // add module-info.class to the META-INF/versions/9/ directory.
83
82
dependsOn(tasks.compileModuleInfoJava)
84
83
doLast {
85
- // add module-info.class to the META-INF/versions/9/ directory.
86
84
// We can't do that directly with the shadowJar task because it doesn't support replacing existing files.
87
85
val zipPath = this @existing.outputs.files.singleFile.toPath()
88
86
val zipUri = URI .create(" jar:${zipPath.toUri()} " )
0 commit comments