Skip to content

Commit

Permalink
Kotlin 1.3.70. Replace @UseExperimental with @OptIn.
Browse files Browse the repository at this point in the history
  • Loading branch information
ychescale9 committed Mar 4, 2020
1 parent cfe8391 commit 681736c
Show file tree
Hide file tree
Showing 95 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion buildSrc/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ rootProject.ext.versions = [
firestormGradlePlugin : '0.1.1',
dokka : '0.10.1',
binaryCompatibilityValidator: '0.2.1',
kotlin : '1.3.61',
kotlin : '1.3.70',
detekt : '1.6.0',
kotlinx : [
coroutines: '1.3.3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package reactivecircus.flowbinding
val additionalCompilerArgs = listOf(
"-progressive",
"-XXLanguage:+NewInference",
"-Xuse-experimental=kotlin.Experimental"
"-Xopt-in=kotlin.Experimental"
)
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun OnBackPressedDispatcher.backPresses(owner: LifecycleOwner): Flow<Unit> =
callbackFlow<Unit> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun MenuItem.actionViewEvents(handled: (MenuItemActionViewEvent) -> Boolean = { true }): Flow<MenuItemActionViewEvent> =
callbackFlow<MenuItemActionViewEvent> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun MenuItem.clicks(handled: (MenuItem) -> Boolean = { true }): Flow<Unit> = callbackFlow {
checkMainThread()
val listener = MenuItem.OnMenuItemClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.attachEvents(): Flow<ViewAttachEvent> = callbackFlow<ViewAttachEvent> {
checkMainThread()
val listener = object : View.OnAttachStateChangeListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.clicks(): Flow<Unit> = callbackFlow {
checkMainThread()
val listener = View.OnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.drags(handled: (DragEvent) -> Boolean = { true }): Flow<DragEvent> = callbackFlow {
checkMainThread()
val listener = View.OnDragListener { _, event ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.safeOffer
*/
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN)
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.draws(): Flow<Unit> = callbackFlow {
checkMainThread()
val listener = ViewTreeObserver.OnDrawListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.focusChanges(emitImmediately: Boolean = false): Flow<Boolean> = callbackFlow {
checkMainThread()
val listener = View.OnFocusChangeListener { _, hasFocus ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.safeOffer
*/
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN)
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.globalLayouts(): Flow<Unit> = callbackFlow {
checkMainThread()
val listener = ViewTreeObserver.OnGlobalLayoutListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun ViewGroup.hierarchyChangeEvents(): Flow<HierarchyChangeEvent> = callbackFlow<HierarchyChangeEvent> {
checkMainThread()
val listener = object : ViewGroup.OnHierarchyChangeListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.hovers(handled: (MotionEvent) -> Boolean = { true }): Flow<MotionEvent> =
callbackFlow<MotionEvent> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.keys(handled: (KeyEvent) -> Boolean = { true }): Flow<KeyEvent> = callbackFlow<KeyEvent> {
checkMainThread()
val listener = View.OnKeyListener { _, _, event ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.layoutChangeEvents(): Flow<LayoutChangeEvent> = callbackFlow {
checkMainThread()
val listener =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.layoutChanges(): Flow<Unit> = callbackFlow {
checkMainThread()
val listener =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.longClicks(): Flow<Unit> = callbackFlow {
checkMainThread()
val listener = View.OnLongClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.preDraws(proceedDrawingPass: () -> Boolean): Flow<Unit> = callbackFlow {
checkMainThread()
val listener = ViewTreeObserver.OnPreDrawListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import reactivecircus.flowbinding.common.safeOffer
*/
@RequiresApi(Build.VERSION_CODES.M)
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.scrollChangeEvents(): Flow<ScrollChangeEvent> = callbackFlow {
checkMainThread()
val listener = View.OnScrollChangeListener { v, scrollX, scrollY, oldScrollX, oldScrollY ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.systemUiVisibilityChanges(): Flow<Int> = callbackFlow {
checkMainThread()
val listener = View.OnSystemUiVisibilityChangeListener { flag ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun View.touches(handled: (MotionEvent) -> Boolean = { true }): Flow<MotionEvent> =
callbackFlow<MotionEvent> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun AbsListView.scrollEvents(): Flow<ScrollEvent> = callbackFlow<ScrollEvent> {
checkMainThread()
val listener = object : AbsListView.OnScrollListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun Adapter.dataChanges(emitImmediately: Boolean = false): Flow<Adapter> =
callbackFlow<Adapter> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun <T : Adapter> AdapterView<T>.itemClickEvents(): Flow<AdapterViewItemClickEvent> = callbackFlow {
checkMainThread()
val listener = AdapterView.OnItemClickListener { parent, view, position, id ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun <T : Adapter> AdapterView<T>.itemClicks(): Flow<Int> = callbackFlow {
checkMainThread()
val listener = AdapterView.OnItemClickListener { _, _, position, _ ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun <T : Adapter> AdapterView<T>.itemLongClickEvents(
handled: (AdapterViewItemLongClickEvent) -> Boolean = { true }
): Flow<AdapterViewItemLongClickEvent> = callbackFlow {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun <T : Adapter> AdapterView<T>.itemLongClicks(
handled: () -> Boolean = { true }
): Flow<Int> = callbackFlow {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun <T : Adapter> AdapterView<T>.itemSelections(emitImmediately: Boolean = false): Flow<Int> =
callbackFlow<Int> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun <T : Adapter> AdapterView<T>.selectionEvents(emitImmediately: Boolean = false): Flow<AdapterViewSelectionEvent> =
callbackFlow<AdapterViewSelectionEvent> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import reactivecircus.flowbinding.common.safeOffer
*/
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun AutoCompleteTextView.dismisses(): Flow<Unit> = callbackFlow {
checkMainThread()
val listener = AutoCompleteTextView.OnDismissListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun AutoCompleteTextView.itemClickEvents(): Flow<AdapterViewItemClickEvent> = callbackFlow {
checkMainThread()
val listener = AdapterView.OnItemClickListener { parent, view, position, id ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun CompoundButton.checkedChanges(emitImmediately: Boolean = false): Flow<Boolean> = callbackFlow {
checkMainThread()
val listener = CompoundButton.OnCheckedChangeListener { _, isChecked ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun PopupMenu.dismisses(): Flow<Unit> = callbackFlow {
checkMainThread()
val listener = PopupMenu.OnDismissListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun PopupMenu.itemClicks(): Flow<MenuItem> = callbackFlow {
checkMainThread()
val listener = PopupMenu.OnMenuItemClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun RadioGroup.checkedChanges(emitImmediately: Boolean = false): Flow<Int> = callbackFlow<Int> {
checkMainThread()
val listener = object : RadioGroup.OnCheckedChangeListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun RatingBar.ratingChangeEvents(emitImmediately: Boolean = false): Flow<RatingChangeEvent> = callbackFlow {
checkMainThread()
val listener = RatingBar.OnRatingBarChangeListener { ratingBar, rating, fromUser ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun RatingBar.ratingChanges(emitImmediately: Boolean = false): Flow<Float> = callbackFlow {
checkMainThread()
val listener = RatingBar.OnRatingBarChangeListener { _, rating, _ ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun SearchView.queryTextChanges(emitImmediately: Boolean = false): Flow<CharSequence> = callbackFlow<CharSequence> {
checkMainThread()
val listener = object : SearchView.OnQueryTextListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun SearchView.queryTextEvents(emitImmediately: Boolean = false): Flow<QueryTextEvent> = callbackFlow<QueryTextEvent> {
checkMainThread()
val listener = object : SearchView.OnQueryTextListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun SeekBar.changeEvents(emitImmediately: Boolean = false): Flow<SeekBarChangeEvent> =
callbackFlow<SeekBarChangeEvent> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun SeekBar.progressChanges(emitImmediately: Boolean = false): Flow<Int> = callbackFlow<Int> {
checkMainThread()
val listener = object : SeekBar.OnSeekBarChangeListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun TextView.afterTextChanges(emitImmediately: Boolean = false): Flow<AfterTextChangeEvent> =
callbackFlow<AfterTextChangeEvent> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import reactivecircus.flowbinding.common.startWithCurrentValue
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun TextView.beforeTextChanges(emitImmediately: Boolean = false): Flow<BeforeTextChangeEvent> =
callbackFlow<BeforeTextChangeEvent> {
checkMainThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import reactivecircus.flowbinding.common.safeOffer
* ```
*/
@CheckResult
@UseExperimental(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class)
fun TextView.editorActionEvents(handled: (EditorActionEvent) -> Boolean = { true }): Flow<EditorActionEvent> =
callbackFlow {
checkMainThread()
Expand Down
Loading

0 comments on commit 681736c

Please sign in to comment.