Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

palantir/gradle-launch-config-plugin

Repository files navigation

gradle-launch-config-plugin

CircleCI

WARNING: This project is not used internally at Palantir and is no longer maintained. It will soon be archived.

A Gradle Plugin that creates .launch files for Eclipse and Run Configurations for IntelliJ for your project's JavaExec tasks.

Usage

  1. Apply the plugin

    buildscript {
      repositories {
        maven {
          url "https://plugins.gradle.org/m2/"
        }
      }
      dependencies {
        classpath "com.palantir.launchconfig:gradle-launch-config-plugin:<LaunchConfigVersion>"
      }
    }
    
    apply plugin: "com.palantir.launch-config"
    

    Alternatively:

    plugins {
      id "com.palantir.launch-config" version "<LaunchConfigVersion>"
    }
    
  2. Call the respective IDE commands (i.e. ./gradlew idea or ./gradlew eclipse)

  3. Optional. You can add the launchConfig block to specify the JavaExec tasks to be used to generate the .launch files for Eclipse and run configurations for IntelliJ.

    launchConfig {
        excludedTasks 'run'
    }
    

    The launchConfig block offers the following options:

    • (optional) includedTasks a set of JavaExec tasks to be used by the plugin to generate the .launch files for Eclipse and the run configurations for IntelliJ. If it not specified, all JavaExec tasks are included except for the ones specified in excludedTasks.
    • (optional) excludedTasks a set of JavaExec tasks that are excluded from the launch file or the run configuration creation.

Tasks

The tasks are only added if their matching IDE plugin is applied.

  • eclipseLaunchConfig - creates .launch files. Triggered when :eclipseProject is called.
  • cleanEclipseLaunchConfig - deletes the generated .launch files. Triggered when :cleanEclipseProject is called.
  • ideaLaunchConfig - generates the XML in the IDEA workspace. Triggered when :ideaWorkspace is called.

Contributing

Before working on the code, if you plan to contribute changes, please read the CONTRIBUTING document.

License

This project is made available under the Apache 2.0 License.