Launching Gradle builds from Eclipse

后端 未结 12 558
终归单人心
终归单人心 2020-12-28 11:59

We\'re looking at converting our Ant build to Gradle.

In regards to integration with Eclipse, we are looking for (conceptually) equivalent functionality for launch

12条回答
  •  情歌与酒
    2020-12-28 12:32

    Interim work-around more palatable to those with command-line phobia.

    From Eclipse, use pulldown menu Run / External Tools / External Tools Configurations...

    Select "Program" in left navigator panel then click the "New launch configuration" button in the tool bar (first button in my tool bar).

    With Main tab selected, fill out the following fields:

    1. Name: (above the tabs) to "Gradle" (or whatever name you want for the launcher).
    2. Location: Use "Browse File System..." button to navigate to your "gradle.bat" or "gradlew.bat" to run.
    3. Working Directory: Use "Browse Workspace..." button to select directory with the "build.gradle" file for the desired project.
    4. Arguments: Enter "--gui"

    Add to Arguments: the switch "-b filename.gradle" if you use a Gradle build file other than "build.gradle".

    After this, your developers can use the Run / External Tools or tool bar button to launch the Gradle Gui. They can do this and close it after each use, or (to avoid startup lag), minimize it when not in use.

提交回复
热议问题