Skip to content

refactor: Restructure project to a more conventional Android architecture - #70

Draft
wingio wants to merge 12 commits into
devfrom
refactor/project-restructure
Draft

wingio wants to merge 12 commits into
devfrom
refactor/project-restructure

Conversation

@wingio

@wingio wingio commented Jun 28, 2025 •

Copy link
Copy Markdown
Member
  • Use build logic to enforce configuration conventions
    • App
    • Core libraries
    • Compose libraries
    • Feature modules
  • Migrate many components to isolated core modules
    • Common (constants, common utilities, etc.)
    • Data (Repositories for the GraphQL API, REST API, and user prefs)
      • GraphQL Repositories
      • Rest Repository
      • Auth repository
      • Preference Repository
      • Dialog Repository
    • Design system (Common or generic UI components)
    • Domain (For now just use cases)
    • GraphQL
    • Icons
    • Resources (Mostly strings for common GitHub entities or actions)
    • REST
    • UI (UI-related utilities or more complex components)
  • Migrate screens to feature modules
    • Auth
    • Explore
    • File Explorer
    • Home
    • Inbox
    • Profile
    • Release
    • Repository
    • Settings

- name: Download Schema via Introspection
run: |
chmod +x ./gradlew && ./gradlew :api:downloadServiceApolloSchemaFromIntrospection
chmod +x ./gradlew

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You dont need to run chmod +x gradlew. It already has executable flag set

Comment thread build-logic/convention/.gitignore Outdated
Comment thread build-logic/convention/build.gradle.kts Outdated
Comment thread build-logic/convention/src/main/kotlin/dev/materii/gloom/KotlinAndroid.kt Outdated
Comment thread build-logic/convention/src/main/kotlin/dev/materii/gloom/KotlinAndroid.kt Outdated
Comment thread gradle/libs.versions.toml Outdated

import com.apollographql.apollo.api.Optional

fun <T> T?.toOptional(): Optional<T> = Optional.presentIfNotNull(this) No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be inline

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i get yelled at for it not having significant performance benefits

Comment thread settings.gradle.kts
rootProject.name = "Gloom"
include(":app")

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be at the very top, since it's enabling a global feature

Comment thread settings.gradle.kts Outdated
@@ -9,8 +10,19 @@ pluginManagement {
rootProject.name = "Gloom"
include(":app")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app is included twice

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