-
Notifications
You must be signed in to change notification settings - Fork 3
Accompanist Migration Guide
In July 2023, the Accompanist project deprecated the placeholder artifact. This library was forked and published to replace it.
As a summary:
- All code was refactored from the
com.google.accompanist.placeholder
root package tocom.eygraber.compose.placeholder
package. - The Maven coordinates was changed from
com.google.accompanist:accompanist-placeholder
tocom.eygraber:compose-placeholder
.
The following methods below are available for your information only, but may help if you need to migrate from the old package name.
Warning
Use these at your own risk. It's a good idea to make sure that you've made a backup or committed any changes before running these.
You can use the Replace in Path pane (⇧⌘R on Mac) in Android Studio to do a project-wide search and replace.
Android Studio Replace in Path pane
- Find query:
com.google.accompanist.placeholder
- Replace string:
com.eygraber.compose.placeholder
-
Optional: Set the file mask to
*.kt
so that only Kotlin files are searched. Repeat for*.gradle
.
Similar can be achieved in Visual Studio Code. Other IDEs / text editors are available.
These commands while automatically replace any imports and Gradle dependencies for the project in the current directory.
find . -type f \( -name '*.kt' -or -name '*.gradle*' \) \
-exec sed -i '' 's/com\.google\.accompanist\.placeholder/com\.eygraber\.compose\.placeholder/' {} \;
find . -type f \( -name '*.kt' -or -name '*.gradle*' \) \
-exec sed -i 's/com\.google\.accompanist\.placeholder/com\.eygraber\.compose\.placeholder/' {} \;