Plugin class:

plugins {
    id '' version '1.5.0'
plugins {
    id("") version "1.5.0"


This plugin works only if java plugin is applied.

The plugin applies these plugins:


This plugin helps to configure java plugin.

  • Creates compileOnlyAll configuration. All compileOnly configurations extend it.
  • Creates compileOptional configuration. compileOnly configuration extends it. Also compile configurations of all source-sets except main extend it. Dependencies from compileOptional configuration are added to all Test and JavaExec tasks including transitive dependencies. Transitive dependencies can be configured using name.remal.transitive-dependencies plugin.
  • Uses mavenCentral and mavenLocal repositories by default.
  • Sets sources default encoding to UTF-8.
  • Enables displaying deprecation warnings.
  • Adds -parameters compiler option if targetting Java 8 and above.
  • If sources are compatible with Java 9 and above:
    • Adds --module-path compiler option. It equals to classpath plus annotation-processor path.
    • Adds --patch-module compiler option. It allows to have multiple output classes dirs, for example Java and Kotlin.
  • Adds Automatic-Module-Name manifest attribute in result JAR archive if targetting Java 8 or below.