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-setupfromdevelop. - 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.ktandProductFlavors.ktto your specific needs.
Android only
- Update
applicationId,compile/target/minSdk, etc. inProjectSettings.kt - Change packages from
app.futured.androidprojecttemplateto real packages based onapplicationId:- Change the project preview in Android Studio from
AndroidtoProject. - 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
androidprojecttemplatewith 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.