How to convert a Maven build to Gradle?

后端 未结 2 1589
失恋的感觉
失恋的感觉 2020-12-07 23:56

I know I should be working with my build.gradle and init.gradle files but I don\'t know what to write or how to point to my project folder with the

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 00:24

    as Peter Niederwieser said:

    For more complex Maven builds, it may be necessary to manually add functionality on the Gradle side that couldn't be converted automatically.

    although you have to write some parts manually by your self. there is an online service that may be an useful tool For complex Maven builds. maven2gradle is a project on github which can convert online dependencies element automatically from maven to gradle scripts.
    for using it,

    1. get to maven2gradle . URL
    2. open and select contains of your maven file.
    3. Paste your maven dependencies on the text box in that web page (with or without the dependencies root element).
    4. click Convert button.

    for more information http://sagioto.github.io/maven2gradle/

提交回复
热议问题