Wikum Weerakutti

GSOC-2023: Coding Week 03

This week, I focused on addressing several issues in my implementation of building O3 using the OpenMRS SDK. Additionally, I initiated the transition of the OpenMRS SDK from Java 7 to Java 8. Let's dive into the problems we encountered during the implementation:

Changing to module installer for downloading configuration

Instead of using the previous approach of owaHelper.downloadOwa(configDir, config, moduleInstaller) to download O3 configurations, we simplified the process by switching to moduleInstaller.installModules(configs, configDir.getPath())

Unable to build the O3 outside the SDK source folder

While testing my code, I overlooked an issue that my mentor Daniel discovered when testing the initial release. When attempting to deploy O3 with the SDK outside the source folder, two issues were encountered:

To resolve these issues, we have to add the following code to settings.xml:

<repository>
     <id>mks-nexus-public</id>
     <name>Mekom Repository</name>
     <url>https://nexus.mekomsolutions.net/repository/maven-public</url>
</repository>

I updated the documentation to reflect these changes. You can find the updated version of the documentation here.

Additionally, I plan to create a forum post inviting the community to try setting up an O3 backend server using the SDK. This will help us gather feedback from the community and make any necessary adjustments.

I also created this PR to address any post commit issues.

Transition to Java 8

As part of the GSoC project, one of the key goals is to modernize the OpenMRS SDK code base by transitioning from Java 7 to Java 8. To initiate this transition, the first step is to switch the Java version to 8 for the Maven plugin. After thoroughly testing and ensuring that the code is functioning correctly with Java 8, I created a pull request (PR) to implement the necessary changes. You can find the PR here.

Future

In order to modernize the OpenMRS SDK with Java 8, there are several key areas where improvements can be made. Here are some of the planned changes:

By incorporating these features and best practices introduced in Java 8, the OpenMRS SDK can benefit from enhanced readability, maintainability, and performance. It will also align the codebase with modern Java development standards and make it easier for developers to work with the SDK.

Thank you for reading, see you next week!