English | 中文
Convertor is a code conversion tool supporting Java and Kotlin projects. It helps developers to automatically convert GMS APIs called by apps into corresponding HMS APIs, implementing quick conversion and HMS integration. The HMS Convertor provides the following functions:
New Conversion: Automatically converts GMS APIs invoked by an app to HMS APIs.
Open Last Conversion: Opens the last conversion result.
Save All: Save the corrent project and conversion information.
Restore Project: Restores a project with the backup file.
Convertor requires:
Run the git clone command to download the code, go to the Convertor/src directory, and run the following command:
$ ./gradlew -p IDE/intellij-plugin buildPlugin
After the build is complete, go to the Convertor/src/IDE/intellij-plugin/build/distributions directory to view the plugin package in .zip format.
Start the IDEA or Android Studio and click the menu bar on the upper left, choose File -> Settings -> Plugins -> Install Plugin from Disk
select the ZIP plugin package generated during the build.
tips:
You can debug the plugin in the sandbox using the following command:
$ ./gradlew -p IDE/intellij-plugin runIde
For more details, please refer to Usage Guide
git clone https://github.com/HMS-Core/hms-toolkit-convertor.git
File>Open..
and open the src folder inside the project.build.gradle
file, find alternativeIdePath
property, uncomment it, and set the install path of the intellij IDE that the plugin will be launched on (in this case android studio) intellij {
// [...]
/**
* Uncomment this for Debugging the plugin on Android Studio directly from the IDE (launches in a separate window/instance)
* From the menu bar: Run>Run (launches instances with plugin installed) or Run>Debug (debug mode)
*
* In this case, we are setting the android studio install path, another IDE/path can be used as well.
.*/
// alternativeIdePath '/C://Program Files/Android/Android Studio'
// [...]
}
To make a contribution to Convertor project, follow these steps.
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.
If you have questions about how to use HMS samples, try the following options:
huawei-mobile-services
.If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.
HMS Toolkit Convertor is licensed under the Apache License version 2.0