Skip to content

Hot Swap functionality to Gradle projects in Eclipse and IntelliJ

Notifications You must be signed in to change notification settings

thomas-adriano/gradle-hot-swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

gradle-hot-swap

Hot Swap functionality to Gradle projects in Eclipse and IntelliJ

This script uses spring-loaded to provide hot swap functionality to Gradle application projects. It does not create any new tasks to start your application, instead it uses the well known application's plugin run task.

Getting started

  • Make sure the build.gradle file from the target project has the application plugin applied (apply plugin: 'application');
  • Make sure your IDE are compiling the sources after change or on save;
  • Add this line to your build.gradle file: apply from: "https://raw.github.com/thomas-adriano/gradle-hot-swap/master/hot-swap.gradle"
  • Execute the run task from Gradle application plugin

How it Works

  • Adding spring-loaded parameters to JVM initialization (via applicationDefaultJvmArgs)
  • (re)generating Eclipse .classpath and IntelliJ .iml files to change the output dir to gradle's output dir (necessary to spring-loaded watching process)

Constraints

  • The target project must have the Gradle application plugin applied (apply plugin: 'application');
  • The IDE must compile the sources after save or change;

Caveats

  • In eclipse, after the first time the gradle run (application plugin task) is executed, you have to refresh the target project, otherwise hot swap will just not work.

About

Hot Swap functionality to Gradle projects in Eclipse and IntelliJ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published