SAP Mobile Platform 3 Software Development Kit version management
Scenario
SAP releases a software development kit (SDK) for its SAP Mobile Platform 3 (SMP3) to enable developers to efficiently create apps. The SDK is not a static product but is actively developed and supported by SAP. This means that a SDK receives constant updates and patches.
Problem
The above screenshot shows that only for SDK SP10 7 patch levels were released, in a little more than 1 month. The installation of a SDK is always done in the same location. Therefore, only one SDK version can be used at a time be a developer. While this assures that only the latest version is going to be used, it creates a problem in regards to maintainability and ongoing development. A new development project may use SP10, while a current one may still depend on SP9. To overcome this, a developer may create local copies of the SDK and manually switch between the different versions, an approach is going to be presented in this document that allows the developer to have different versions of the SDK available.
Solution
The approach consists of using git to manage the individual versions of the SDK. Of course, a different revision control system may be used, but git offers normally a superior handling and speed. The overall process is as followed:
-
Create an initial version of the SDK.
-
Add this version to git and tag it correspondently
-
Install a newer version of the SDK to the same location
-
Use git to add this version and tag it correspondently
-
The work with a specific SDK version, the developer checks out the needed version
-
If necessary, remove/add the Kapsel plugins / libraries to a project
-
Repeat step 2 to 4 for future versions
Process
Download initial version of the SDK from SAP Market Place: https://support.sap.com/swdc
Path: Sybase products -> SAP Mobile Platform SDK -> SAP MOBILE PLATFORM SDK 3.0 -> Support Packages -> SAP MOBILE PLATFORM SDK 3.0 -> [OS]
Install the initial version of the SDK
Go the the installation folder. Either opt to version the whole installation folder or just a part of the SDK, like Kapsel. The following example will only version Kapsel.
Note: by default, Fiori Mobile Client apps are stored inside the Kapsel SDK folder. As each FMC app adds a few thousands files, it is a good idea to not have these included into the git versioning. Consider using .gitignore for those folders.
Initial commit and tag
-
Initialize the folder: git init
-
Add all content: git add –A –v
-
Commit files: git commit
-
Tag commit: git tag –a SPnPLm –m “SDK SPnPLm”
Updating the SDK
Download a newer version of the SDK and install it. Ensure that KapseSDK is going to be upgrade (which should be the default).
Go the installation folder to add the new files to git.
Note: it is important to know that with git a folder .git is created which stores all the git relevant information. In case this folder is deleted, so will also the files and versions added to git. Normally the SDK installer is only overwriting and adding files and not removing. The .git folder should therefore not be impacted by the SDK installation / upgrade process.
Subsequent commit and tag
-
Add all content: git add –A –v
-
Commit files: git commit
-
Tag commit: git tag –a SPn+1PLm+1 –m “SDK SPn+1PLm+1
Add files
Files that were part of the previous SDK version but not of the current one will be shown as remove.
Commit
Tag version
See available SDK versions
Use a specific version of the SDK
To use a specific version of the SDK, it must first be stored in git and tagged. To use the version, a simple checkout is sufficient to update the whole KapselSDK folder to the specified version. To make use of this version, the Kapsel plugins must be updated in an already used project. For a new project, the usual process of adding a plugin is to be used.
- List available versions: git tag
-
Checkout version: git checkout
To complete the installation, install the Kapsel dependencies as described in README.md.
0 Comments