Skip to content

Main (?)#8

Open
Ale-cipriano wants to merge 18 commits intodigitalinnovationone:masterfrom
Ale-cipriano:main
Open

Main (?)#8
Ale-cipriano wants to merge 18 commits intodigitalinnovationone:masterfrom
Ale-cipriano:main

Conversation

@Ale-cipriano
Copy link
Copy Markdown

Entregue!

joaoalbertorsc and others added 18 commits November 25, 2025 15:03
This commit updates various IntelliJ IDEA project configuration files (`.idea/`).

Key changes include:
- Upgrading the project language level and bytecode target from JDK 11 to JDK 21.
- Enabling the `ExternalStorageConfigurationManager`.
- Modifying Gradle settings to set the Gradle JVM to version 21 and changing the test runner.
- Adding `GradleMigrationSettings`.
This commit updates the versions of the Android Gradle Plugin and the Kotlin Android plugin in the top-level `build.gradle` file.

- The Android Application and Library plugins are updated from version `7.2.2` to `8.7.0`.
- The Kotlin Android plugin is updated from version `1.6.10` to `2.0.0`.
This commit updates the `app/build.gradle` file to modernize the project's configuration.

Key changes include:
- Bumping the `compileSdk` and `targetSdk` from 32 to 34.
- Increasing the `minSdk` from 21 to 24.
- Updating the Java and Kotlin compiler options from version 1.8 to 21.
- Upgrading core AndroidX, Material, and testing libraries to newer versions.
- Updating Retrofit and its Gson converter from version 2.9.0 to 2.11.0.
- Adding the `kotlinx-coroutines-android` dependency.
This commit modifies the `EditText` in `activity_main.xml`.

The `inputType` is changed from `numberDecimal` to `text`, and the `maxLength` attribute is removed. This allows users to enter any text as the username.
This commit adds a new string resource to `strings.xml` for displaying a generic error message.

- The new string is named `response_error`.
This commit completes the implementation of the `RepositoryAdapter` for the `RecyclerView`.

- **`onBindViewHolder`:** Binds the repository name to the `TextView` and sets up click listeners for the item view and the share button.
- **`getItemCount`:** Returns the actual size of the repositories list instead of a hardcoded 0.
- **`ViewHolder`:** Implements the `ViewHolder` to find and hold references to the `repoName` `TextView` and the `shareButton` `ImageView`.
This commit brings the `MainActivity` to life by implementing its core logic.

Key changes include:
- Retrieving view IDs for UI elements (`EditText`, `Button`, `RecyclerView`).
- Setting up a click listener on the confirm button to save the username and fetch repositories.
- Persisting the username using `SharedPreferences` and pre-filling the `EditText` on subsequent launches.
- Implementing Retrofit to create the `GitHubService` instance.
- Fetching user repositories from the GitHub API and handling both successful and failed responses.
- Configuring the `RepositoryAdapter` with the fetched data and setting up listeners for sharing and opening repository links.
This commit adds the `android.permission.INTERNET` permission to the `AndroidManifest.xml` file.

This is necessary for the application to perform network operations, such as making API requests to GitHub.
This commit completely revamps the `README.md` file to provide a more comprehensive project description.

The update includes:
- Adding a detailed project overview, implemented features, and a list of technologies used.
- Translating the entire content into both English and Brazilian Portuguese to make it accessible to a wider audience.
- Retaining the existing project screenshot for visual context.
This commit updates the `README.md` file to include information about the origin of the project.

It specifies that the project is a challenge from the "Cognizant - Mobile Developer" bootcamp on the DIO platform in both the English and Portuguese sections.
This commit refactors the `MainActivity` to follow a more robust architecture by introducing a ViewModel and a Repository layer.

Key changes include:
- **Architecture**: Introduced `MainViewModel` and `MainViewModelFactory` to handle business logic and data state, decoupling it from the UI.
- **Data Layer**: Moved API call logic from the Activity to a new `GithubRepository` and utilized a `RetrofitClient`.
- **UI State**: Implemented LiveData observers in `MainActivity` to handle repository lists, loading states, and error messaging.
- **Refactoring**:
    - Simplified `MainActivity` by removing direct Retrofit setup and API callback handling.
    - Improved code organization by making internal methods and variables `private`.
    - Added validation for the username input before triggering a search.
- **Persistence**: Refined the `saveUserLocal` and `showUserName` logic to integrate with the new ViewModel-driven flow.
This commit adds the `RetrofitClient` singleton to handle network requests to the GitHub API.

Key changes include:
- Setting the base URL to `https://api.github.com/`.
- Configuring Retrofit with `GsonConverterFactory`.
- Providing a lazy-initialized instance of `GitHubService`.
This commit introduces the `GithubRepository` class within the data layer to handle repository-related data operations.

- Implements `getAllRepositoriesByUser` to fetch a list of repositories for a specific user.
- Integrates `GitHubService` to perform the underlying network requests.
This commit updates the `app/build.gradle` file to include necessary Jetpack libraries and cleans up comments.

Key changes include:
- Adding `androidx.activity:activity-ktx` and `androidx.fragment:fragment-ktx` dependencies.
- Adding Lifecycle dependencies for ViewModel, Runtime, and LiveData (version 2.8.6).
- Organizing and updating existing dependencies for Retrofit and Coroutines.
- Removing Portuguese comments and redundant documentation from the `android` block.
- Ensuring `compileSdk`, `minSdk`, and `targetSdk` are consistently configured.
Updates the `distributionUrl` in `gradle-wrapper.properties` to upgrade Gradle from version 7.3.3 to 8.10.2.
This commit updates the `clean` task definition in the root `build.gradle` file to use modern Gradle APIs.

Key changes:
- Switched from `task clean(type: Delete)` to `tasks.register('clean', Delete)` for task avoidance.
- Updated the directory reference from `rootProject.buildDir` to `rootProject.layout.buildDirectory`.
Initializes the `.idea` configuration directory for the "GitHubSearch" project.

Key changes include:
- Setting the project name to "GitHubSearch".
- Configuring Git as the Version Control System (VCS).
- Setting the Kotlin plugin version to `2.0.0`.
- Enabling the Gradle project system and local Java home migrations.
- Configuring deployment target selector and run configuration producers.
- Adding settings for Studio Bot (opted-in) and Markdown preview (Compose experimental).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants