Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

organize project structure #3127

Merged
merged 3 commits into from
Jun 12, 2024
Merged

organize project structure #3127

merged 3 commits into from
Jun 12, 2024

Conversation

adbenitez
Copy link
Member

  • move res and assets folders to src/main/
  • update scripts and transifex config to use the new paths

@adbenitez adbenitez requested a review from r10s June 12, 2024 20:19
Comment on lines +6 to +7
file_filter = src/main/res/values-<lang>/strings.xml
source_file = src/main/res/values/strings.xml
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure if this will make the tx program to output to src/main/res instead of ./res, this needs to be tested

Copy link
Member

Choose a reason for hiding this comment

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

should be fine, we will find out easily sooner or later :)

@r10s
Copy link
Member

r10s commented Jun 12, 2024

these are the defaults for android projects, right?

Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@r10s
Copy link
Member

r10s commented Jun 12, 2024

but is it really default to put res into src dir? if so, then it's that, just wondering.

apart from begin default, what is the advantage of the now longer paths? that we can more easily adapt for flavours in the already know way? are there other advantages?

just because of interest, iirc, it took me some effort years ago to go for an alternative app-icon that includes the word "DEV" ...

Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

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

some questions, but overall probably just fine!

thanks for the chore!

@r10s
Copy link
Member

r10s commented Jun 12, 2024

just because of interest, iirc, it took me some effort years ago to go for an alternative app-icon that includes the word "DEV" ...

ftr, that seems to use the same approach as now everywhere, see documentation in src/debug/README.md - i think, we can then delete that file alltogether, this is now obvious and standard

@adbenitez
Copy link
Member Author

adbenitez commented Jun 12, 2024

but is it really default to put res into src dir? if so, then it's that, just wondering.

yes, in fact that is what the debug folder is already doing to override the app icon, it might sound confusing at first because you might thing of src as code, but it is more like all your app sources and content, and it is more clear when you see the flavor folders inside, then each flavor can have its own res, assets, AndroidManifest and java code

you can see a common project structure creating a new project in Android Studio, the common thing is to wrap the src folder inside an app folder but that seemed to add more complexity, since you then need to have a top level build.gradle plus another one inside app folder etc

you can see an example project tree at https://developer.android.com/build

@adbenitez
Copy link
Member Author

apart from begin default, what is the advantage of the now longer paths? that we can more easily adapt for flavours in the already know way? are there other advantages?

not much, other than being in the standard place were other android developers would expect, and in the same level as alternative res/assets for other flavors
also to reduce the clutter in the root of the project, less folders and files from the app source spread together with config files etc

@adbenitez adbenitez merged commit 0e6a94b into main Jun 12, 2024
2 checks passed
@adbenitez adbenitez deleted the adb/organize-project-structure branch June 12, 2024 21:17
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.

None yet

2 participants