package net.squanchy.notification

import io.reactivex.Single
import net.squanchy.schedule.domain.view.Event
import net.squanchy.support.system.CurrentTime
import org.threeten.bp.Duration
import org.threeten.bp.ZonedDateTime

class UpcomingEventsService(
    private val service: NotificationService,
    private val currentTime: CurrentTime,
    private val notificationInterval: Duration
) {

    fun upcomingEvents(): Single<List<Event>> {
        val now = currentTime.currentDateTime()
        val notificationIntervalEnd = now.plus(notificationInterval)

        return service.sortedFavourites()
            .map { events -> events.filter { it.zonedStartTime.isAfter(now) } }
            .map { events -> events.filter { isBeforeOrEqualTo(it.zonedStartTime, notificationIntervalEnd) } }
    }

    private fun isBeforeOrEqualTo(start: ZonedDateTime, notificationIntervalEnd: ZonedDateTime): Boolean {
        return start.isBefore(notificationIntervalEnd) || start.isEqual(notificationIntervalEnd)
    }

    fun nextEvents(): Single<List<Event>> {
        val now = currentTime.currentDateTime()
        val notificationIntervalEnd = now.plus(notificationInterval)

        return service.sortedFavourites()
            .map { events -> events.filter { it.zonedStartTime.isAfter(notificationIntervalEnd) } }
    }
}

Transform method to extension function

package net.squanchy.notification

import io.reactivex.Single
import net.squanchy.schedule.domain.view.Event
import net.squanchy.support.system.CurrentTime
import org.threeten.bp.Duration
import org.threeten.bp.ZonedDateTime

class UpcomingEventsService(
    private val service: NotificationService,
    private val currentTime: CurrentTime,
    private val notificationInterval: Duration
) {

    fun upcomingEvents(): Single<List<Event>> {
        val now = currentTime.currentDateTime()
        val notificationIntervalEnd = now.plus(notificationInterval)

        return service.sortedFavourites()
            .map { events -> events.filter { it.zonedStartTime.isAfter(now) } }
            .map { events -> events.filter { it.zonedStartTime.isBeforeOrEqualTo(notificationIntervalEnd) } }
    }

    private fun ZonedDateTime.isBeforeOrEqualTo(other: ZonedDateTime) =
        isBefore(other) || isEqual(other)

    fun nextEvents(): Single<List<Event>> {
        val now = currentTime.currentDateTime()
        val notificationIntervalEnd = now.plus(notificationInterval)

        return service.sortedFavourites()
            .map { events -> events.filter { it.zonedStartTime.isAfter(notificationIntervalEnd) } }
    }
}


@file:Suppress("unused")

object BuildConfig {
    const val kotlinVersion = "1.3.21"
    const val gradleIntellijPluginVersion = "0.3.1"
    const val intellijVersion = "IC-2016.1"
    const val pluginVersion = "1.5.0"
}

Upgrade Gradle Intellij plugin to 0.4.2.

@file:Suppress("unused")

object BuildConfig {
    const val kotlinVersion = "1.3.21"
    const val gradleIntellijPluginVersion = "0.4.2"
    const val intellijVersion = "IC-2016.1"
    const val pluginVersion = "1.5.0"
}


package com.todoist.pojo

open class Project @JvmOverloads constructor(
        id: Long,
        name: String,
        open var color: Int = Colors.DEFAULT_COLOR_ID,
        open var parentId: Long?,
        open var childOrder: Int,
        open var isCollapsed: Boolean = false,
        open var isInbox: Boolean = false,
        open var isTeamInbox: Boolean = false,
        open var isShared: Boolean = false,
        open var isFavorite: Boolean,
        open var isArchived: Boolean = false,
        isDeleted: Boolean = false
) : TodoistObject(id, isDeleted) {
    open var name: String = sanitizeName(name)
        set(value) {
            field = sanitizeName(value)
        }

    open val colorInt get() = Colors.getColor(color)

    companion object {
        const val MAX_DEPTH = 3

        const val MAX_COUNT_FREE = 80
        const val MAX_COUNT_PREMIUM = 300
        const val MAX_COUNT_BUSINESS = 500
        const val MAX_SECTION_COUNT = 10
        const val MAX_ITEM_COUNT_FREE = 150
        const val MAX_ITEM_COUNT_PREMIUM = 300
        const val MAX_COLLABORATOR_COUNT_FREE = 5
        const val MAX_COLLABORATORS_COUNT_PREMIUM = 25
        const val MAX_COLLABORATORS_COUNT_BUSINESS = 50

        @JvmStatic
        fun sanitizeName(name: String): String =
                Sanitizers.PROJECT_NAME_INVALID_PATTERN.matcher(name.trim()).replaceAll(Sanitizers.REPLACEMENT)
    }
}

Increase max section count in projects

package com.todoist.pojo

open class Project @JvmOverloads constructor(
        id: Long,
        name: String,
        open var color: Int = Colors.DEFAULT_COLOR_ID,
        open var parentId: Long?,
        open var childOrder: Int,
        open var isCollapsed: Boolean = false,
        open var isInbox: Boolean = false,
        open var isTeamInbox: Boolean = false,
        open var isShared: Boolean = false,
        open var isFavorite: Boolean,
        open var isArchived: Boolean = false,
        isDeleted: Boolean = false
) : TodoistObject(id, isDeleted) {
    open var name: String = sanitizeName(name)
        set(value) {
            field = sanitizeName(value)
        }

    open val colorInt get() = Colors.getColor(color)

    companion object {
        const val MAX_DEPTH = 3

        const val MAX_COUNT_FREE = 80
        const val MAX_COUNT_PREMIUM = 300
        const val MAX_COUNT_BUSINESS = 500
        const val MAX_SECTION_COUNT = 20
        const val MAX_ITEM_COUNT_FREE = 150
        const val MAX_ITEM_COUNT_PREMIUM = 300
        const val MAX_COLLABORATOR_COUNT_FREE = 5
        const val MAX_COLLABORATORS_COUNT_PREMIUM = 25
        const val MAX_COLLABORATORS_COUNT_BUSINESS = 50

        @JvmStatic
        fun sanitizeName(name: String): String =
                Sanitizers.PROJECT_NAME_INVALID_PATTERN.matcher(name.trim()).replaceAll(Sanitizers.REPLACEMENT)
    }
}


package pl.droidsonroids.droidsmap

import pl.droidsonroids.droidsmap.feature.office.ui.OfficeUiGateway
import pl.droidsonroids.droidsmap.feature.room.ui.RoomUiGateway

class FlowManager(private val officeFeatureGateway: OfficeUiGateway, private val roomFeatureGateway: RoomUiGateway, terminateListener: Terminatable) {

    var currentPerspective = Perspective.OFFICE

    init {
        officeFeatureGateway.registerFlowChangeCallback(this)
        roomFeatureGateway.registerFlowChangeCallback(this)
        officeFeatureGateway.requestOffice()
    }

    fun onBackButtonPressed() {
        if (currentPerspective == Perspective.ROOM) {
            currentPerspective = Perspective.OFFICE

            roomFeatureGateway.onPerspectiveChanged(false)
            officeFeatureGateway.onPerspectiveChanged(true)
        } else {
            officeFeatureGateway.onPerspectiveChanged(false)
        }
    }
}

Implement app gets terminated upon back button press in office perspective

package pl.droidsonroids.droidsmap

import pl.droidsonroids.droidsmap.feature.office.ui.OfficeUiGateway
import pl.droidsonroids.droidsmap.feature.room.ui.RoomUiGateway

class FlowManager(private val officeFeatureGateway: OfficeUiGateway, private val roomFeatureGateway: RoomUiGateway, private val terminateListener: Terminatable) {

    var currentPerspective = Perspective.OFFICE

    init {
        officeFeatureGateway.registerFlowChangeCallback(this)
        roomFeatureGateway.registerFlowChangeCallback(this)
        officeFeatureGateway.requestOffice()
    }

    fun onBackButtonPressed() {
        if (currentPerspective == Perspective.ROOM) {
            currentPerspective = Perspective.OFFICE

            roomFeatureGateway.onPerspectiveChanged(false)
            officeFeatureGateway.onPerspectiveChanged(true)
        } else {
            officeFeatureGateway.onPerspectiveChanged(false)
            terminateListener.onTerminate()
        }
    }
}


package com.reduks.reduks

interface Action<State> {
    fun action(state: State) : State
}

Make default implementation in action interface

package com.reduks.reduks

interface Action<State> {
    fun action(state: State) : State = state
}


Revert back removed method with corresponding deprecation messages

/**
 * Copyright 2013 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package rx.lang.kotlin

import rx.Observable
import rx.Subscriber

deprecated("use observable {} instead")
public fun<T> Function1<Subscriber<in T>, Unit>.asObservable(): Observable<T> {
    return Observable.create(this)
}

deprecated("use deferredObservable {} instead")
public fun<T> Function0<Observable<T>>.defer(): Observable<T> {
    return Observable.defer(this)
}

deprecated("use toObservable() instead")
fun IntRange.asObservable(): Observable<Int> {
    return Observable.range(start, end)
}

deprecated("use toObservable() instead")
public fun<T> Iterable<T>.asObservable(): Observable<T> {
    return Observable.from(this)
}

deprecated("use toSingletonObservable() instead")
public fun<T> T.asObservable(): Observable<T> {
    return Observable.just(this)
}

deprecated("use toObservable() instead")
public fun<T> Throwable.asObservable(): Observable<T> {
    return Observable.error(this)
}

deprecated("use listOf().toObservable() instead")
public fun<T> Pair<T, T>.asObservable(): Observable<T> {
    return Observable.from(listOf(first, second))
}

deprecated("use listOf().toObservable() instead")
public fun<T> Triple<T, T, T>.asObservable(): Observable<T> {
    return Observable.from(listOf(first, second, third))
}

deprecated("use first.mergeWith(second) or listOf(first, second).merge() instead")
public fun<T> Pair<Observable<T>, Observable<T>>.merge(): Observable<T> {
    return Observable.merge(first, second)
}

deprecated("use listOf(first, second, third).merge() instead")
public fun<T> Triple<Observable<T>, Observable<T>, Observable<T>>.merge(): Observable<T> {
    return Observable.merge(first, second, third)
}

deprecated("use listOf(first, second).mergeDelayError() instead")
public fun<T> Pair<Observable<T>, Observable<T>>.mergeDelayError(): Observable<T> {
    return Observable.mergeDelayError(first, second)
}

deprecated("use listOf(first, second, third).mergeDelayError() instead")
public fun<T> Triple<Observable<T>, Observable<T>, Observable<T>>.mergeDelayError(): Observable<T> {
    return Observable.mergeDelayError(first, second, third)
}


/*
 * Copyright 2018 Google, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.plaidapp.core.dagger

import `in`.uncod.android.bypass.Bypass
import `in`.uncod.android.bypass.Markdown
import android.util.DisplayMetrics
import dagger.Module
import dagger.Provides
import javax.inject.Inject

/**
 * Provide [Markdown] to this app's components.
 */
@Module class MarkdownModule @Inject constructor(
    private val displayMetrics: DisplayMetrics,
    private val options: Bypass.Options = Bypass.Options()
) {

    @Provides fun provideMarkdown(): Markdown = Bypass(displayMetrics, options)
}

Clean up unneccessary @Inject and import

/*
 * Copyright 2018 Google, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.plaidapp.core.dagger

import `in`.uncod.android.bypass.Bypass
import `in`.uncod.android.bypass.Markdown
import android.util.DisplayMetrics
import dagger.Module
import dagger.Provides

/**
 * Provide [Markdown] to this app's components.
 */
@Module class MarkdownModule constructor(
    private val displayMetrics: DisplayMetrics,
    private val options: Bypass.Options = Bypass.Options()
) {

    @Provides fun provideMarkdown(): Markdown = Bypass(displayMetrics, options)
}


import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
    repositories { gradleScriptKotlin() }
    dependencies { classpath(kotlinModule("gradle-plugin")) }
}

allprojects {

    group = "org.gradle.script.kotlin.samples.multiprojectci"

    version = "1.0"

    configure(listOf(repositories, buildscript.repositories)) {
        gradleScriptKotlin()
    }
}

// Configure all KotlinCompile tasks on each sub-project
subprojects {
    tasks.withType<KotlinCompile> {
        println("Configuring ${name} in project ${project.name}...")
        kotlinOptions {
            suppressWarnings = true
        }
    }
}

apply {
    plugin("base")
}

dependencies {
    // Make the root project archives configuration depend on every subproject
    subprojects.forEach {
        archives(it)
    }
}

Revert sample to form compatible with dev version

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
    repositories { gradleScriptKotlin() }
    dependencies { classpath(kotlinModule("gradle-plugin")) }
}

allprojects {

    group = "org.gradle.script.kotlin.samples.multiprojectci"

    version = "1.0"

    configure(listOf(repositories, buildscript.repositories)) {
        gradleScriptKotlin()
    }
}

// Configure all KotlinCompile tasks on each sub-project
subprojects {
    tasks.withType<KotlinCompile> {
        println("Configuring ${name} in project ${project.name}...")
        kotlinOptions.suppressWarnings = true
    }
}

apply {
    plugin("base")
}

dependencies {
    // Make the root project archives configuration depend on every subproject
    subprojects.forEach {
        archives(it)
    }
}


package fuel.core

/**
 * Created by Kittinun Vantasin on 5/15/15.
 */

suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
sealed public class Either<out L, out R> {

    public abstract fun component1(): L?
    public abstract fun component2(): R?

    public fun fold(fl: (L) -> Unit, fr: (R) -> Unit) {
        return when (this) {
            is Left<L, R> -> fl(this.left)
            is Right<L, R> -> fr(this.right)
            else -> throw UnsupportedOperationException()
        }
    }

    public fun swap(): Either<R, L> {
        return when (this) {
            is Left<L, R> -> Right(this.left)
            is Right<L, R> -> Left(this.right)
            else -> throw UnsupportedOperationException()
        }
    }

    public fun <X> get(): X {
        @suppress("UNCHECKED_CAST")
        return when (this) {
            is Left<L, R> -> this.left as X
            is Right<L, R> -> this.right as X
            else -> throw UnsupportedOperationException()
        }
    }

    public class Left<L, R>(val left: L) : Either<L, R>() {

        public override fun component1() = left
        public override fun component2() = null

    }

    public class Right<L, R>(val right: R) : Either<L, R>() {

        public override fun component1() = null
        public override fun component2() = right

    }

}

Fix unnecessary extra new line


/*
 * Copyright (C) 2017 Reece H. Dunn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * XPath and XQuery Type System Part 1: Items
 *
 * Reference: https://www.w3.org/TR/xpath-datamodel-31
 * Reference: https://www.w3.org/TR/2012/REC-xmlschema11-1-20120405
 */
package uk.co.reecedunn.intellij.plugin.xdm.model

interface XdmItem: XdmSequenceType

interface XdmFunction: XdmItem

interface XdmMap: XdmFunction

interface XdmArray: XdmFunction

interface XdmNode: XdmItem

interface XdmAttribute: XdmNode

interface XdmComment: XdmNode

interface XdmDocument: XdmNode

interface XdmElement: XdmNode

interface XdmNamespace: XdmNode

interface XdmProcessingInstruction: XdmNode

interface XdmText: XdmNode

Make XdmFunction, XdmNode, and derived types concrete classes.

/*
 * Copyright (C) 2017 Reece H. Dunn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * XPath and XQuery Type System Part 1: Items
 *
 * Reference: https://www.w3.org/TR/xpath-datamodel-31
 * Reference: https://www.w3.org/TR/2012/REC-xmlschema11-1-20120405
 */
package uk.co.reecedunn.intellij.plugin.xdm.model

interface XdmItem: XdmSequenceType

open class XdmFunction: XdmItem

open class XdmMap: XdmFunction()

open class XdmArray: XdmFunction()

open class XdmNode: XdmItem

open class XdmAttribute: XdmNode()

open class XdmComment: XdmNode()

open class XdmDocument: XdmNode()

open class XdmElement: XdmNode()

open class XdmNamespace: XdmNode()

open class XdmProcessingInstruction: XdmNode()

open class XdmText: XdmNode()


package iv_properties

import util.TODO
import util.doc34

class LazyPropertyUsingDelegates(val initializer: () -> Int) {
    val lazyValue: Int by todoTask34()
}

fun todoTask34(): Lazy<Int> = TODO(
    """
        Task 34.
        Read about delegated properties and make the property lazy by using delegates.
    """,
    documentation = doc34()
)

Complete koan 34 (lazily initialized property by delegated property)

package iv_properties

import util.TODO
import util.doc34

class LazyPropertyUsingDelegates(initializer: () -> Int) {
    val lazyValue: Int by lazy(initializer)
}

fun todoTask34(): Lazy<Int> = TODO(
    """
        Task 34.
        Read about delegated properties and make the property lazy by using delegates.
    """,
    documentation = doc34()
)


package chat.rocket.android.app

import android.os.Bundle
import chat.rocket.android.BaseActivity
import chat.rocket.android.R

class AuthenticationActivity : BaseActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_authentication)

        LayoutHelper.androidBug5497Workaround(this)
        addFragment(AuthenticationLoginFragment(), "authenticationServerFragment", R.id.fragment_container)
    }
}

Change AuthenticationLoginFragment to AuthenticationSignUpFragment class.

package chat.rocket.android.app

import android.os.Bundle
import chat.rocket.android.BaseActivity
import chat.rocket.android.R

class AuthenticationActivity : BaseActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_authentication)

        LayoutHelper.androidBug5497Workaround(this)
        addFragment(AuthenticationSignUpFragment(), "authenticationSignUpFragment", R.id.fragment_container)
    }
}


/*
 * Copyright 2014-2019 Julien Guerinet
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.guerinet.mymartlet.parser

import org.threeten.bp.DayOfWeek
import kotlin.test.Test
import kotlin.test.fail

/**
 * Tests for parser.General.kt
 *
 * @author Allan Wang
 * @since 2.3.2
 */
class GeneralTest {

    /**
     * While not all characters have an associated day,
     * all [DayOfWeek] should have an associated character
     */
    @Test
    fun `all DayOfWeek enums accounted for`() {
        DayOfWeek.values().forEach {
            try {
                DayUtils.dayToChar(it)
            } catch (e: Exception) {
                fail("Could not get associated char for ${it.name}")
            }
        }
    }

}

Use NoSuchElementException to capture missing char element

/*
 * Copyright 2014-2019 Julien Guerinet
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.guerinet.mymartlet.parser

import org.threeten.bp.DayOfWeek
import kotlin.test.Test
import kotlin.test.fail

/**
 * Tests for parser.General.kt
 *
 * @author Allan Wang
 * @since 2.3.2
 */
class GeneralTest {

    /**
     * While not all characters have an associated day,
     * all [DayOfWeek] should have an associated character
     */
    @Test
    fun `all DayOfWeek enums accounted for`() {
        DayOfWeek.values().forEach {
            try {
                DayUtils.dayToChar(it)
            } catch (e: NoSuchElementException) {
                fail("Could not get associated char for ${it.name}")
            }
        }
    }

}


/*
 * Copyright (C) 2020 The Dagger Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package dagger.lint

import com.android.tools.lint.client.api.IssueRegistry
import com.android.tools.lint.detector.api.CURRENT_API
import com.android.tools.lint.detector.api.Issue
import com.google.auto.service.AutoService

/**
 * Dagger Lint Issues Registry.
 *
 * A META-INF/services entry is added for this class that Lint will discover and call into for
 * detecting issues.
 */
@AutoService(IssueRegistry::class)
@Suppress("unused", "UnstableApiUsage")
class DaggerIssueRegistry : IssueRegistry() {
  override val api: Int = CURRENT_API
  override val issues: List<Issue> = DaggerKotlinIssueDetector.issues
}

Add minApi and fix current api in Dagger Lint Registry.

/*
 * Copyright (C) 2020 The Dagger Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package dagger.lint

import com.android.tools.lint.client.api.IssueRegistry
import com.android.tools.lint.detector.api.CURRENT_API
import com.android.tools.lint.detector.api.Issue
import com.google.auto.service.AutoService

/**
 * Dagger Lint Issues Registry.
 *
 * A META-INF/services entry is added for this class that Lint will discover and call into for
 * detecting issues.
 */
@AutoService(IssueRegistry::class)
@Suppress("unused", "UnstableApiUsage")
class DaggerIssueRegistry : IssueRegistry() {
  // The minApi is set to the Api this registry was compiled with, if a user has an older Api, Lint
  // will show a warning asking users to upgrade.
  override val minApi: Int = CURRENT_API
  // The api is meant to be the current api for which this registry was compiled, but we set a
  // higher number without depending on a newer Lint to avoid Lint warning users of custom checks
  // that might not work. This value eventually has to be updated as newer Api become available.
  override val api: Int = 8
  override val issues: List<Issue> = DaggerKotlinIssueDetector.issues
}


package lt.markmerkk

/**
 * @author mariusmerkevicius
 * @since 2016-08-09
 */
object Const {
    val DEFAULT_JQL_WORKLOG_TEMPLATE = "key in workedIssues(\"%s\", \"%s\", \"%s\")"
    val DEFAULT_JQL_USER_ISSUES = "(status not in (closed, resolved)) AND (assignee = currentUser() OR reporter = currentUser())"

//    var DEBUG = true

//    val cfgHome: String by lazy {
//
//    }

}

Correct for default issue search

package lt.markmerkk

/**
 * @author mariusmerkevicius
 * @since 2016-08-09
 */
object Const {
    val DEFAULT_JQL_USER_ISSUES = "(status not in (closed, resolved, done))" +
            " AND " +
            "(assignee = currentUser() OR reporter = currentUser() OR watcher = currentUser())"
}


package org.gradle.kotlin.dsl.support

import org.gradle.kotlin.dsl.fixtures.AbstractIntegrationTest
import org.hamcrest.CoreMatchers.containsString
import org.junit.Assert.assertThat
import org.junit.Test

class ImplicitImportsTest : AbstractIntegrationTest() {

    @Test
    fun `implicit imports are fully qualified to allow use of the preferred type amongst those with same simple name in different Gradle API packages`() {

        // given:
        withBuildScript("""

            println("*" + Jar::class.qualifiedName + "*")

        """)

        // when:
        val result = build("help")

        // then:
        assertThat(result.output, containsString("*org.gradle.jvm.tasks.Jar*"))
    }
}

Fix implicit imports tests after upstream default imports unification

package org.gradle.kotlin.dsl.support

import org.gradle.kotlin.dsl.fixtures.AbstractIntegrationTest
import org.hamcrest.CoreMatchers.containsString
import org.junit.Assert.assertThat
import org.junit.Test

class ImplicitImportsTest : AbstractIntegrationTest() {

    @Test
    fun `implicit imports are fully qualified to allow use of the preferred type amongst those with same simple name in different Gradle API packages`() {

        // given:
        withBuildScript("""

            println("*" + Jar::class.qualifiedName + "*")

        """)

        // when:
        val result = build("help")

        // then:
        assertThat(result.output, containsString("*org.gradle.api.tasks.bundling.Jar*"))
    }
}


/*
 * Copyright 2013-2018 Julien Guerinet
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package config

import com.guerinet.weave.config.Source
import kotlinx.serialization.Optional
import kotlinx.serialization.Serializable

/**
 * Base parsed Config Json
 * @author Julien Guerinet
 * @since 5.0.0
 */
@Serializable
class AnalyticsConfig {

    /** List of [Source]s the Strings are coming from */
    val sources: List<Source> = listOf()

    /** Path to the file to write to */
    val path: String = ""

    /** Optional package name used on Android */
    @Optional
    val packageName: String? = null

    /** Name of the column that holds the type */
    val typeColumnName: String = ""

    /** Name of the column that holds the tag */
    val tagColumnName: String = ""
}

Add types list to the Analytics config

/*
 * Copyright 2013-2018 Julien Guerinet
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package config

import com.guerinet.weave.config.Source
import kotlinx.serialization.Optional
import kotlinx.serialization.Serializable

/**
 * Base parsed Config Json
 * @author Julien Guerinet
 * @since 5.0.0
 */
@Serializable
class AnalyticsConfig {

    /** List of [Source]s the Strings are coming from */
    val sources: List<Source> = listOf()

    /** Path to the file to write to */
    val path: String = ""

    /** Optional package name used on Android */
    @Optional
    val packageName: String? = null

    /** Name of the column that holds the type */
    val typeColumnName: String = ""

    /** Name of the column that holds the tag */
    val tagColumnName: String = ""

    /** Types that we should parse these into. Will typically be "Events" and "Screens" */
    val types: List<String> = listOf()
}


/*
 * Copyright 2020, TeamDev. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/**
 * The versions of the libraries to be used.
 *
 * This file defines versions for the dependencies that are not covered by
 * `.config/gradle/dependencies.gradle`.
 */

val spineBaseVersion: String by extra("1.6.6")
val spineCoreVersion: String by extra("1.6.6")
val versionToPublish: String by extra("1.6.6")

Use latest Base and Core versions.

/*
 * Copyright 2020, TeamDev. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/**
 * The versions of the libraries to be used.
 *
 * This file defines versions for the dependencies that are not covered by
 * `.config/gradle/dependencies.gradle`.
 */

val spineBaseVersion: String by extra("1.6.11")
val spineCoreVersion: String by extra("1.6.11")
val versionToPublish: String by extra("1.6.11")


package nl.dionsegijn.konfetti.emitters

import nl.dionsegijn.konfetti.models.ConfettiConfig
import nl.dionsegijn.konfetti.models.LocationModule
import nl.dionsegijn.konfetti.models.Shape
import nl.dionsegijn.konfetti.models.Size
import nl.dionsegijn.konfetti.modules.TimerModule
import nl.dionsegijn.konfetti.modules.VelocityModule

/**
 * Created by dionsegijn on 4/2/17.
 */
open class BurstEmitter(timer: TimerModule, location: LocationModule, velocity: VelocityModule, sizes: Array<Size>, shapes: Array<Shape>, colors: IntArray, config: ConfettiConfig) : Emitter(timer, location, velocity, sizes, shapes, colors, config) {

    private var amountOfParticles = 0

    fun burst(amountOfParticles: Int): BurstEmitter {
        this.amountOfParticles = amountOfParticles
        for (i in 1..amountOfParticles) {
            addConfetti()
        }
        return this
    }

    override fun createConfetti() {
        // Skip implementation since all confetti is already created
    }

    /**
     * Done emitting when all particles disappeared
     */
    override fun isDoneEmitting(): Boolean {
        return particles.size == 0
    }
}

Add max value for burst emitter

package nl.dionsegijn.konfetti.emitters

import nl.dionsegijn.konfetti.models.ConfettiConfig
import nl.dionsegijn.konfetti.models.LocationModule
import nl.dionsegijn.konfetti.models.Shape
import nl.dionsegijn.konfetti.models.Size
import nl.dionsegijn.konfetti.modules.TimerModule
import nl.dionsegijn.konfetti.modules.VelocityModule

/**
 * Created by dionsegijn on 4/2/17.
 */
open class BurstEmitter(timer: TimerModule, location: LocationModule, velocity: VelocityModule, sizes: Array<Size>, shapes: Array<Shape>, colors: IntArray, config: ConfettiConfig) : Emitter(timer, location, velocity, sizes, shapes, colors, config) {

    private var amountOfParticles = 0
        set(value) { if(value > 1000) field = 1000 else field = value }

    fun burst(amountOfParticles: Int): BurstEmitter {
        this.amountOfParticles = amountOfParticles
        for (i in 1..amountOfParticles) {
            addConfetti()
        }
        return this
    }

    override fun createConfetti() {
        // Skip implementation since all confetti is already created
    }

    /**
     * Done emitting when all particles disappeared
     */
    override fun isDoneEmitting(): Boolean {
        return particles.size == 0
    }
}


package substratum.theme.template.internal

object TBOConstants {

    val THEME_READY_PACKAGES = arrayOf(
            "com.google.android.gm",
            "com.google.android.googlequicksearchbox",
            "com.android.vending",
            "com.google.android.apps.plus",
            "com.google.android.talk",
            "com.google.android.youtube",
            "com.google.android.apps.photos",
            "com.google.android.inputmethod.latin"
    )

    val EXTRA_PACKAGE_NAMES = arrayOf(
            "com.google.android.contacts",
            "com.google.android.dialer"
    )
}

Remove EXTRA_PACKAGE_NAMES & Google Photos

package substratum.theme.template.internal

object TBOConstants {

    val THEME_READY_PACKAGES = arrayOf(
            "com.google.android.gm",
            "com.google.android.googlequicksearchbox",
            "com.android.vending",
            "com.google.android.apps.plus",
            "com.google.android.talk",
            "com.google.android.youtube",
            "com.google.android.inputmethod.latin"
    )

}


package org.runestar.client.plugins.dev

import org.kxtra.swing.graphics.drawPoint
import org.runestar.client.game.api.SceneTile
import org.runestar.client.game.api.live.LiveCamera
import org.runestar.client.game.api.live.LiveCanvas
import org.runestar.client.game.raw.Client
import org.runestar.client.plugins.spi.PluginSettings
import org.runestar.client.utils.DisposablePlugin
import java.awt.BasicStroke
import java.awt.Color

class VisibleTilesDebug : DisposablePlugin<PluginSettings>() {

    override val defaultSettings = PluginSettings()

    override fun start() {
        val stroke2 = BasicStroke(2f)
        add(LiveCanvas.repaints.subscribe { g ->
            val camera = LiveCamera.position.sceneTile
            g.stroke = stroke2
            Client.accessor.visibleTiles?.forEachIndexed { x, ys ->
                ys.forEachIndexed { y, b ->
                    val t = SceneTile(camera.x + x - 25, camera.y + y - 25, camera.plane)
                    if (t.isLoaded) {
                        g.color = if (b) Color.RED else Color.BLUE
                        g.draw(t.outline())
                        g.drawPoint(x * 2, 102 - y * 2)
                    }
                }
            }
        })
    }
}


package com.github.pavlospt

import com.android.tools.lint.client.api.IssueRegistry
import com.android.tools.lint.detector.api.Issue
import com.github.pavlospt.misc.IssuesInfo
import java.util.Arrays

class LithoIssueRegistry : IssueRegistry() {

  override fun getIssues(): List<Issue> {
    return listOf(IssuesInfo.LAYOUT_SPEC_NAME_ISSUE,
        IssuesInfo.ANNOTATED_METHOD_VISIBILITY_ISSUE, IssuesInfo.COMPONENT_CONTEXT_NAME_ISSUE_ISSUE,
        IssuesInfo.OPTIONAL_PROP_BEFORE_REQUIRED_ISSUE)
  }
}

Add missing Issue in registry

package com.github.pavlospt

import com.android.tools.lint.client.api.IssueRegistry
import com.android.tools.lint.detector.api.Issue
import com.github.pavlospt.misc.IssuesInfo
import java.util.Arrays

class LithoIssueRegistry : IssueRegistry() {

  override fun getIssues(): List<Issue> {
    return listOf(IssuesInfo.LAYOUT_SPEC_NAME_ISSUE,
        IssuesInfo.ANNOTATED_METHOD_VISIBILITY_ISSUE, IssuesInfo.COMPONENT_CONTEXT_NAME_ISSUE_ISSUE,
        IssuesInfo.OPTIONAL_PROP_BEFORE_REQUIRED_ISSUE, IssuesInfo.POSSIBLE_RESOURCE_TYPE_ISSUE)
  }
}


package io.particle.ecjpake4j

interface EcJPake {

    /** Generate local round 1 ("c1")  */
    fun createLocalRoundOne(): ByteArray

    /** Read round one from other side ("s1")  */
    fun receiveRemoteRoundOne(s1: ByteArray)

    /** Read round two from other side ("s2")  */
    fun receiveRemoteRoundTwo(s2: ByteArray)

    /** Create local round 2 ("c2")  */
    fun createLocalRoundTwo(): ByteArray

    /** Calculate the shared secret, from which the key will be derived */
    fun calculateSharedSecret(): ByteArray

}

enum class Role(val asString: String) {
    SERVER("server"),
    CLIENT("client")
}


package com.github.rnelson.adventofcode.days

import com.github.rnelson.adventofcode.Day

class Day05: Day() {
    init {
        super.setup("05")
    }

    override fun solveA(): String {
        var newInput = input[0]

        var letterFound = true
        while (letterFound) {
            letterFound = false

            for (c in 'a'..'z') {
                val oneMix = "${c.toUpperCase()}$c"
                val twoMix = "$c${c.toUpperCase()}"

                var found = true
                while (found) {
                    val fOneMix = newInput.indexOf(oneMix)
                    val fTwoMix = newInput.indexOf(twoMix)

                    if (fOneMix != -1) {
                        newInput = newInput.replace(oneMix, "")
                        letterFound = true
                    }
                    else if (fTwoMix != -1) {
                        newInput = newInput.replace(twoMix, "")
                        letterFound = true
                    }
                    else {
                        found = false
                    }
                }
            }
        }

        return newInput.length.toString()
    }

    override fun solveB(): String {
        return ""
    }
}

//from string import ascii_lowercase
//
//new_input = INPUT
//
//letter_found = True
//while letter_found:
//letter_found = False
//for c in ascii_lowercase:
//one_mix = c.upper() + c
//two_mix = c + c.upper()
//
//found = True
//while found:
//f_one_mix = new_input.find(one_mix)
//f_two_mix = new_input.find(two_mix)
//
//if f_one_mix != -1:
//new_input = new_input.replace(one_mix, '')
//letter_found = True
//elif f_two_mix != -1:
//new_input = new_input.replace(two_mix, '')
//letter_found = True
//else:
//found = False
//
//print(len(new_input))

Remove poorly formatted Python solution


Add delegated properties for working with PropertiesComponent

// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide.util

import com.intellij.openapi.project.Project
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty

/**
 * @author yole
 */
private fun propComponent(project: Project?): PropertiesComponent {
  return if (project == null) PropertiesComponent.getInstance() else PropertiesComponent.getInstance(project)
}

private fun propName(thisRef: Any, property: KProperty<*>) = thisRef::class.qualifiedName + "." + property.name

private class PropertiesComponentIntProperty(private val project: Project?, private val defaultValue: Int) : ReadWriteProperty<Any, Int> {
  override fun getValue(thisRef: Any, property: KProperty<*>): Int {
    return propComponent(project).getInt(propName(thisRef, property), defaultValue)
  }

  override fun setValue(thisRef: Any, property: KProperty<*>, value: Int) {
    propComponent(project).setValue(propName(thisRef, property), value, defaultValue)
  }
}

private class PropertiesComponentStringProperty(private val project: Project?, private val defaultValue: String) : ReadWriteProperty<Any, String> {
  override fun getValue(thisRef: Any, property: KProperty<*>): String {
    return propComponent(project).getValue(propName(thisRef, property), defaultValue)
  }

  override fun setValue(thisRef: Any, property: KProperty<*>, value: String) {
    propComponent(project).setValue(propName(thisRef, property), value, defaultValue)
  }
}

private class PropertiesComponentBooleanProperty(private val project: Project?, private val defaultValue: Boolean) : ReadWriteProperty<Any, Boolean> {
  override fun getValue(thisRef: Any, property: KProperty<*>): Boolean {
    return propComponent(project).getBoolean(propName(thisRef, property), defaultValue)
  }

  override fun setValue(thisRef: Any, property: KProperty<*>, value: Boolean) {
    propComponent(project).setValue(propName(thisRef, property), value, defaultValue)
  }
}

fun propComponentProperty(project: Project? = null, defaultValue: Int = 0): ReadWriteProperty<Any, Int> =
  PropertiesComponentIntProperty(project, defaultValue)

fun propComponentProperty(project: Project? = null, defaultValue: String = ""): ReadWriteProperty<Any, String> =
  PropertiesComponentStringProperty(project, defaultValue)

fun propComponentProperty(project: Project? = null, defaultValue: Boolean = false): ReadWriteProperty<Any, Boolean> =
  PropertiesComponentBooleanProperty(project, defaultValue)


/*
 * Copyright 2018 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package kotlinx.serialization.json

import kotlin.test.*

class CornerCaseTest {
    @Test
    fun quotedBrace() {
        val tree = parse("""{x: "{"}""")
        assertTrue("x" in tree)
        assertEquals("{", tree.getAs<JsonString>("x").content)
    }

    private fun parse(input: String) = JsonTreeParser(input).readFully() as JsonObject

    @Test
    fun emptyKey() {
        val tree = parse("""{"":"","":""}""")
        assertTrue("" in tree)
        assertEquals("", tree.getAs<JsonString>("").content)
    }

    @Test
    fun emptyValue() {
        assertFailsWith<IllegalArgumentException> {
            parse("""{"X": "foo", "Y"}""")
        }
    }

    @Test
    fun incorrectUnicodeEscape() {
        assertFails {
            parse("""{"X": "\uDD1H"}""")
        }
    }
}


/*
 * Copyright 2019 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import org.gradle.gradlebuild.unittestandcompile.ModuleType

plugins {
    `java-library`
     gradlebuild.classycle
}

description = "Common shared classes without external dependencies"

dependencies {
    implementation(library("jsr305"))
    implementation(library("guava"))
    implementation(library("commons_lang"))
}

gradlebuildJava {
    moduleType = ModuleType.WORKER
}

Remove unnecessary dependency on commons-lang

/*
 * Copyright 2019 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import org.gradle.gradlebuild.unittestandcompile.ModuleType

plugins {
    `java-library`
     gradlebuild.classycle
}

description = "Common shared classes without external dependencies"

dependencies {
    implementation(library("jsr305"))
    implementation(library("guava"))
}

gradlebuildJava {
    moduleType = ModuleType.WORKER
}


package org.jetbrains.haskell.debugger.config

import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.StoragePathMacros
import com.intellij.openapi.components.Storage
import com.intellij.openapi.components.ServiceManager

/**
 * Created by vlad on 8/1/14.
 */

com.intellij.openapi.components.State(
        name = "HaskellDebugConfiguration",
        storages = array(
            Storage(id = "default", file = StoragePathMacros.APP_CONFIG + "/haskelldebug.xml")
        )
)
public class HaskellDebugSettings : PersistentStateComponent<HaskellDebugSettings.State> {
    class object {
        public enum class DebuggerType {
            GHCI
            REMOTE
        }

        public class State {
            public var debuggerType: DebuggerType = DebuggerType.GHCI
            public var remoteDebuggerPath: String? = null
            public var traceOff: Boolean = false
            public var printDebugOutput: Boolean = false
        }

        public fun getInstance(): HaskellDebugSettings {
            val persisted = ServiceManager.getService(javaClass<HaskellDebugSettings>())
            if (persisted == null) {
                return HaskellDebugSettings()
            }
            return persisted
        }
    }

    private var myState = State()

    override fun getState(): State {
        return myState
    }

    override fun loadState(state: State?) {
        if (state == null) {
            throw RuntimeException("given state is null")
        }
        this.myState = state
    }
}

Add automatic configutarion of debugger path

package org.jetbrains.haskell.debugger.config

import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.StoragePathMacros
import com.intellij.openapi.components.Storage
import com.intellij.openapi.components.ServiceManager
import java.io.File
import org.jetbrains.haskell.util.*

/**
 * Created by vlad on 8/1/14.
 */

com.intellij.openapi.components.State(
        name = "HaskellDebugConfiguration",
        storages = array(
            Storage(id = "default", file = StoragePathMacros.APP_CONFIG + "/haskelldebug.xml")
        )
)
public class HaskellDebugSettings : PersistentStateComponent<HaskellDebugSettings.State> {
    class object {
        public enum class DebuggerType {
            GHCI
            REMOTE
        }

        public class State {
            public var debuggerType: DebuggerType = DebuggerType.REMOTE
            public var remoteDebuggerPath: String? = null
            public var traceOff: Boolean = false
            public var printDebugOutput: Boolean = false
        }

        public fun getInstance(): HaskellDebugSettings {
            val persisted = ServiceManager.getService(javaClass<HaskellDebugSettings>())
            if (persisted == null) {
                val settings = HaskellDebugSettings()
                settings.update();
                return settings
            }
            return persisted
        }
    }

    private var myState = State()

    override fun getState(): State {
        return myState
    }

    override fun loadState(state: State?) {
        if (state == null) {
            throw RuntimeException("given state is null")
        }
        this.myState = state

        update()
    }

    private fun update() {
        if (myState.remoteDebuggerPath == null || myState.remoteDebuggerPath == "") {
            myState.remoteDebuggerPath = OS.getDefaultCabalBin() + File.separator + "remote-debugger" + OS.getExe();
        }
    }
}


/*
 * Copyright (C) 2017 Reece H. Dunn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package uk.co.reecedunn.intellij.plugin.xdm.model

interface XdmAtomicValue {
    val lexicalRepresentation: String

    val staticType: XdmSequenceType
}

fun XdmAtomicValue.toInt(): Int {
    return lexicalRepresentation.toInt()
}

Move XdmAtomicType.staticType to a parent XdmExpression interface.

/*
 * Copyright (C) 2017 Reece H. Dunn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package uk.co.reecedunn.intellij.plugin.xdm.model

interface XdmExpression {
    val staticType: XdmSequenceType
}

interface XdmAtomicValue : XdmExpression {
    val lexicalRepresentation: String
}

fun XdmAtomicValue.toInt(): Int {
    return lexicalRepresentation.toInt()
}


Create a ClassWriter that doesn't use reflection when generating a class file

/*
 * Copyright 2017 Michael Rozumyanskiy
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.michaelrocks.paranoid.processor

import io.michaelrocks.grip.ClassRegistry
import io.michaelrocks.grip.mirrors.ClassMirror
import io.michaelrocks.grip.mirrors.Type
import io.michaelrocks.grip.mirrors.getObjectType
import io.michaelrocks.grip.mirrors.getObjectTypeByInternalName
import io.michaelrocks.paranoid.processor.logging.getLogger
import org.objectweb.asm.ClassReader
import org.objectweb.asm.ClassWriter
import java.util.HashSet

class StandaloneClassWriter : ClassWriter {
  private val logger = getLogger()
  private val classRegistry: ClassRegistry

  constructor(flags: Int, classRegistry: ClassRegistry) : super(flags) {
    this.classRegistry = classRegistry
  }

  constructor(classReader: ClassReader, flags: Int, classRegistry: ClassRegistry) : super(classReader, flags) {
    this.classRegistry = classRegistry
  }

  override fun getCommonSuperClass(type1: String, type2: String): String {
    val hierarchy = HashSet<Type>()
    for (mirror in classRegistry.findClassHierarchy(getObjectTypeByInternalName(type1))) {
      hierarchy.add(mirror.type)
    }

    for (mirror in classRegistry.findClassHierarchy(getObjectTypeByInternalName(type2))) {
      if (mirror.type in hierarchy) {
        logger.debug("[getCommonSuperClass]: {} & {} = {}", type1, type2, mirror.access)
        return mirror.type.internalName
      }
    }

    logger.warn("[getCommonSuperClass]: {} & {} = NOT FOUND ", type1, type2)
    return OBJECT_INTERNAL_NAME
  }

  private fun ClassRegistry.findClassHierarchy(type: Type.Object): Sequence<ClassMirror> {
    return generateSequence(getClassMirror(type)) {
      it.superType?.let { getClassMirror(it) }
    }
  }

  companion object {
    private val OBJECT_INTERNAL_NAME = getObjectType<Any>().internalName
  }
}


package chat.rocket.android.util

import android.support.v4.app.Fragment
import android.support.v7.app.AppCompatActivity

fun AppCompatActivity.addFragment(tag: String, layoutId: Int, newInstance: () -> Fragment) {
    val fragment = supportFragmentManager.findFragmentByTag(tag) ?: newInstance()
    supportFragmentManager.beginTransaction().replace(layoutId, fragment, tag).commit()
}

fun AppCompatActivity.addFragmentBackStack(tag: String, layoutId: Int, newInstance: () -> Fragment) {
    val fragment = supportFragmentManager.findFragmentByTag(tag) ?: newInstance()
    supportFragmentManager.beginTransaction().replace(layoutId, fragment, tag).addToBackStack(tag).commit()
}

Add fragment transaction custom animations.

package chat.rocket.android.util

import android.support.v4.app.Fragment
import android.support.v7.app.AppCompatActivity
import chat.rocket.android.R

fun AppCompatActivity.addFragment(tag: String, layoutId: Int, newInstance: () -> Fragment) {
    val fragment = supportFragmentManager.findFragmentByTag(tag) ?: newInstance()
    supportFragmentManager.beginTransaction().replace(layoutId, fragment, tag).commit()
}

fun AppCompatActivity.addFragmentBackStack(tag: String, layoutId: Int, newInstance: () -> Fragment) {
    val fragment = supportFragmentManager.findFragmentByTag(tag) ?: newInstance()
    supportFragmentManager.beginTransaction()
            .setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
            .replace(layoutId, fragment, tag)
            .addToBackStack(tag)
            .commit()
}


plugins {
    `kotlin-dsl`
}

repositories {
    mavenLocal()
    mavenCentral()
    gradlePluginPortal()
    jcenter()
}

dependencies {
    implementation("net.minecrell.licenser:net.minecrell.licenser.gradle.plugin:0.4.1")
    implementation(group = "org.spongepowered", name = "SpongeGradle", version = "0.11.0-SNAPSHOT")
}

Update buildSrc script since SpongeGradle 0.11 is now available.

plugins {
    `kotlin-dsl`
}

repositories {
    mavenLocal()
    mavenCentral()
    gradlePluginPortal()
    maven("https://repo.spongepowered.org/maven")
    jcenter()
}

dependencies {
    implementation("net.minecrell.licenser:net.minecrell.licenser.gradle.plugin:0.4.1")
    implementation(group = "org.spongepowered", name = "spongegradle", version = "0.11.0-SNAPSHOT")
}


package io.particle.mesh.setup.connection

import java.util.*

val BT_SETUP_SERVICE_ID =           UUID.fromString("6FA90001-5C4E-48A8-94F4-8030546F36FC")
val BT_PROTOCOL_VERSION_ID =        UUID.fromString("6FA90002-5C4E-48A8-94F4-8030546F36FC")
val BT_SETUP_TX_CHARACTERISTIC_ID = UUID.fromString("6FA90003-5C4E-48A8-94F4-8030546F36FC")
val BT_SETUP_RX_CHARACTERISTIC_ID = UUID.fromString("6FA90004-5C4E-48A8-94F4-8030546F36FC")

val NORDIC_BT_SETUP_SERVICE_ID =           UUID.fromString("6e400001-b5a3-f393-e0a9-e50e24dcca9e")
val NORDIC_BT_SETUP_TX_CHARACTERISTIC_ID = UUID.fromString("6e400003-b5a3-f393-e0a9-e50e24dcca9e")
val NORDIC_BT_SETUP_RX_CHARACTERISTIC_ID = UUID.fromString("6e400002-b5a3-f393-e0a9-e50e24dcca9e")

Add some documentation to these fields

package io.particle.mesh.setup.connection

import java.util.*

val BT_SETUP_SERVICE_ID =           UUID.fromString("6FA90001-5C4E-48A8-94F4-8030546F36FC")
val BT_PROTOCOL_VERSION_ID =        UUID.fromString("6FA90002-5C4E-48A8-94F4-8030546F36FC")
// this is "TX" from the Device OS perspective, labelled as such to match docs elsewhere.
// from the mobile device perspective, this is the characteristic we will subscribe to
// (i.e.: read from)
val BT_SETUP_TX_CHARACTERISTIC_ID = UUID.fromString("6FA90003-5C4E-48A8-94F4-8030546F36FC")
// this is "RX" from the Device OS perspective
// from the mobile device perspective, this is the characteristic to write to for sending data
// to the device
val BT_SETUP_RX_CHARACTERISTIC_ID = UUID.fromString("6FA90004-5C4E-48A8-94F4-8030546F36FC")


package io.wax911.emoji.buildSrc.common

object Versions {

    const val compileSdk = 29
    const val targetSdk = 29
    const val minSdk = 21

    const val versionCode = 15401
    const val versionName = "1.5.4-alpha01"

    const val mockk = "1.10.0"
    const val junit = "4.13"

    const val timber = "4.7.1"
}

Bump project version from 1.5.4-alpha01 to 1.6.0-alpha01

package io.wax911.emoji.buildSrc.common

object Versions {

    const val compileSdk = 29
    const val targetSdk = 29
    const val minSdk = 21

    const val versionCode = 16001
    const val versionName = "1.6.0-alpha01"

    const val mockk = "1.10.0"
    const val junit = "4.13"

    const val timber = "4.7.1"
}


package com.github.bjoernpetersen.musicbot.api.config

import java.io.File

sealed class UiNode<T>
object TextBox : UiNode<String>()
object PasswordBox : UiNode<String>()
object CheckBox : UiNode<Boolean>()
// TODO sure about that?
data class ActionButton(val label: String, val action: () -> Boolean) : UiNode<String>()

data class NumberBox @JvmOverloads constructor(val min: Int = 0, val max: Int = 100) : UiNode<Int>()
data class FileChooser(val isDirectory: Boolean = true) : UiNode<File>()
data class ChoiceBox<T> @JvmOverloads constructor(
    val refresh: () -> List<T>?,
    val lazy: Boolean = false) : UiNode<T>()

Introduce StringRepresentable interface for Config UI

package com.github.bjoernpetersen.musicbot.api.config

import com.google.common.annotations.Beta
import java.io.File

sealed class UiNode<T>
object TextBox : UiNode<String>()
object PasswordBox : UiNode<String>()
object CheckBox : UiNode<Boolean>()
// TODO sure about that?
@Beta
data class ActionButton<T : StringRepresentable>(val label: String, val action: () -> Boolean) :
    UiNode<T>()

data class NumberBox @JvmOverloads constructor(val min: Int = 0, val max: Int = 100) : UiNode<Int>()
data class FileChooser(val isDirectory: Boolean = true) : UiNode<File>()
data class ChoiceBox<T : StringRepresentable> @JvmOverloads constructor(
    val refresh: () -> List<T>?,
    val lazy: Boolean = false) : UiNode<T>()

/**
 * An object that is representable as a readable String.
 */
interface StringRepresentable {

    val readableString: String
}


package com.github.shiraji.permissionsdispatcherplugin.data

enum class PdVersion {
    NOTFOUND,
    VERSION_2_1_3,
    UNKNOWN;

    companion object {
        fun fromText(versionText: String): PdVersion {
            return when (versionText) {
                "2.1.3" -> VERSION_2_1_3
                else -> UNKNOWN
            }
        }

        const val latestVersion = "2.4.0"
    }
}

Update latest PD version to 3.0.1

package com.github.shiraji.permissionsdispatcherplugin.data

enum class PdVersion {
    NOTFOUND,
    VERSION_2_1_3,
    UNKNOWN;

    companion object {
        fun fromText(versionText: String): PdVersion {
            return when (versionText) {
                "2.1.3" -> VERSION_2_1_3
                else -> UNKNOWN
            }
        }

        const val latestVersion = "3.0.1"
    }
}


package org.luxons.sevenwonders.test.api

import com.fasterxml.jackson.databind.module.SimpleModule
import com.fasterxml.jackson.module.kotlin.KotlinModule
import org.hildan.jackstomp.JackstompClient
import org.luxons.sevenwonders.config.SEVEN_WONDERS_WS_ENDPOINT
import org.luxons.sevenwonders.engine.resources.MutableResources
import org.luxons.sevenwonders.engine.resources.Resources
import org.springframework.messaging.converter.MappingJackson2MessageConverter
import java.util.concurrent.ExecutionException
import java.util.concurrent.TimeoutException

class SevenWondersClient {

    private val client: JackstompClient

    init {
        val customMappingsModule = SimpleModule("ConcreteResourcesDeserializationModule")
        customMappingsModule.addAbstractTypeMapping(Resources::class.java, MutableResources::class.java)

        val mappingJackson2MessageConverter = MappingJackson2MessageConverter()
        mappingJackson2MessageConverter.objectMapper.registerModule(customMappingsModule)
        mappingJackson2MessageConverter.objectMapper.registerModule(KotlinModule())

        client = JackstompClient()
        client.webSocketClient.messageConverter = mappingJackson2MessageConverter
    }

    @Throws(InterruptedException::class, ExecutionException::class, TimeoutException::class)
    fun connect(serverUrl: String): SevenWondersSession {
        val session = client.syncConnect(serverUrl + SEVEN_WONDERS_WS_ENDPOINT)
        return SevenWondersSession(session)
    }

    fun stop() {
        client.stop()
    }
}

Remove unnecessary Resources deserializer in test JacksonMapper

package org.luxons.sevenwonders.test.api

import com.fasterxml.jackson.module.kotlin.KotlinModule
import org.hildan.jackstomp.JackstompClient
import org.luxons.sevenwonders.config.SEVEN_WONDERS_WS_ENDPOINT
import org.springframework.messaging.converter.MappingJackson2MessageConverter
import java.util.concurrent.ExecutionException
import java.util.concurrent.TimeoutException

class SevenWondersClient {

    private val client: JackstompClient

    init {
        val mappingJackson2MessageConverter = MappingJackson2MessageConverter()
        mappingJackson2MessageConverter.objectMapper.registerModule(KotlinModule())

        client = JackstompClient()
        client.webSocketClient.messageConverter = mappingJackson2MessageConverter
    }

    @Throws(InterruptedException::class, ExecutionException::class, TimeoutException::class)
    fun connect(serverUrl: String): SevenWondersSession {
        val session = client.syncConnect(serverUrl + SEVEN_WONDERS_WS_ENDPOINT)
        return SevenWondersSession(session)
    }

    fun stop() {
        client.stop()
    }
}


package com.sebastiansokolowski.auctionhunter.entity

import javax.persistence.*

@Entity
@Table(name = "target")
data class Target(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long = 0,
        var name: String = "",
        var categoryId: String? = null,
        var phrase: String? = null,
        @OneToMany(cascade = [CascadeType.ALL], orphanRemoval = true)
        @JoinColumn(name = "target_id")
        var parameters: MutableList<TargetParameters> = mutableListOf(),
        @OneToMany(cascade = [CascadeType.ALL], orphanRemoval = true)
        @JoinColumn(name = "target_id")
        var offers: MutableList<Offer> = mutableListOf()
)

Make the name field nullable.

package com.sebastiansokolowski.auctionhunter.entity

import javax.persistence.*

@Entity
@Table(name = "target")
data class Target(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long = 0,
        var name: String? = null,
        var categoryId: String? = null,
        var phrase: String? = null,
        @OneToMany(cascade = [CascadeType.ALL], orphanRemoval = true)
        @JoinColumn(name = "target_id")
        var parameters: MutableList<TargetParameters> = mutableListOf(),
        @OneToMany(cascade = [CascadeType.ALL], orphanRemoval = true)
        @JoinColumn(name = "target_id")
        var offers: MutableList<Offer> = mutableListOf()
)


package jetbrains.buildServer.agent

import jetbrains.buildServer.util.pathMatcher.AntPatternFileCollector
import java.io.File

class AntPathMatcher : PathMatcher {
    override fun match(path: File, includeRules: List<String>): List<File> =
            AntPatternFileCollector.scanDir(path, includeRules.toTypedArray(), emptyArray(), ScanOptions)

    companion object {
        private val ScanOptions = arrayOf(
                AntPatternFileCollector.ScanOption.PRIORITIZE_EXCLUDES,
                AntPatternFileCollector.ScanOption.ALLOW_EXTERNAL_SCAN)
    }
}

Fix compilation error after common library method change

package jetbrains.buildServer.agent

import jetbrains.buildServer.util.pathMatcher.AntPatternFileCollector
import java.io.File

class AntPathMatcher : PathMatcher {
    override fun match(path: File, includeRules: List<String>): List<File> =
            AntPatternFileCollector.scanDir(path, includeRules.toTypedArray(), emptyArray(),
                    AntPatternFileCollector.ScanOption.PRIORITIZE_EXCLUDES, AntPatternFileCollector.ScanOption.ALLOW_EXTERNAL_SCAN)

}


package com.jetbrains.rider.plugins.unity.debugger.breakpoints

import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.project.DumbAwareAction
import com.intellij.xdebugger.XDebugSession
import com.intellij.xdebugger.breakpoints.XLineBreakpoint
import com.jetbrains.rider.debugger.breakpoint.DotNetLineBreakpointProperties
import com.jetbrains.rider.debugger.breakpoint.DotNetLineBreakpointType
import com.jetbrains.rider.debugger.breakpoint.IDotNetLineBreakpointPopupActionsProvider

class ConvertToPausepointPopupActionProvider : IDotNetLineBreakpointPopupActionsProvider {
    override fun getCustomPopupMenuActions(breakpoint: XLineBreakpoint<*>, session: XDebugSession?): List<AnAction> {
        if (breakpoint.type is DotNetLineBreakpointType && breakpoint.type !is UnityPausepointBreakpointType) {
            val action = DumbAwareAction.create(UnityPausepointConstants.convertToPausepointText) {
                val dataContext = it.dataContext
                val editor = CommonDataKeys.EDITOR.getData(dataContext) ?: return@create
                val project = editor.project ?: return@create

                @Suppress("UNCHECKED_CAST")
                convertToPausepoint(project, breakpoint as XLineBreakpoint<DotNetLineBreakpointProperties>, editor)
            }
            return listOf<AnAction>(action)
        }
        return emptyList()
    }
}

Hide pausepoint action on non-Unity projects

package com.jetbrains.rider.plugins.unity.debugger.breakpoints

import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.project.DumbAwareAction
import com.intellij.xdebugger.XDebugSession
import com.intellij.xdebugger.breakpoints.XLineBreakpoint
import com.jetbrains.rider.UnityProjectDiscoverer
import com.jetbrains.rider.debugger.breakpoint.DotNetLineBreakpointProperties
import com.jetbrains.rider.debugger.breakpoint.DotNetLineBreakpointType
import com.jetbrains.rider.debugger.breakpoint.IDotNetLineBreakpointPopupActionsProvider

class ConvertToPausepointPopupActionProvider : IDotNetLineBreakpointPopupActionsProvider {
    override fun getCustomPopupMenuActions(breakpoint: XLineBreakpoint<*>, session: XDebugSession?): List<AnAction> {
        if (breakpoint.type is DotNetLineBreakpointType && breakpoint.type !is UnityPausepointBreakpointType) {
            return listOf<AnAction>(ConvertToPausepointAction(breakpoint))
        }
        return emptyList()
    }

    private class ConvertToPausepointAction(private val breakpoint: XLineBreakpoint<*>): DumbAwareAction(UnityPausepointConstants.convertToPausepointText) {
        override fun update(e: AnActionEvent) {
            e.presentation.isVisible = e.project?.let { UnityProjectDiscoverer.getInstance(it).isUnityProject } == true
        }

        override fun actionPerformed(e: AnActionEvent) {
            val project = e.project ?: return
            val editor = e.getData(CommonDataKeys.EDITOR) ?: return

            @Suppress("UNCHECKED_CAST")
            convertToPausepoint(project, breakpoint as XLineBreakpoint<DotNetLineBreakpointProperties>, editor)
        }
    }
}


package org.purescript.psi.`var`

import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiReferenceBase
import org.purescript.psi.PSForeignValueDeclaration

class LocalForeignValueReference(element: PSVar) : PsiReferenceBase<PSVar>(
    element,
    TextRange.allOf(element.text.trim()),
    false
) {

    override fun getVariants(): Array<PSForeignValueDeclaration> {
        return myElement.module.foreignValueDeclarations
    }

    override fun resolve(): PSForeignValueDeclaration? {
        return myElement
            .module
            .foreignValueDeclarations
            .find { it.name == myElement.name }
    }

}

Simplify local foreign value reference

package org.purescript.psi.`var`

import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiReferenceBase
import org.purescript.psi.PSForeignValueDeclaration

class LocalForeignValueReference(element: PSVar) : PsiReferenceBase<PSVar>(
    element,
    TextRange.allOf(element.text.trim()),
    false
) {

    override fun getVariants(): Array<PSForeignValueDeclaration> {
        return myElement.module.foreignValueDeclarations
    }

    override fun resolve(): PSForeignValueDeclaration? {
        return variants.find { it.name == myElement.name }
    }

}


package io.gitlab.arturbosch.tinbo.common

import io.gitlab.arturbosch.tinbo.api.Command
import io.gitlab.arturbosch.tinbo.config.ModeManager
import io.gitlab.arturbosch.tinbo.config.TinboMode
import io.gitlab.arturbosch.tinbo.plugins.TinboContext
import io.gitlab.arturbosch.tinbo.plugins.TinboPlugin
import io.gitlab.arturbosch.tinbo.utils.printlnInfo
import org.springframework.shell.core.annotation.CliAvailabilityIndicator
import org.springframework.shell.core.annotation.CliCommand
import org.springframework.stereotype.Component

/**
 * @author Artur Bosch
 */
@Component
class PluginsCommand(val context: TinboContext) : Command {

	override val id: String = "plugins"

	@CliAvailabilityIndicator("plugins")
	fun onlyInStartMode() = ModeManager.isCurrentMode(TinboMode.START)

	@CliCommand("plugins", help = "Lists all used plugins with their specified versions.")
	fun plugins() {
		val plugins = context.beansOf<TinboPlugin>()
		plugins.forEach { _, plugin ->
			printlnInfo("${plugin.name}: ${plugin.version}")
		}
	}
}

Use a table for plugins output

package io.gitlab.arturbosch.tinbo.common

import io.gitlab.arturbosch.tinbo.api.Command
import io.gitlab.arturbosch.tinbo.config.ModeManager
import io.gitlab.arturbosch.tinbo.config.TinboMode
import io.gitlab.arturbosch.tinbo.model.util.CSVTablePrinter
import io.gitlab.arturbosch.tinbo.plugins.TinboContext
import io.gitlab.arturbosch.tinbo.plugins.TinboPlugin
import io.gitlab.arturbosch.tinbo.plusElementAtBeginning
import org.springframework.shell.core.annotation.CliAvailabilityIndicator
import org.springframework.shell.core.annotation.CliCommand
import org.springframework.stereotype.Component

/**
 * @author Artur Bosch
 */
@Component
class PluginsCommand(val context: TinboContext) : Command {

	override val id: String = "plugins"
	private val csv = CSVTablePrinter()

	@CliAvailabilityIndicator("plugins")
	fun onlyInStartMode() = ModeManager.isCurrentMode(TinboMode.START)

	@CliCommand("plugins", help = "Lists all used plugins with their specified versions.")
	fun plugins(): String {
		val entries = context.beansOf<TinboPlugin>().values
				.map { "${it.name};${it.version}" }
				.plusElementAtBeginning("Name;Version")
		return csv.asTable(entries).joinToString("\n")
	}

}


package org.projectbass.bass.utils

import android.os.Bundle
import com.crashlytics.android.answers.Answers
import com.crashlytics.android.answers.CustomEvent
import com.crashlytics.android.answers.RatingEvent
import com.google.firebase.analytics.FirebaseAnalytics
import org.projectbass.bass.model.Data

/**
 * @author A-Ar Andrew Concepcion
 * *
 * @createdOn 26/10/2017
 */
class AnalyticsUtils(val firebaseAnalytics: FirebaseAnalytics) {

    fun logPostData(data: Data) {
        Answers.getInstance().logCustom(CustomEvent("Data Sent")
                .putCustomAttribute("Operator", data.operator)
                .putCustomAttribute("Bandwidth", data.bandwidth)
                .putCustomAttribute("Signal", data.signal)
        )

        Answers.getInstance().logRating(RatingEvent()
                .putRating(data.mood ?: 0)
                .putContentName("Satisfaction Rating")
                .putContentType("Rating")
                .putContentId("Mood"))

        val bundle = Bundle().apply {
            putString("Operator", data.operator)
            putString("Bandwidth", data.bandwidth)
            putString("Signal", data.signal)
            putInt("Mood", data.mood ?: 0)
        }

        firebaseAnalytics.setUserId(data.imei)
        firebaseAnalytics.logEvent(FirebaseAnalytics.Event.POST_SCORE, bundle)
    }
}

Add connectivity type and operator

package org.projectbass.bass.utils

import android.net.ConnectivityManager
import android.os.Bundle
import com.crashlytics.android.answers.Answers
import com.crashlytics.android.answers.CustomEvent
import com.crashlytics.android.answers.RatingEvent
import com.google.firebase.analytics.FirebaseAnalytics
import org.projectbass.bass.model.Data

/**
 * @author A-Ar Andrew Concepcion
 * *
 * @createdOn 26/10/2017
 */
class AnalyticsUtils(val firebaseAnalytics: FirebaseAnalytics) {

    fun logPostData(data: Data) {
        Answers.getInstance().logCustom(CustomEvent("Data Sent")
                .putCustomAttribute("Operator", data.operator)
                .putCustomAttribute("Bandwidth", data.bandwidth)
                .putCustomAttribute("ConnectionType", if (data.connectivity?.type == ConnectivityManager.TYPE_WIFI) "wifi" else "mobile data")
                .putCustomAttribute("Signal", data.signal)
        )

        Answers.getInstance().logRating(RatingEvent()
                .putRating(data.mood ?: 0)
                .putContentName("Satisfaction Rating")
                .putContentType("Rating")
                .putContentId("Mood"))

        val bundle = Bundle().apply {
            putString("Operator", data.operator)
            putString("Bandwidth", data.bandwidth)
            putString("Signal", data.signal)
            putString("ConnectionType", if (data.connectivity?.type == ConnectivityManager.TYPE_WIFI) "wifi" else "mobile data")
            putInt("Mood", data.mood ?: 0)
        }

        firebaseAnalytics.setUserId(data.imei)
        firebaseAnalytics.setUserProperty("Operator", data.operator)
        firebaseAnalytics.logEvent(FirebaseAnalytics.Event.POST_SCORE, bundle)
    }
}


Add non-null event emitter for Live Data

/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.tv.reference.lifecycle.ext

import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.LiveData
import androidx.lifecycle.MediatorLiveData

/**
 * Extension functions for [LiveData], which use [MediatorLiveData], to allow observing on non-null
 * events.
 *
 * Usage:
 * ```
 * fooLiveData
 *     .observe(this, Observer {
 *       // foo is nullable
 *     })
 *
 * fooLiveData
 *     .nonNull()
 *     .observe(this, {
 *       // foo is non-null
 *     })
 * ```
 */

class NonNullMediatorLiveData<T> : MediatorLiveData<T>()

fun <T> LiveData<T>.nonNull(): NonNullMediatorLiveData<T> {
    val mediator: NonNullMediatorLiveData<T> = NonNullMediatorLiveData()
    mediator.addSource(this) { it?.let { mediator.value = it } }
    return mediator
}

fun <T> NonNullMediatorLiveData<T>.observe(owner: LifecycleOwner, observer: (t: T) -> Unit) {
    this.observe(owner) { it?.let(observer) }
}


Add a generic utility method for depth-first graph traversal

/*
 * Copyright 2016 Michael Rozumyanskiy
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.michaelrocks.lightsaber.processor.graph

import java.util.*

fun <T> DirectedGraph<T>.traverseDepthFirst(
    beforeAdjacent: (T) -> Unit = {},
    afterAdjacent: (T) -> Unit = {}
) {
  val visited = HashSet<T>(size)

  fun traverse(vertex: T) {
    if (visited.add(vertex)) {
      beforeAdjacent(vertex)
      try {
        getAdjacentVertices(vertex)?.forEach { traverse(it) }
      } finally {
        afterAdjacent(vertex)
      }
    }
  }

  vertices.forEach { traverse(it) }
}


package com.lloydramey.cfn.model.resources

import com.lloydramey.cfn.model.Jackson
import net.javacrumbs.jsonunit.JsonMatchers.jsonEquals
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test

class ResourceSerializationTest {
    @Test
    fun deletionPolicies() {
        assertThat(Jackson.mapper.writeValueAsString(DeletionPolicy.Delete), jsonEquals("Delete"))
        assertThat(Jackson.mapper.writeValueAsString(DeletionPolicy.Snapshot), jsonEquals("Snapshot"))
        assertThat(Jackson.mapper.writeValueAsString(DeletionPolicy.Retain), jsonEquals("Retain"))
    }

    @Test
    fun creationPolicies() {
        assertThat(
                Jackson.mapper.writeValueAsString(CreationPolicy(AutoScalingCreationPolicy(2), ResourceSignal(33, 15.minutes()))),
                jsonEquals("{'AutoScalingCreationPolicy': {'MinSuccessfulInstancesPercent': 2}, 'ResourceSignal':{'Count': 33, 'Timeout': 'PT15M'}}")
        )
    }
}

Add simple serialization test for resource

package com.lloydramey.cfn.model.resources

import com.lloydramey.cfn.model.Jackson
import net.javacrumbs.jsonunit.JsonMatchers.jsonEquals
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test

class ResourceSerializationTest {
    @Test
    fun deletionPolicies() {
        assertThat(Jackson.mapper.writeValueAsString(DeletionPolicy.Delete), jsonEquals("Delete"))
        assertThat(Jackson.mapper.writeValueAsString(DeletionPolicy.Snapshot), jsonEquals("Snapshot"))
        assertThat(Jackson.mapper.writeValueAsString(DeletionPolicy.Retain), jsonEquals("Retain"))
    }

    @Test
    fun creationPolicies() {
        assertThat(
                Jackson.mapper.writeValueAsString(CreationPolicy(AutoScalingCreationPolicy(2), ResourceSignal(33, 15.minutes()))),
                jsonEquals("{'AutoScalingCreationPolicy': {'MinSuccessfulInstancesPercent': 2}, 'ResourceSignal':{'Count': 33, 'Timeout': 'PT15M'}}")
        )
    }
    class TestResource(var attribute: String? = null) : ResourceProperties("Test")

    @Test
    fun resource() {

        val res = resource<TestResource>("Id", DeletionPolicy.Retain) {
            attribute = "value"
        }

        assertThat(
                Jackson.mapper.writeValueAsString(res),
                jsonEquals("{'Properties': {'Attribute': 'value'}, 'Type': 'Test', 'DeletionPolicy': 'Retain'}")
        )
    }
}


plugins {
    java
    maven
}

group = "org.gradle.kotlin-dsl"

version = "1.0"

tasks {

    getByName<Upload>("uploadArchives") {

        repositories {

            withConvention(MavenRepositoryHandlerConvention::class) {

                mavenDeployer {

                    withGroovyBuilder {
                        "repository"("url" to uri("$buildDir/m2/releases"))
                        "snapshotRepository"("url" to uri("$buildDir/m2/snapshots"))
                    }

                    pom.project {
                        withGroovyBuilder {
                            "parent" {
                                "groupId"("org.gradle")
                                "artifactId"("kotlin-dsl")
                                "version"("1.0")
                            }
                            "licenses" {
                                "license" {
                                    "name"("The Apache Software License, Version 2.0")
                                    "url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
                                    "distribution"("repo")
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

Add TODO in the maven plugin sample wrt. lazy configuration & task rules

plugins {
    java
    maven
}

group = "org.gradle.kotlin-dsl"

version = "1.0"

tasks {

    // TODO prefer the lazy string invoke once https://github.com/gradle/gradle-native/issues/718 is fixed
    getByName<Upload>("uploadArchives") {

        repositories {

            withConvention(MavenRepositoryHandlerConvention::class) {

                mavenDeployer {

                    withGroovyBuilder {
                        "repository"("url" to uri("$buildDir/m2/releases"))
                        "snapshotRepository"("url" to uri("$buildDir/m2/snapshots"))
                    }

                    pom.project {
                        withGroovyBuilder {
                            "parent" {
                                "groupId"("org.gradle")
                                "artifactId"("kotlin-dsl")
                                "version"("1.0")
                            }
                            "licenses" {
                                "license" {
                                    "name"("The Apache Software License, Version 2.0")
                                    "url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
                                    "distribution"("repo")
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}


package circlet.utils

import com.intellij.credentialStore.*
import com.intellij.ide.passwordSafe.*
import libraries.coroutines.extra.*
import runtime.json.*
import runtime.persistence.*

object IdeaPasswordSafePersistence : Persistence {
    override suspend fun batchGetJson(keys: List<String>): List<Pair<String, JsonElement?>> {
       return keys.map { it to get(it)?.let { jsonElement(it) } }
    }

    override suspend fun putJson(key: String, value: JsonElement) {
        put(key, value.text())
    }

    override suspend fun getJson(key: String): JsonElement? {
        return get(key)?.let { jsonElement(it) }
    }

    override suspend fun batchPutJson(keyValuePairs: List<Pair<String, JsonElement>>) {
        TODO("not implemented")
    }

    override suspend fun put(key: String, value: String) {
        PasswordSafe.instance.setPassword(createCredentialAttributes(key), value)
    }

    override suspend fun get(key: String): String? =
        PasswordSafe.instance.getPassword(createCredentialAttributes(key))

    override suspend fun delete(key: String) {
        PasswordSafe.instance.setPassword(createCredentialAttributes(key), null)
    }

    override suspend fun batchDelete(keys: List<String>) {
        TODO("not implemented")
    }

    override fun forEach(lifetime: Lifetime, key: String, callback: (String?) -> Unit) {
        TODO("not implemented")
    }

    override suspend fun getAllKeys(): List<String> {
        TODO("not implemented")
    }

    override suspend fun clear() {
    }

    private fun createCredentialAttributes(key: String) =
        CredentialAttributes("${javaClass.name}-$key")
}

Rewrite persistence: remove batch methods, impelement a separate specific storage for Arenas

package circlet.utils

import com.intellij.credentialStore.*
import com.intellij.ide.passwordSafe.*
import libraries.coroutines.extra.*
import runtime.json.*
import runtime.persistence.*

object IdeaPasswordSafePersistence : Persistence {

    override suspend fun putJson(key: String, value: JsonElement) {
        put(key, value.text())
    }

    override suspend fun getJson(key: String): JsonElement? {
        return get(key)?.let { jsonElement(it) }
    }

    override suspend fun put(key: String, value: String) {
        PasswordSafe.instance.setPassword(createCredentialAttributes(key), value)
    }

    override suspend fun get(key: String): String? =
        PasswordSafe.instance.getPassword(createCredentialAttributes(key))

    override suspend fun delete(key: String) {
        PasswordSafe.instance.setPassword(createCredentialAttributes(key), null)
    }

    override fun forEach(lifetime: Lifetime, key: String, callback: (String?) -> Unit) {
        TODO("not implemented")
    }

    override suspend fun getAllKeys(): List<String> {
        TODO("not implemented")
    }

    override suspend fun clear() {
    }

    private fun createCredentialAttributes(key: String) =
        CredentialAttributes("${javaClass.name}-$key")
}


/*
 * (C) Copyright 2014 mjahnen <github@mgns.tech>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.github.mjdev.libaums.driver.scsi.commands

import java.nio.ByteBuffer

/**
 * Represents the command to read the capacity from the mass storage device.
 *
 *
 * The data is transferred in the data phase.
 *
 * @author mjahnen
 * @see com.github.mjdev.libaums.driver.scsi.commands.ScsiReadCapacityResponse
 */
class ScsiReadCapacity(lun: Byte) : CommandBlockWrapper(RESPONSE_LENGTH, Direction.IN, lun, LENGTH) {

    override fun serialize(buffer: ByteBuffer) {
        super.serialize(buffer)
        buffer.put(OPCODE)
    }

    companion object {

        private const val RESPONSE_LENGTH = 0x8
        private const val LENGTH: Byte = 0x10
        private const val OPCODE: Byte = 0x25
    }

}

READ CAPACITY(10) is long 10 not 0x10

/*
 * (C) Copyright 2014 mjahnen <github@mgns.tech>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.github.mjdev.libaums.driver.scsi.commands

import java.nio.ByteBuffer

/**
 * Represents the command to read the capacity from the mass storage device.
 *
 *
 * The data is transferred in the data phase.
 *
 * @author mjahnen
 * @see com.github.mjdev.libaums.driver.scsi.commands.ScsiReadCapacityResponse
 */
class ScsiReadCapacity(lun: Byte) : CommandBlockWrapper(RESPONSE_LENGTH, Direction.IN, lun, LENGTH) {

    override fun serialize(buffer: ByteBuffer) {
        super.serialize(buffer)
        buffer.put(OPCODE)
    }

    companion object {

        private const val RESPONSE_LENGTH = 0x8
        private const val LENGTH: Byte = 10
        private const val OPCODE: Byte = 0x25
    }

}


package org.wordpress.aztec.spans

import android.content.Context
import android.graphics.drawable.Drawable
import android.support.v4.content.ContextCompat
import android.view.Gravity
import org.wordpress.aztec.AztecAttributes
import org.wordpress.aztec.AztecText

class AztecAudioSpan(context: Context, drawable: Drawable?, override var nestingLevel: Int,
                     attributes: AztecAttributes = AztecAttributes(),
                     var onAudioTappedListener: AztecText.OnAudioTappedListener? = null,
                     editor: AztecText? = null) :
        AztecMediaSpan(context, drawable, attributes, editor), IAztecFullWidthImageSpan, IAztecSpan {

    override val TAG: String = "audio"

    init {
        setOverlay(0, ContextCompat.getDrawable(context, android.R.drawable.ic_menu_call), Gravity.CENTER)
    }

    override fun onClick() {
        onAudioTappedListener?.onAudioTapped(attributes)
    }
}

Use better audio span overlay icon

package org.wordpress.aztec.spans

import android.content.Context
import android.graphics.drawable.Drawable
import android.support.v4.content.ContextCompat
import android.view.Gravity
import org.wordpress.aztec.AztecAttributes
import org.wordpress.aztec.AztecText

class AztecAudioSpan(context: Context, drawable: Drawable?, override var nestingLevel: Int,
                     attributes: AztecAttributes = AztecAttributes(),
                     var onAudioTappedListener: AztecText.OnAudioTappedListener? = null,
                     editor: AztecText? = null) :
        AztecMediaSpan(context, drawable, attributes, editor), IAztecFullWidthImageSpan, IAztecSpan {

    override val TAG: String = "audio"

    init {
        setOverlay(0, ContextCompat.getDrawable(context, android.R.drawable.ic_lock_silent_mode_off), Gravity.CENTER)
    }

    override fun onClick() {
        onAudioTappedListener?.onAudioTapped(attributes)
    }
}


package org.luxons.sevenwonders.ui.components.game

import com.palantir.blueprintjs.bpIcon
import kotlinx.css.*
import org.luxons.sevenwonders.model.cards.HandRotationDirection
import react.RBuilder
import styled.css
import styled.styledDiv
import styled.styledImg

fun RBuilder.handRotationIndicator(direction: HandRotationDirection) {
    styledDiv {
        css {
            position = Position.absolute
            display = Display.flex
            alignItems = Align.center
            bottom = 25.vh
        }
        val sideDistance = 2.rem
        when (direction) {
            HandRotationDirection.LEFT -> {
                css { left = sideDistance }
                bpIcon("arrow-left", size = 25)
                handCardsImg()
            }
            HandRotationDirection.RIGHT -> {
                css { right = sideDistance }
                handCardsImg()
                bpIcon("arrow-right", size = 25)
            }
        }
    }
}

private fun RBuilder.handCardsImg() {
    styledImg(src = "images/hand-cards5.png") {
        css {
            width = 4.rem
        }
    }
}

Add title on hand rotation direction

package org.luxons.sevenwonders.ui.components.game

import com.palantir.blueprintjs.bpIcon
import kotlinx.css.*
import kotlinx.html.title
import org.luxons.sevenwonders.model.cards.HandRotationDirection
import react.RBuilder
import styled.css
import styled.styledDiv
import styled.styledImg

fun RBuilder.handRotationIndicator(direction: HandRotationDirection) {
    styledDiv {
        css {
            position = Position.absolute
            display = Display.flex
            alignItems = Align.center
            bottom = 25.vh
        }
        attrs {
            title = "Your hand will be passed to the player on your $direction after playing this card."
        }
        val sideDistance = 2.rem
        when (direction) {
            HandRotationDirection.LEFT -> {
                css { left = sideDistance }
                bpIcon("arrow-left", size = 25)
                handCardsImg()
            }
            HandRotationDirection.RIGHT -> {
                css { right = sideDistance }
                handCardsImg()
                bpIcon("arrow-right", size = 25)
            }
        }
    }
}

private fun RBuilder.handCardsImg() {
    styledImg(src = "images/hand-cards5.png") {
        css {
            width = 4.rem
        }
    }
}


/*
 * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
 */

package io.ktor.client.engine.curl.test

import io.ktor.client.*
import io.ktor.client.engine.curl.*
import io.ktor.client.request.*
import kotlinx.coroutines.*
import kotlin.native.concurrent.*
import kotlin.test.*

val backgroundWorker = Worker.start()

class CurlNativeTests {

    @Test
    @Ignore
    fun testDownloadInBackground() {
        backgroundWorker.execute(TransferMode.SAFE, { Unit }) {
            runBlocking {
                val client = HttpClient()
                client.get<String>("http://google.com")
            }
        }.consume { assert(it.isNotEmpty()) }
    }
}

Add "testDownload" curl test to replace ignored "testDownloadInBackground".

/*
 * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
 */

package io.ktor.client.engine.curl.test

import io.ktor.client.*
import io.ktor.client.engine.curl.*
import io.ktor.client.request.*
import kotlinx.coroutines.*
import kotlin.native.concurrent.*
import kotlin.test.*

val backgroundWorker = Worker.start()

class CurlNativeTests {

    @Test
    @Ignore
    fun testDownloadInBackground() {
        backgroundWorker.execute(TransferMode.SAFE, { Unit }) {
            runBlocking {
                val client = HttpClient()
                client.get<String>("http://google.com")
            }
        }.consume { assert(it.isNotEmpty()) }
    }

    @Test
    fun testDownload() {
        runBlocking {
            val client = HttpClient()
            val res = client.get<String>("http://google.com")
            assert(res.isNotEmpty())
        }
    }
}


package uk.co.ribot.androidboilerplate.ui.main

import uk.co.ribot.androidboilerplate.data.model.Ribot
import uk.co.ribot.androidboilerplate.ui.base.BaseMvpPresenter
import uk.co.ribot.androidboilerplate.ui.base.MvpView

object MainContract {

    interface View: MvpView {
        fun showRibots(ribots: List<Ribot>)
        fun showRibotsEmpty()
        fun showError()
    }

    open abstract class Presenter: BaseMvpPresenter<View>() {
        abstract fun loadRibots()
    }
}

Remove modifier 'open'. Is was redundant because 'abstract' is present.

package uk.co.ribot.androidboilerplate.ui.main

import uk.co.ribot.androidboilerplate.data.model.Ribot
import uk.co.ribot.androidboilerplate.ui.base.BaseMvpPresenter
import uk.co.ribot.androidboilerplate.ui.base.MvpView

object MainContract {

    interface View: MvpView {
        fun showRibots(ribots: List<Ribot>)
        fun showRibotsEmpty()
        fun showError()
    }

    abstract class Presenter: BaseMvpPresenter<View>() {
        abstract fun loadRibots()
    }
}