Skip to content
Usage example of the Badass Jar Plugin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
src
.gitattributes
.gitignore
.travis.yml
LICENSE
README.md
build.gradle.kts
gradle.properties
gradlew
gradlew.bat
license-header.txt
settings.gradle.kts
travis-build.sh

README.md

PRs Welcome License Build Status

Badass-Jar example: N-Queens in Kotlin

A simple project that shows how to use the Badass Jar Plugin. It implements a Kotlin library for solving the N-Queens problem.

The plugin is configured in build.gradle.kts as follows:

plugins {
    kotlin("jvm") version "1.3.10"
    id("org.beryx.jar") version "1.0.0"
}
...
java.sourceCompatibility = JavaVersion.VERSION_1_8
...

Usage

To build a modular jar that targets Java 8 execute:

./gradlew build

The above command does not check the validity of module-info.java. You can convince yourself of this by replacing the content of module-info.java with:

module foo.bar {
    exports bar.foo;
    requires baz.qux;
}

The above gradle command will still succeed, although the new module-info.java is invalid.

To check the validity of module-info.java execute:

./gradlew -PjavaCompatibility=11 build

Note that Travis is configured to run gradle both with and without the javaCompatibility project property:

./gradlew -PjavaCompatibility=11 --no-daemon -i -s build
./gradlew --no-daemon -i -s build
You can’t perform that action at this time.