Guide for our development process, project setup and how to write code.
You could use Homebrew to install on mac
brew tap adoptopenjdk/openjdk
brew install adoptopenjdk8
brew install kotlin
OR The easiest way to install Java and Kotlin is to use SDK MAN
Just open your terminal and enter:
curl -s "https://get.sdkman.io" | bash
Follow the setup instructions and verify that your installation works:
sdk version
If it shows you something like 5.11.5+713
then your good to continue.
Just install the mentioned dependencies:
sdk install java 8.0.292.hs-adpt
sdk install kotlin 1.4.32
Check your installation by:
java -version
kotlin -version
For better interop with iOS you may install the Kotlin Multiplaform Mobile (KMM) plugin for Android Studio. It let’s you run, test and debug shared code on Android and iOS without switching the IDEs.
Every change has to branch of from main
and use this branch naming convention:
-
feature/{type_of_change}-{short_description}
or with ticket idfeature/{ticket_id}/{type_of_change}-{short_description}
main
must be always in releasable state.
-
add for new features or functionality
-
change for changes in existing features or functionality
-
remove for removed features or functionality
-
fix for any bug fixes
-
bump for dependency updates
-
security in case of vulnerabilities
Examples:
-
feature/SDK-456/add-awesome-hashing-algorithm
-
feature/add-awesome-hashing-algorithm
-
feature/remove-not-so-awesome-algorithm
-
feature/fix-algorithm-corner-case
-
feature/bump-lib-to-1.3.0
A release branches of from main
branch with following pattern:
-
release/{major}.{minor}(.{patch})/prepare-{major}.{minor}.{patch}
while patch is optional
Add following changes:
-
Update CHANGELOG.adoc by creating a new Unreleased section and change current unreleased to release version
-
Update README.adoc
project-version
to release version -
Update the latest release badge HowTo
Releases are automatically created when a tag in the form of v{major}.{minor}.{patch}
is added.
To build the iOS Example app, following steps need to be taken:
-
Create the swift package from the KMP build by running the following command:
./gradlew createSwiftPackage
-
Add an xcconfig file for the login configuration of the Core SDK in the
swift/
folder and name itData4LifeSDK.xcconfig
:
// Copyright (c) 2020 D4L data4life gGmbH // All rights reserved. // // D4L owns all legal rights, title and interest in and to the Software Development Kit (SDK), // including any intellectual property rights that subsist in the SDK. // // The SDK and its documentation may be accessed and used for viewing/review purposes only. // Any usage of the SDK for other purposes, including usage for the development of // applications/third-party applications shall require the conclusion of a license agreement // between you and D4L. // // If you are interested in licensing the SDK for your own applications/third-party // applications and/or if you’d like to contribute to the development of the SDK, please // contact D4L by email to help@data4life.care. D4L_ID = xxxxxx D4L_SECRET = xxxxxx D4L_REDIRECT_SCHEME = xxxxxx D4L_ENVIRONMENT = xxxxxx
-
Run the project in Xcode