Coder Social home page Coder Social logo

gradle-bluej-jar's Introduction

bluej-jar Gradle Plugin

This is a Gradle plugin for producing JAR files which are valid BlueJ project archives.

This plugin only works in Java projects, as BlueJ only supports Java and Stride. It also only works in the main Source Set. Support for non-main Source Sets is planned.

For alternative build systems:

Setup

bluej-jar is available on the Gradle Plugin Portal.

Apply bluej-jar with:

plugins {
  id "com.williambl.bluej_jar.bluej-jar" version "0.1"
}

Note that BlueJ uses Java 11, so the bytecode compiled must be Java 11-compatible. This can be done with:

compileJava {
    options.release = 11
}

What is a BlueJ project archive?

A BlueJ project archive has several differences to a 'normal' JAR file:

  • .java sources are included alongside built .class files (the .class files are not even technically required!)
  • all library .jar files are included in a +libs folder (BlueJ's dependency management consists only of this +libs folder)
  • contents of libraries are included ('fat JAR') (it is unknown if this is required - it is likely not. However, this is how BlueJ exports JARs.)

This plugin also copies README.TXT and project.bluej files into the JAR, as BlueJ has special handling for these.

This plugin does not handle generation of project.bluej or *.ctxt files. BlueJ can import the project without them.

Configuration

The plugin does not offer configuration at this time.

Planned Features

  • Configuration (not include .class files, not include certain libraries, etc.)
  • Research whether the JAR is required to be a 'fat JAR', and if not, add an option to disable this
    • Research whether the libs must be copied to +libs if the JAR is fat
  • Possible project.bluej generation, to allow classes to be placed nicely in BlueJ's graph view
  • README.TXT generation from top-level readme files or from package-info.java javadoc.
  • Task to open the resulting JAR in BlueJ, for testing.
  • Task to change Source Set(s) used

gradle-bluej-jar's People

Contributors

williambl avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.