Refactored java code and introduced maven profiles for different platform builds