Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
High on KOTLIN

Aman Bansal iamanbansal

💭
High on KOTLIN
  • Delhi, India
View GitHub Profile
View project:build.gradle.kts
buildscript {
repositories {
gradlePluginPortal()
jcenter()
google()
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10")
classpath("com.android.tools.build:gradle:4.0.1")
@iamanbansal
iamanbansal / androidApp:build.gradle.kts
Last active Sep 20, 2020
androidApp build.gradle.kts
View androidApp:build.gradle.kts
plugins {
id("com.android.application")
kotlin("android")
id("kotlin-android-extensions")
}
group = "com.aman.helloworldkmm"
version = "1.0-SNAPSHOT"
repositories {
gradlePluginPortal()
@iamanbansal
iamanbansal / share:build.gradle.kts
Last active Sep 20, 2020
shared build.gradle.ktsa
View share:build.gradle.kts
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins {
kotlin("multiplatform")
id("com.android.library")
id("kotlin-android-extensions")
}
group = "com.aman.helloworldkmm"
version = "1.0-SNAPSHOT"
View HomeViewModel.kt
class HomeViewModel @Inject constructor(
private val homeRepository: HomeRepository
) : ViewModel() {
private val compositeDisposable = CompositeDisposable()
private val _homeItem = MutableLiveData<Resource<List<HomeItem>>>()
val homeItem: LiveData<Resource<List<HomeItem>>>
get() = _homeItem