Skip to content

Commit 2f0227e

Browse files
authored
style 2
1 parent 208e6bc commit 2f0227e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

kotlinx-coroutines-debug/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,18 @@ java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/management/Mana
172172

173173
#### Build failures due to duplicate resource files
174174

175-
Building a project for Android that depends on `kotlinx-coroutines-debug` (usually introduced by being a transitive
175+
Building an Android project that depends on `kotlinx-coroutines-debug` (usually introduced by being a transitive
176176
dependency of `kotlinx-coroutines-test`) may fail with `DuplicateRelativeFileException` for `META-INF/AL2.0`,
177177
`META-INF/LGPL2.1`, or `win32-x86/attach_hotspot_windows.dll` when trying to merge the Android resource.
178178

179-
The problem is with the fact that Android merges the resources of all its dependencies into a single directory and
180-
complains about conflicts. However:
179+
The problem is that Android merges the resources of all its dependencies into a single directory and complains about
180+
conflicts, but:
181181
* `kotlinx-coroutines-debug` transitively depends on JNA and JNA-platform, both of which include license files in their
182-
META-INF directories. Trying to merge their resources leads to problems, which means that any Android project that
182+
META-INF directories. Trying to merge these files leads to conflicts, which means that any Android project that
183183
depends on JNA and JNA-platform will experience build failures.
184184
* Additionally, `kotlinx-coroutines-debug` embeds `byte-buddy-agent` and `byte-buddy`, along with their resource files.
185185
Then, if the project separately depends on `byte-buddy`, merging the resources of `kotlinx-coroutines-debug` with ones
186-
from `byte-buddy` and `byte-buddy-agent` will lead to problems as the resource files are duplicated.
186+
from `byte-buddy` and `byte-buddy-agent` will lead to conflicts as the resource files are duplicated.
187187

188188
One possible workaround for these issues is to add the following to the `android` block in your gradle file for the
189189
application subproject:
@@ -202,8 +202,8 @@ This will cause the resource merge algorithm to exclude the problematic license
202202
copy of the files needed for `byte-buddy-agent` to work.
203203

204204
Alternatively, avoid depending on `kotlinx-coroutines-debug`. In particular, if the only reason why this library a
205-
dependency of your project is that `kotlinx-coroutines-test` in turn depends on it, you may replace your dependency on
206-
`kotlinx.coroutines.test` with one that excludes `kotlinx-coroutines-debug`. For example, you could replace
205+
dependency of your project is that `kotlinx-coroutines-test` in turn depends on it, you may change your dependency on
206+
`kotlinx.coroutines.test` to exclude `kotlinx-coroutines-debug`. For example, you could replace
207207
```kotlin
208208
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version")
209209
```

0 commit comments

Comments
 (0)