Skip to content

Commit 4c27f73

Browse files
committed
[Feature] Add enabling Java 8 in README.
1 parent 6aeb9ed commit 4c27f73

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,23 @@ Gradle:
3939
implementation 'me.zhanghai.android.fastscroll:library:1.1.4'
4040
```
4141

42+
This library uses [Java 8 bytecode](https://developer.android.com/studio/write/java8-support), so you will need to enable it in your project as well:
43+
44+
```gradle
45+
android {
46+
...
47+
// For Java projects
48+
compileOptions {
49+
sourceCompatibility JavaVersion.VERSION_1_8
50+
targetCompatibility JavaVersion.VERSION_1_8
51+
}
52+
// For Kotlin projects
53+
kotlinOptions {
54+
jvmTarget = JavaVersion.VERSION_1_8.toString()
55+
}
56+
}
57+
```
58+
4259
## Usage
4360

4461
Simply create a `FastScroller` with `FastScrollerBuilder`, and enjoy!

0 commit comments

Comments
 (0)