This file contains hidden or 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
| > Task :core:javaDocReleaseGeneration | |
| Initializing plugins | |
| Dokka is performing: documentation for :core | |
| Validity check | |
| Creating documentation models | |
| WARN: The registry key 'java.correct.class.type.by.place.resolve.scope' accessed, but not loaded yet | |
| WARN: Could not read file: /home/automata/.gradle/caches/transforms-4/dcd95f8b56c207691fdd970aa90eef3d/transformed/lottie-compose-6.4.0-api.jar!/com/airbnb/lottie/compose/LottieCompositionSpec.class; size in bytes: 1392; file type: CLASS | |
| java.lang.UnsupportedOperationException: PermittedSubclasses requires ASM9 | |
| at org.jetbrains.org.objectweb.asm.ClassVisitor.visitPermittedSubclass(ClassVisitor.java:266) |
This file contains hidden or 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
| sealed class DataState<T> { | |
| sealed class DataMissing : DataState<Nothing>() { | |
| object NotInitialized : DataMissing() | |
| data class Error(cause: Exception) : DataMissing() | |
| } | |
| data class DataLoaded<T>(val data: T) : DataState<T>() |
This file contains hidden or 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 com.lukaszkalnik.tmdbapp.gradle.DependenciesPlugin | |
| plugins { | |
| // ... other plugins (android-application etc.) | |
| id("com.lukaszkalnik.tmdbapp.dependencies") | |
| } | |
| dependencies { | |
| implementation("io.insert-koin:koin-core:${DependenciesPlugin.koinVersion}") | |
| // .. other dependencies |
This file contains hidden or 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
| plugins { | |
| `kotlin-dsl` | |
| } | |
| repositories { | |
| mavenCentral() | |
| } | |
| gradlePlugin { | |
| plugins { |
This file contains hidden or 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.lukaszkalnik.tmdbapp.gradle | |
| import org.gradle.api.Plugin | |
| import org.gradle.api.Project | |
| class DependenciesPlugin : Plugin<Project> { | |
| override fun apply(target: Project) { | |
| } |
This file contains hidden or 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
| plugins { | |
| `kotlin-dsl` | |
| } | |
| repositories { | |
| mavenCentral() | |
| } |
This file contains hidden or 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
| coroutineScope.launch { | |
| tmdbApi.getConfiguration().fold( | |
| ifLeft = { apiError -> showError(apiError) }, | |
| ifRight = { configuration -> saveConfiguration(configuration) } | |
| ) | |
| } |
This file contains hidden or 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
| Retrofit.Builder() | |
| .baseUrl("https://api.themoviedb.org/3/") | |
| .addConverterFactory(Json.asConverterFactory(contentType)) | |
| .addCallAdapterFactory(EitherCallAdapterFactory()) | |
| .build() | |
| .create(TmdbApi::class.java) |
This file contains hidden or 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
| internal class EitherCallAdapterFactory : CallAdapter.Factory() { | |
| override fun get( | |
| returnType: Type, | |
| annotations: Array<Annotation>, | |
| retrofit: Retrofit | |
| ): CallAdapter<*, *>? { | |
| if (getRawType(returnType) != Call::class.java) return null | |
| check(returnType is ParameterizedType) { "Return type must be a parameterized type." } |
This file contains hidden or 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
| private class EitherCallAdapter<R>( | |
| private val successType: Type | |
| ) : CallAdapter<R, Call<Either<ApiError, R>>> { | |
| override fun adapt(call: Call<R>): Call<Either<ApiError, R>> = EitherCall(call, successType) | |
| override fun responseType(): Type = successType | |
| } |
NewerOlder