Skip to content

Instantly share code, notes, and snippets.

View narenmanoharan's full-sized avatar
:shipit:

Naren Manoharan narenmanoharan

:shipit:
View GitHub Profile
apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'org.jmailen.kotlinter'
apply plugin: 'checkstyle'
checkstyle {
toolVersion = "8.28"
}
task checkstyle(type: Checkstyle) {
source("src")
apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'org.jmailen.kotlinter'
apply plugin: 'checkstyle'
checkstyle {
toolVersion = "8.28"
}
task checkstyle(type: Checkstyle) {
source("src")
org.gradle.caching=true
fun <T : View> View.bindView(@IdRes res: Int): MutableBindViewDelegate<T> {
return MutableBindViewDelegate(lazy(LazyThreadSafetyMode.NONE) { findViewById<T>(res)!! })
}
class MutableBindViewDelegate<T>(private val lazy: Lazy<T>) {
private var value: T? = null
operator fun getValue(thisRef: Any?, property: KProperty<*>): T {
return value ?: lazy.getValue(thisRef, property)
object Libs {
val kotlinGradle = "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
val kotlinterGradle = "org.jmailen.gradle:kotlinter-gradle:$kotlinterVersion"
val kotlinAllOpen = "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
}
object Version {
val minSdkVersion = 23
override fun showLogin() {
navigator.goTo(LoginScreen())
}
val intent = Intent().setClassName(applicationId, "com.wealthfront.login.LoginActivity")
startActivity(intent)
interface AuthPortal {
fun getLoginScreen(): Screen<*>
fun getAuthenticateBiometricScreen(): Screen<*>
fun getConfirmBiometricScreen(
accessToken: String,
authenticationCallback: AuthenticationCallback
): Screen<*>
interface AuthPortal {
fun getLoginScreen(): Screen<*>
fun getAuthenticateBiometricScreen(): Screen<*>
fun getConfirmBiometricScreen(
accessToken: String,
authenticationCallback: AuthenticationCallback
): Screen<*>
@Module
abstract class NavigationPortalModule {
@Binds
abstract fun provideAuthPortal(authPortal: AuthPortalImpl): AuthPortal
}