-
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.
Merge pull request #7 from manununhez/epic/1-custom-base-project
epic/1-custom-base-project #1
- Loading branch information
Showing
55 changed files
with
608 additions
and
330 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,14 +1,20 @@ | ||
# PurrfectPics | ||
|
||
PurrfectPics is your ultimate companion for discovering, customizing, and sharing adorable cat images on Android. With a wide range of features, PurrfectPics brings joy to every cat lover's heart. | ||
PurrfectPics is your ultimate companion for discovering, customizing, and sharing adorable cat | ||
images on Android. With a wide range of features, PurrfectPics brings joy to every cat lover's | ||
heart. | ||
|
||
## Features | ||
|
||
- **Discover:** Explore a vast collection of random cat images sourced from the web. | ||
- **Filter:** Narrow down your search with advanced filtering options based on tags, categories, and colors. | ||
- **Customize:** Edit the appearance of cat images with built-in color editing tools, including brightness, contrast, and saturation adjustments. | ||
- **Save Favorites:** Save your favorite cat images to easily revisit them later and create your personalized collection. | ||
- **Share:** Share delightful cat images with friends, family, and fellow cat enthusiasts with just a tap. | ||
- **Filter:** Narrow down your search with advanced filtering options based on tags, categories, and | ||
colors. | ||
- **Customize:** Edit the appearance of cat images with built-in color editing tools, including | ||
brightness, contrast, and saturation adjustments. | ||
- **Save Favorites:** Save your favorite cat images to easily revisit them later and create your | ||
personalized collection. | ||
- **Share:** Share delightful cat images with friends, family, and fellow cat enthusiasts with just | ||
a tap. | ||
|
||
## Screenshots | ||
|
||
|
@@ -20,15 +26,17 @@ To get started with PurrfectPics, follow these steps: | |
|
||
1. Clone the repository to your local machine: | ||
git clone [email protected]:manununhez/purrfect-pics.git | ||
|
||
|
||
2. Open the project in Android Studio. | ||
|
||
3. Build and run the app on your device or emulator. | ||
|
||
## Contributing | ||
|
||
We welcome contributions from the open-source community to help improve PurrfectPics. Whether you're a developer, designer, or cat lover with ideas to share, we'd love to have you onboard! Here are some ways you can contribute: | ||
We welcome contributions from the open-source community to help improve PurrfectPics. Whether you're | ||
a developer, designer, or cat lover with ideas to share, we'd love to have you onboard! Here are | ||
some ways you can contribute: | ||
|
||
- Submit bug reports or feature requests via GitHub issues. | ||
- Fork the repository, make changes, and submit pull requests for review. | ||
|
@@ -40,5 +48,6 @@ PurrfectPics is licensed under the [MIT License](LICENSE). | |
|
||
## About | ||
|
||
PurrfectPics is developed and maintained by [Manuel Nuñez]. For inquiries, please contact [[email protected]]. | ||
PurrfectPics is developed and maintained by [Manuel Nuñez]. For inquiries, please | ||
contact [[email protected]]. | ||
|
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,46 +1,65 @@ | ||
plugins { | ||
alias(libs.plugins.androidApplication) | ||
alias(libs.plugins.jetbrainsKotlinAndroid) | ||
alias(libs.plugins.android.application) | ||
alias(libs.plugins.kotlin.android) | ||
alias(libs.plugins.hilt.gradle) | ||
alias(libs.plugins.ksp) | ||
} | ||
|
||
android { | ||
namespace = "com.manuelnunez.apps.purrfectpics" | ||
compileSdk = 34 | ||
namespace = "com.manuelnunez.apps.purrfectpics" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "com.manuelnunez.apps.purrfectpics" | ||
minSdk = 21 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
defaultConfig { | ||
applicationId = "com.manuelnunez.apps.purrfectpics" | ||
minSdk = 21 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "17" | ||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } | ||
|
||
buildFeatures { compose = true } | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.5.2" // androidxComposeCompiler | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(libs.androidx.core.splashscreen) | ||
implementation(libs.androidx.core.ktx) | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.material) | ||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.junit) | ||
androidTestImplementation(libs.androidx.espresso.core) | ||
} | ||
implementation(projects.core.commonUi) | ||
|
||
implementation(libs.androidx.core.splashscreen) | ||
implementation(libs.androidx.core.ktx) | ||
|
||
implementation(libs.androidx.activity.compose) | ||
|
||
implementation(libs.androidx.compose.material3) | ||
|
||
// Compose | ||
val composeBom = platform(libs.androidx.compose.bom) | ||
implementation(composeBom) | ||
androidTestImplementation(composeBom) | ||
|
||
// Hilt Dependency Injection | ||
implementation(libs.hilt.android) | ||
ksp(libs.hilt.compiler) | ||
|
||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.junit) | ||
androidTestImplementation(libs.androidx.espresso.core) | ||
} |
20 changes: 9 additions & 11 deletions
20
app/src/androidTest/kotlin/com/manuelnunez/apps/purrfectpics/ExampleInstrumentedTest.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 |
---|---|---|
@@ -1,24 +1,22 @@ | ||
package com.manuelnunez.apps.purrfectpics | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("com.manuelnunez.apps.purrfectpics", appContext.packageName) | ||
} | ||
} | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("com.manuelnunez.apps.purrfectpics", appContext.packageName) | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
app/src/main/kotlin/com/manuelnunez/apps/purrfectpics/MainActivity.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,23 @@ | ||
package com.manuelnunez.apps.purrfectpics | ||
|
||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.activity.compose.setContent | ||
import androidx.activity.viewModels | ||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen | ||
import com.manuelnunez.apps.core.ui.theme.MainTheme | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class MainActivity : ComponentActivity() { | ||
private val viewModel: SplashViewModel by viewModels() | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
val splashScreen = installSplashScreen() | ||
super.onCreate(savedInstanceState) | ||
|
||
splashScreen.setKeepOnScreenCondition { viewModel.isLoading.value } | ||
|
||
setContent { MainTheme {} } | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
app/src/main/kotlin/com/manuelnunez/apps/purrfectpics/MainApplication.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,6 @@ | ||
package com.manuelnunez.apps.purrfectpics | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp class MainApplication : Application() |
24 changes: 24 additions & 0 deletions
24
app/src/main/kotlin/com/manuelnunez/apps/purrfectpics/SplashViewModel.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,24 @@ | ||
package com.manuelnunez.apps.purrfectpics | ||
|
||
import androidx.lifecycle.ViewModel | ||
import androidx.lifecycle.viewModelScope | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import kotlinx.coroutines.delay | ||
import kotlinx.coroutines.flow.MutableStateFlow | ||
import kotlinx.coroutines.flow.asStateFlow | ||
import kotlinx.coroutines.launch | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class SplashViewModel @Inject constructor() : ViewModel() { | ||
|
||
private val mutableStateFlow = MutableStateFlow(true) | ||
val isLoading = mutableStateFlow.asStateFlow() | ||
|
||
init { | ||
viewModelScope.launch { | ||
delay(2000) | ||
mutableStateFlow.value = false | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.