Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear guidance on setting up Showkase for debug only builds #369

Merged
merged 1 commit into from
Dec 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,25 @@ Showkase browser.
Showkase supports both ksp and kapt. By default, it uses kapt as we only recently added ksp support.


#### If you are using kapt
#### If you only want Showkase to be available in only debug builds (Recommended and practical for most use cases)

```kotlin
implementation "com.airbnb.android:showkase:1.0.2"
kapt "com.airbnb.android:showkase-processor:1.0.2"
debugImplementation "com.airbnb.android:showkase:1.0.2"
implementation "com.airbnb.android:showkase-annotation:1.0.2"
kspDebug "com.airbnb.android:showkase-processor:1.0.2" or kaptDebug "com.airbnb.android:showkase-processor:1.0.2"
```

#### If you are using ksp
#### If you want Showkase to be available in your release builds
```kotlin
implementation "com.airbnb.android:showkase:1.0.2"
ksp "com.airbnb.android:showkase-processor:1.0.2"
ksp "com.airbnb.android:showkase-processor:1.0.2" or kapt "com.airbnb.android:showkase-processor:1.0.2"

```

You will also need to ensure that the generated file isn't being stripped away and will need to add this to your proguard file -

```
-keep public class * extends com.airbnb.android.showkase.models.ShowkaseProvider
```

**Step 2**: Add the relevant annotations for every UI element that should be a part of the
Expand Down Expand Up @@ -142,14 +150,6 @@ class MyRootModule: ShowkaseRootModule
startActivity(Showkase.getBrowserIntent(context))
```

Most users of Showkase will use it in their debug builds. However, if you have a use case where you would
like to use Showkase in a release build (or a build that has minification enabled), you will need to add
the following line to your proguard rules

```
-keep public class * extends com.airbnb.android.showkase.models.ShowkaseProvider
```

## Documentation

##### 1. @ShowkaseComposable
Expand Down
Loading