@@ -8,14 +8,6 @@ configurations {
8
8
shadowDeps // shaded dependencies, not included into the resulting .pom file
9
9
compileOnly. extendsFrom(shadowDeps)
10
10
runtimeOnly. extendsFrom(shadowDeps)
11
-
12
- /*
13
- * It is possible to extend a particular configuration with shadow,
14
- * but in that case it changes dependency type to "runtime" and resolves it
15
- * (so it cannot be further modified). Otherwise, shadow just ignores all dependencies.
16
- */
17
- shadow. extendsFrom(api) // shadow - resulting configuration with shaded jar file
18
- configureKotlinJvmPlatform(shadow)
19
11
}
20
12
21
13
dependencies {
@@ -39,19 +31,27 @@ java {
39
31
}
40
32
41
33
jar {
34
+ setEnabled(false )
42
35
manifest {
43
36
attributes " Premain-Class" : " kotlinx.coroutines.debug.AgentPremain"
44
37
attributes " Can-Redefine-Classes" : " true"
45
38
}
46
39
}
47
40
48
- shadowJar {
41
+ def shadowJarTask = shadowJar {
49
42
classifier null
50
43
// Shadow only byte buddy, do not package kotlin stdlib
51
44
configurations = [project. configurations. shadowDeps]
52
45
relocate(' net.bytebuddy' , ' kotlinx.coroutines.repackaged.net.bytebuddy' )
53
46
}
54
47
48
+ configurations {
49
+ artifacts {
50
+ add(" apiElements" , shadowJarTask)
51
+ add(" runtimeElements" , shadowJarTask)
52
+ }
53
+ }
54
+
55
55
def commonKoverExcludes =
56
56
// Never used, safety mechanism
57
57
[" kotlinx.coroutines.debug.internal.NoOpProbesKt" ]
0 commit comments