Project setup
Let's set up a project before start coding.
- Load project in Android Studio: New / Project from Version Control.
- Create 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.
Android only
- Update
applicationId
,compile/target/minSdk
, ... inProjectSettings.kt
- Change packages from
app.futured.androidprojecttemplate
to real packages based onapplicationId
:- Change 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
by new package name manually. - Android Studio sometimes keeps empty folders of old package name. Search them and remove 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 project preview in Android Studio from
- Commit changes and create first PR to
develop
. - If PR was successful Status checks will be visible now. See Require status checks to pass in Branch Rulesets / Configuration section.