GithubHelp home page GithubHelp logo

blz777 / gradle-classpath Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dansomething/gradle-classpath

0.0 0.0 0.0 112 KB

Output the classpath string of dependencies for a Gradle project.

License: MIT License

Java 100.00%

gradle-classpath's Introduction

Build Status

Gradle Classpath

Output the classpath string of dependencies for a Gradle project.

Rationale

Unlike Maven, which provides dependency:build-classpath, Gradle doesn't offer a standard task for outputting the classpath of a project. The goal of this project is to provide that missing functionality in a simple command-line utility which behaves much like Maven's.

This Gradle classpath utility is used by the coc-groovy project.

Prerequisites

  • Java (version 1.8.0 or later)

Installation

Option 1: Release

This is the easiest way to get started.

Download the latest package from the Releases page and then extract the download.

Be sure to add the location of the gradle-classpath/bin directory to your $PATH.

Option 2: From source

See Building

Be sure to add the location of the build/install/gradle-classpath/bin/ directory to your $PATH.

Usage

In its simplest form gradle-classpath can be called like this to output the classpath of a Gradle project.

$ cd {your Gradle project directory}
$ gradle-classpath

Or the classpath can be written to a file.

$ cd {your Gradle project directory}
$ gradle-classpath --output-file classpath.txt

Or display the gradle-classpath full usage details.

$ gradle-classpath --help
Usage: gradle-classpath [-hrV] [-d=<projectPath>] [-g=<gradleUserHomeDir>]
                        [-G=<gradleHome>] [-o=<outputFile>] [-s=<pathSeparator>]
Outputs the Gradle classpath to a file or STDOUT.
  -d, --project-dir=<projectPath>
                          Path to the Gradle project. Defaults to the current
                            directory.
  -g, --gradle-user-home=<gradleUserHomeDir>
                          Specifies the Gradle user home directory. Defaults to
                            ~/.gradle.
  -G, --gradle-home=<gradleHome>
                          Specifies the Gradle installation directory to use.
                            Defaults to a project-specific Gradle version.
  -h, --help              Show this help message and exit.
  -o, --output-file=<outputFile>
                          Write the classpath to this file. If undefined, the
                            output is sent to STDOUT.
  -r, --regenerate-file   If 'true' it always regenerates the classpath file.
                            If 'false' it is not regenerated if it exists.
                            Defaults to 'false'
  -s, --path-separator=<pathSeparator>
                          The character used between paths. Defaults to ':'
  -V, --version           Print version information and exit.

Contributing

Building

  1. Clone this project and run the Gradle install task.

    $ git clone https://github.com/dansomething/gradle-classpath.git
    $ cd gradle-classpath
    $ ./gradlew installDist
  2. Look in build/install/gradle-classpath for the output.

Debugging

  1. Debug gradle-classpath on itself.

    $ ./gradlew run --debug-jvm
  2. Set breakpoints.

  3. Attach a Java debugger client to port 5005.

Running

  • Run gradle-classpath on itself.

    $ ./gradlew run
  • Run gradle-classpath on itself and write the results to a file.

    ./gradlew run --args='-o classpath.txt'

gradle-classpath's People

Contributors

dansomething avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.