Giter Site home page Giter Site logo

ferprieto / spacex-prepare-for-clean-architecture-liftoff Goto Github PK

View Code? Open in Web Editor NEW
684.0 684.0 86.0 94.96 MB

Clean Architecture Modular Project: MVVM + Jetpack Compose + Coroutines + Flows + Dagger2 + LiveData + UnitTests + UITests + Screenshot Tests + MockWebServer

Kotlin 100.00%
android android-architecture android-compose clean-architecture clean-code coroutines coroutines-android dagger-hilt espresso jetpack-compose junit4 kotlin kotlin-flow mockwebserver mvvm mvvm-android retrofit2

spacex-prepare-for-clean-architecture-liftoff's Introduction

What's up Github devs, how you doing? Y'alright?

I'm Fernando Prieto, Android Developer since 2012 and currently Senior Android Developer at GoDaddy.

f.prieto.moyano@gmail.com LinkedIn Medium

My latest publications

  1. ๐Ÿ“ Code Coverage percentage comparison in your PRs codecoverage Medium Article
  2. ๐Ÿ“ Lessons learned on Jetpack Compose UI Testing: Robot Pattern robotpattern Medium Article
  3. ๐Ÿ“ Lessons learned on Jetpack Compose UI Testing: MockWebServer mockwebserver Medium Article
  4. ๐ŸŽฅ Talk for Huawei & Bitrise Webinar (Sep'21) Huawei Appgallery and Bitrise Webinar
  5. ๐ŸŽฅ Talk for HDG UK - CICD (May'21) HDG UK CICD
  6. ๐ŸŽฅ Talk for Huawei Latinoamerica Huawei Developers Latinoamerica
  7. ๐Ÿ“ My latest Medium Article AppGallery Connect Reports Medium Article
  8. ๐ŸŽฅ My YouTube video tutorial at the Huawei Developers channel Huawei Developers YouTube
  9. ๐Ÿค– Brand new Bitrise Step: Huawei AppGallery Connect Reports Medium Article
  10. ๐ŸŽฅ My first ever YouTube video tutorial at the Bitrise Channel YouTube Video
  11. ๐Ÿค– New version of the Bitrise Step: Huawei Deploy to AppGallery Connect
  12. ๐Ÿ“ Deploy to Huawei App Gallery with Bitrise [Huawei AGC Step] Medium Article

Now Playing - Spotify ๐ŸŽง

Fer, Spotify Playing

spacex-prepare-for-clean-architecture-liftoff's People

Contributors

ferprieto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

spacex-prepare-for-clean-architecture-liftoff's Issues

@Singleton annotation

Hi,

Thanks for good project. I want to give some suggestions. If you want singleton component, you must use @singleton annotation. Maybe this can be your choice. I think it should at least be a retrofit singleton.

package prieto.fernando.data_api.di

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import okhttp3.OkHttpClient
import prieto.fernando.data.SpaceXRemoteSource
import prieto.fernando.data_api.ApiService
import prieto.fernando.data_api.data.SpaceXRemoteSourceImpl
import prieto.fernando.data_api.mapper.*
import retrofit2.Retrofit

@module
@Installin(SingletonComponent::class)
object ApiModule {
@provides
fun provideSpaceXRemoteSource(
apiService: ApiService,
companyInfoRepositoryMapper: CompanyInfoResponseToRepositoryModelMapper,
launchesRepositoryMapper: LaunchesResponseToRepositoryModelMapper
): SpaceXRemoteSource =
SpaceXRemoteSourceImpl(apiService, companyInfoRepositoryMapper, launchesRepositoryMapper)

@Provides
fun provideCompanyInfoResponseToRepositoryModelMapper(): CompanyInfoResponseToRepositoryModelMapper =
    CompanyInfoResponseToRepositoryModelMapperImpl()

@Provides
fun provideLaunchesResponseToRepositoryModelMapper(
    dateFormatter: DateFormatter
): LaunchesResponseToRepositoryModelMapper =
    LaunchesResponseToRepositoryModelMapperImpl(dateFormatter)

@Provides
fun provideDateFormatter(): DateFormatter =
    DateFormatterImpl()

@Provides
@JvmStatic
internal fun provideApi(retrofit: Retrofit): ApiService =
    retrofit.create(ApiService::class.java)

@Provides
@JvmStatic
internal fun provideRetrofit(
    httpBuilder: OkHttpClient.Builder,
    retrofitBuilder: Retrofit.Builder
): Retrofit = retrofitBuilder
    .client(httpBuilder.build())
    .build()

}

Issues with Connected Android Test

This might be an issue with my environment.
I have checked out the latest version of master 0cc02b3.

When I run:
./gradlew connectedAndroidTest

I get the error:

Duplicate class org.checkerframework.checker.compilermsgs.qual.CompilerMessageKey found in modules checker-3.1

If I try to run them from Android Studio, I get a different error

Unable to find explicit activity class {prieto.fernando.spacex.test/androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared ?

Issues with Connected Android Test

This might be an issue with my environment.
I have checked out the latest version of master 0cc02b3.
When I run:

gradle --version

I get:


Gradle 7.5.1

Build time: 2022-08-05 21:17:56 UTC
Revision: d1daa0cbf1a0103000b71484e1dbfe096e095918>

Kotlin: 1.6.21
Groovy: 3.0.10
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11.0.17 (Oracle Corporation 11.0.17+10-LTS-269)
OS: Mac OS X 13.2.1 x86_64

When I run:
./gradlew connectedAndroidTest

I get the error:

Duplicate class org.checkerframework.checker.compilermsgs.qual.CompilerMessageKey found in modules checker-3.1

If I try to run them from Android Studio, I get a different error

Unable to find explicit activity class {prieto.fernando.spacex.test/androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.