From f545ae79369fb0eb805e4b508f23fb54c9414132 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Mon, 4 Dec 2023 13:54:42 +0100 Subject: [PATCH] Extend section about how to disable the plugin's effect --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 9f9f480..87e428c 100644 --- a/README.md +++ b/README.md @@ -114,20 +114,36 @@ you can deactivate it for the runtime classpath as the module information is irr **Kotlin DSL** ``` +// Disable for a single Classpath (Configuration) configurations { runtimeClasspath { // testRuntimeClasspath, testCompileClasspath, ... attributes { attribute(Attribute.of("javaModule", Boolean::class.javaObjectType), false) } } } + +// Disable for all 'annotationProcessor' paths +sourceSets.all { + configurations.getByName(annotationProcessorConfigurationName) { + attributes { attribute(Attribute.of("javaModule", Boolean::class.javaObjectType), false) } + } +} ``` **Groovy DSL** ``` +// Disable for a single Classpath (Configuration) configurations { runtimeClasspath { // testRuntimeClasspath, testCompileClasspath, ... attributes { attribute(Attribute.of("javaModule", Boolean), false) } } } + +// Disable for all 'annotationProcessor' paths +sourceSets.all { + configurations.getByName(annotationProcessorConfigurationName) { + attributes { attribute(Attribute.of("javaModule", Boolean), false) } + } +} ``` ## How do I add `provides ... with ...` declarations to the `module-info.class` descriptor?