File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ compileOnlyDependencies.extendsFrom(configurations.getByName("compileOnly"))
99
99
100
100
dependencies {
101
101
add(shadowedDependencies.name, " com.squareup.okhttp3:okhttp:4.9.0" )
102
- add(compileOnlyDependencies.name , gradleApi())
102
+ add(" compileOnly " , gradleApi())
103
103
// More dependencies here
104
104
}
105
105
@@ -109,6 +109,9 @@ if (shadow) {
109
109
val shadowedJar = create(" default" ) {
110
110
addProgramJarsFrom(shadowedDependencies)
111
111
addProgramJarsFrom(tasks.getByName(" jar" ))
112
+ // classpath jars are only used by R8 for analysis but are not included in the
113
+ // final shadowed jar.
114
+ addClassPathJarsFrom(compileOnlyDependencies)
112
115
113
116
proguardFile(" rules.pro" )
114
117
registerFilterTransform(listOf (" .*/impldep/META-INF/versions/.*" ))
@@ -125,12 +128,11 @@ if (shadow) {
125
128
126
129
// Allow to compile the module without exposing the shadowedDependencies downstream
127
130
configurations.getByName(" compileOnly" ).extendsFrom(shadowedDependencies)
128
- configurations.getByName(" compileOnly" ).extendsFrom(compileOnlyDependencies)
129
131
configurations.getByName(" testImplementation" ).extendsFrom(shadowedDependencies)
130
132
}
131
133
}
132
134
} else {
133
- configurations.named (" implementation" ).extendsFrom(shadowedDependencies)
135
+ configurations.getByName (" implementation" ).extendsFrom(shadowedDependencies)
134
136
}
135
137
```
136
138
You can’t perform that action at this time.
0 commit comments