Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

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.5.31"
    id("org.beryx.jar") version "2.0.0-rc-4"
}
...
val jvmVersion = "${findProperty("javaCompatibility") ?: "11"}".toInt()
tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "${JavaVersion.toVersion(jvmVersion)}"
}
...
compileJava.options.release.set (jvmVersion)
moduleConfig.version.set("$version")
moduleConfig.neverCompileModuleInfo.set(true)
...

Usage

To build a modular jar that targets Java 11 execute:

./gradlew build

To build a modular jar that targets Java 8 execute:

./gradlew -PjavaCompatibility=8 build

About

Usage example of the Badass Jar Plugin

Resources

License

Releases

No releases published

Packages

No packages published