Project setup
Let's set up a project before starting to code.
- Load the project in Android Studio: New / Project from Version Control.
- Create a new branch
feature/project-setup
fromdevelop
. - Update the project description in
README.md
.
KMP
This is relatively straightforward, as most of the setup is handled by the init script:
- Follow the instructions in the repository, which include running the init script that will set up the application ID, package naming, and other settings.
- Update the
ProjectSettings.kt
andProductFlavors.kt
to your specific needs.
Android only
- Update
applicationId
,compile/target/minSdk
, etc. inProjectSettings.kt
- Change packages from
app.futured.androidprojecttemplate
to real packages based onapplicationId
:- Change the project preview in Android Studio from
Android
toProject
. - Find your package, typically
app/main/androidprojecttemplate
. - Right-click and select Refactor / Rename.
- Android Studio won't be able to refactor everything. The rest needs to be refactored manually. Search and replace
androidprojecttemplate
with the new package name manually. - Android Studio sometimes keeps empty folders of the old package name. Search for them and remove them manually.
- To check if refactoring was successful, run:
./gradlew --continue lintCheck
./gradlew assembleDevDebug
- Android Studio won't be able to refactor everything. The rest needs to be refactored manually. Search and replace
- Change the project preview in Android Studio from
- Commit changes and create the first PR to
develop
. - If the PR was successful, Status checks will be visible now. See Require status checks to pass in the Branch Rulesets / Configuration section.