-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 1.0
- Loading branch information
Showing
86 changed files
with
1,463 additions
and
428 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
# Dogga | ||
Simple Android Native Application consuming the https://dog.ceo/dog-api/ | ||
|
||
![Dogga App icon](app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp) | ||
|
||
Simple Android Native Application consuming the [Dog API](https://dog.ceo/dog-api/) | ||
|
||
This app is made just for portfolio and study purposes and it is in constant evolution. | ||
|
||
|
||
It is made using: | ||
|
||
- MVVM | ||
- Jetpack Compose | ||
- Retrofit | ||
- JUnit4 | ||
- Mockk | ||
- Kotlin DSL (kts script) | ||
- Koin | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import BuildSetup.APPLICATION_ID | ||
import BuildSetup.BUILD_TOOLS_VERSION | ||
import BuildSetup.COMPILE_SDK_VERSION | ||
import BuildSetup.COMPOSE_KOTLIN_COMPILER | ||
import BuildSetup.MIN_SDK_VERSION | ||
import BuildSetup.NAMESPACE | ||
import BuildSetup.TARGET_SDK_VERSION | ||
import BuildSetup.TEST_INSTRUMENTATION_RUNNER | ||
import BuildSetup.VERSION_CODE | ||
import BuildSetup.VERSION_NAME | ||
|
||
plugins { | ||
id(Plugins.ANDROID_APPLICATION) | ||
kotlin(Plugins.KOTLIN_ANDROID) | ||
} | ||
|
||
@Suppress("UnstableApiUsage") | ||
android { | ||
namespace = NAMESPACE | ||
compileSdk = COMPILE_SDK_VERSION | ||
buildToolsVersion = BUILD_TOOLS_VERSION | ||
|
||
defaultConfig { | ||
applicationId = APPLICATION_ID | ||
|
||
minSdk = MIN_SDK_VERSION | ||
targetSdk = TARGET_SDK_VERSION | ||
versionCode = VERSION_CODE | ||
versionName = VERSION_NAME | ||
|
||
vectorDrawables.useSupportLibrary = true | ||
testInstrumentationRunner = TEST_INSTRUMENTATION_RUNNER | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
applicationIdSuffix = BuildTypeDebug.applicationIdSuffix | ||
versionNameSuffix = BuildTypeDebug.versionNameSuffix | ||
} | ||
|
||
release { | ||
isMinifyEnabled = BuildTypeRelease.isMinifyEnabled | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
} | ||
|
||
buildFeatures { | ||
compose = true | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = COMPOSE_KOTLIN_COMPILER | ||
} | ||
|
||
packaging { | ||
resources.excludes.addAll( | ||
listOf("/META-INF/{AL2.0,LGPL2.1}") | ||
) | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(AndroidX.CORE) | ||
implementation(AndroidX.LIFECYCLE) | ||
implementation(AndroidX.Compose.ACTIVITY) | ||
implementation(platform(AndroidX.Compose.BOM)) | ||
implementation(AndroidX.Compose.LIFECYCLE) | ||
implementation(AndroidX.Compose.UI) | ||
implementation(AndroidX.Compose.UI_GRAPHICS) | ||
implementation(AndroidX.Compose.UI_TOOLING) | ||
implementation(AndroidX.Compose.MATERIAL_3) | ||
implementation(AndroidX.Compose.NAVIGATION) | ||
|
||
implementation(platform(Other.KOTLIN_BOM)) | ||
implementation(Other.COIL) | ||
|
||
implementation(Koin.KOIN) | ||
implementation(Koin.KOIN_COMPOSE) | ||
|
||
implementation(Square.RETROFIT) | ||
implementation(Square.OKHTTP) | ||
implementation(Square.OKHTTP_LOG_INTERCEPTOR) | ||
implementation(Square.GSON_CONVERTER) | ||
|
||
testImplementation(Test.JUNIT) | ||
testImplementation(Test.MOCKK) | ||
testImplementation(Test.CORE_TESTING) | ||
testImplementation(Test.COROUTINES) | ||
androidTestImplementation(Test.ANDROIDX_JUNIT) | ||
androidTestImplementation(Test.ESPRESSO) | ||
androidTestImplementation(platform(AndroidX.Compose.BOM)) | ||
androidTestImplementation(Test.COMPOSE_UI_JUNIT4) | ||
|
||
debugImplementation(AndroidX.Compose.UI_TOOLING) | ||
debugImplementation(Test.COMPOSE_TEST_MANIFEST) | ||
} |
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
File renamed without changes.
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package dev.lhalegria.dogga | ||
|
||
import android.app.Application | ||
import android.content.res.Resources | ||
import dev.lhalegria.dogga.datasource.di.dataSourceModule | ||
import dev.lhalegria.dogga.di.mainModule | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.core.context.startKoin | ||
|
||
class DoggaApp : Application() { | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
appResources = this.resources | ||
startKoin { | ||
androidContext(this@DoggaApp) | ||
modules(listOf(dataSourceModule, mainModule)) | ||
} | ||
} | ||
|
||
companion object { | ||
lateinit var appResources: Resources | ||
private set | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
app/src/main/kotlin/dev/lhalegria/dogga/datasource/di/DataSourceModule.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package dev.lhalegria.dogga.datasource.di | ||
|
||
import dev.lhalegria.dogga.datasource.network.retrofitApi | ||
import dev.lhalegria.dogga.datasource.service.BreedService | ||
import org.koin.dsl.module | ||
|
||
val dataSourceModule = module { | ||
|
||
factory { retrofitApi } | ||
factory { retrofitApi.create(BreedService::class.java) } | ||
} |
Oops, something went wrong.