This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.yourapp.plugins | |
import org.gradle.api.Action | |
import org.gradle.api.NamedDomainObjectContainer | |
import org.gradle.api.Plugin | |
import org.gradle.api.Project | |
import org.gradle.api.plugins.ExtensionAware | |
import org.gradle.api.provider.Property | |
import org.gradle.kotlin.dsl.configure | |
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.coroutines.DelicateCoroutinesApi | |
import kotlinx.coroutines.GlobalScope | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.launchIn | |
import kotlinx.coroutines.flow.onEach | |
import kotlinx.coroutines.runBlocking | |
import kotlinx.coroutines.sync.Mutex | |
import kotlinx.coroutines.sync.withLock | |
import kotlin.io.encoding.Base64 | |
import kotlin.io.encoding.ExperimentalEncodingApi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.MutableState | |
import androidx.compose.runtime.State | |
import androidx.compose.runtime.collectAsState | |
import androidx.compose.runtime.remember | |
import androidx.compose.ui.platform.LocalLifecycleOwner | |
import androidx.lifecycle.Lifecycle | |
import androidx.lifecycle.Lifecycle.State.CREATED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.app | |
import android.app.Service | |
import android.content.Intent | |
import android.os.Binder | |
import android.os.IBinder | |
import androidx.compose.material.Text | |
import androidx.compose.runtime.Composable | |
import kotlin.random.Random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.view.View | |
import androidx.annotation.IdRes | |
import androidx.databinding.BindingAdapter | |
import androidx.databinding.adapters.ListenerUtil as FrameworkListenerUtil | |
/** | |
* Designed to track objects passed as optional parameters via static [BindingAdapter] methods. | |
* | |
* Only one instance per instanceResId can be tracked at a time. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.annotation.MainThread | |
import androidx.databinding.ViewDataBinding | |
import androidx.fragment.app.Fragment | |
import androidx.lifecycle.DefaultLifecycleObserver | |
import androidx.lifecycle.LifecycleOwner | |
/** | |
* See the [androidx.databinding.ViewDataBindingKtx] class as to why this works (specifically setLifecycleOwner and startCollection) | |
* [androidx.databinding.ViewDataBindingKtx] has been copied to the gist from the androidx.databinding:databinding-ktx artifact, do not copy into project! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import okhttp3.ResponseBody | |
import retrofit2.* | |
import java.io.IOException | |
import java.lang.reflect.ParameterizedType | |
import java.lang.reflect.Type | |
internal class ResultCallAdapterFactory( | |
private val errorResponseConverterFactory: Converter.Factory, | |
private val errorType: Type, | |
) : CallAdapter.Factory() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.State | |
import androidx.compose.runtime.collectAsState | |
import androidx.compose.runtime.remember | |
import androidx.compose.ui.platform.LocalLifecycleOwner | |
import androidx.lifecycle.Lifecycle | |
import androidx.lifecycle.Lifecycle.State.CREATED | |
import androidx.lifecycle.Lifecycle.State.STARTED | |
import androidx.lifecycle.flowWithLifecycle | |
import kotlinx.coroutines.flow.Flow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.CompositionLocalProvider | |
import androidx.compose.runtime.ProvidableCompositionLocal | |
import androidx.compose.runtime.staticCompositionLocalOf | |
import kotlin.reflect.KClass | |
sealed class Providable<T : Any>( | |
val type: KClass<T> | |
) { | |
abstract val factory: () -> T |
NewerOlder