name.remal.java-settings
Plugin class: name.remal.gradle_plugins.plugins.java.JavaSettingsPlugin
plugins {
id 'name.remal.java-settings' version '1.5.0'
}
plugins {
id("name.remal.java-settings") version "1.5.0"
}
This plugin works only if java
plugin is applied.
The plugin applies these plugins:
name.remal.common-settings
name.remal.transitive-dependencies
name.remal.apt
name.remal.classes-processing
name.remal.merge-resources
name.remal.test-settings
name.remal.test-source-sets
name.remal.checkstyle-settings
name.remal.jacoco-settings
name.remal.findbugs-settings
name.remal.spotbugs-settings
name.remal.java-application-settings
This plugin helps to configure java
plugin.
- Creates
compileOnlyAll
configuration. AllcompileOnly
configurations extend it. - Creates
compileOptional
configuration.compileOnly
configuration extends it. Alsocompile
configurations of all source-sets except main extend it. Dependencies fromcompileOptional
configuration are added to allTest
andJavaExec
tasks including transitive dependencies. Transitive dependencies can be configured using name.remal.transitive-dependencies plugin. - Uses
mavenCentral
andmavenLocal
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
- Adds
Automatic-Module-Name
manifest attribute in result JAR archive if targetting Java 8 or below.