Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
import org.gradle.api.Plugin;
import org.gradle.api.Project;

/**
* Base plugin for compiling Sass/SCSS files using the embedded Dart Sass compiler.
* <p>
* Creates a {@code sass} extension for configuring default compilation settings that
* apply to all {@link SassCompile} tasks, including:
* <ul>
* <li>Output style (compressed, expanded, etc.)</li>
* <li>Source map generation and embedding</li>
* <li>Whether to omit the source map URL from compiled output</li>
* </ul>
*
* @see SassExtension
* @see SassCompile
*/
@Incubating
public class SassBasePlugin implements Plugin<Project> {
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@

import java.io.File;

/**
* Plugin that integrates Sass compilation with WAR projects.
* <p>
* Applies {@link SassWebjarsPlugin} and Gradle's {@link WarPlugin}, then registers a
* {@code compileWebappSass} task that compiles Sass/SCSS files from the webapp directory
* ({@code src/main/webapp}) and includes the compiled CSS in the WAR file.
* <p>
* The compiled output is placed in the WAR at the same relative path as the source files.
*/
@Incubating
public class SassWarPlugin implements Plugin<Project> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
import org.gradle.jvm.toolchain.JavaLauncher;
import org.gradle.jvm.toolchain.JavaToolchainService;

/**
* Gradle plugin that integrates Project Lombok with Java projects.
* <p>
* Applies the Lombok annotation processor to Java compilation and provides
* delombok tasks for generating de-annotated source code. Also adds SpotBugs
* annotations to the compile-only classpath when either the {@code com.github.spotbugs}
* or {@code org.sonarqube} plugin is present.
* <p>
* This plugin creates:
* <ul>
* <li>A {@code lombok} configuration for Lombok dependencies</li>
* <li>Delombok tasks for each source set (e.g., {@code delombok})</li>
* </ul>
*/
@Getter
public class LombokPlugin implements Plugin<Project> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.plugins.JavaPlugin;

/**
* Plugin that provides an {@code optional} configuration for optional dependencies.
* <p>
* Creates an {@code optional} configuration. The {@code compileOnly},
* {@code testCompileOnly}, and {@code testRuntimeOnly} configurations all
* extend from it, so anything declared as {@code optional} is available at
* compile time and for tests but is excluded from the runtime classpath
* and from published dependency metadata.
* This is similar to Maven's {@code <optional>true</optional>} dependency scope.
*/
public class OptionalPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
import java.io.File;
import java.util.Collections;

/**
* Plugin that adds support for archiving WAR classes separately.
* <p>
* Adds an {@code archiveClasses} extension property to {@link War} tasks. When enabled,
* this creates a separate JAR file containing the WAR's class files and adjusts the
* WAR's classpath to reference this JAR instead of including classes directly in
* {@code WEB-INF/classes}.
* <p>
* This is useful for creating skinny WARs where classes are packaged separately.
*/
public class WarArchiveClassesPlugin implements Plugin<Project> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
import org.gradle.api.tasks.bundling.Jar;
import org.gradle.api.tasks.bundling.War;

/**
* Plugin that attaches a classes JAR as an artifact alongside the WAR.
* <p>
* Adds {@code attachClasses} and {@code classesClassifier} extension properties to {@link War} tasks.
* When {@code attachClasses} is enabled, the main classes JAR is published as an additional
* artifact with the specified classifier (defaults to "classes").
* <p>
* This allows other projects to depend on the WAR's classes without depending on the entire WAR file.
*/
public class WarAttachClassesPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
import org.gradle.api.Plugin;
import org.gradle.api.Project;

/**
* Composite plugin that applies enhanced WAR functionality.
* <p>
* This plugin applies:
* <ul>
* <li>{@link org.gradle.api.plugins.WarPlugin} - Gradle's standard WAR plugin</li>
* <li>{@link WarOverlayPlugin} - Support for WAR overlays</li>
* <li>{@link WarArchiveClassesPlugin} - Archive classes separately from WAR</li>
* <li>{@link WarAttachClassesPlugin} - Attach classes JAR as artifact</li>
* </ul>
*/
public class WarPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
import org.gradle.api.tasks.bundling.Tar;
import org.gradle.api.tasks.bundling.Zip;

/**
* Gradle plugin for MkDocs documentation generator.
* <p>
* Provides tasks to build, serve, and package MkDocs-based documentation.
* Requires MkDocs to be installed and available on the system PATH.
* <p>
* This plugin registers the following tasks:
* <ul>
* <li>{@code mkdocs} - Builds the documentation</li>
* <li>{@code mkdocsServe} - Starts the development server</li>
* <li>{@code mkdocsNew} - Creates a new MkDocs project</li>
* <li>{@code mkdocsZip} - Creates a ZIP archive of the built documentation</li>
* <li>{@code mkdocsTar} - Creates a TAR archive of the built documentation</li>
* </ul>
*/
public class MkDocsPlugin implements Plugin<Project> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@
import java.net.URL;
import java.util.List;

/**
* Settings plugin that automatically registers all freefair Gradle plugins with their versions.
* <p>
* This plugin reads plugin IDs from {@code META-INF/freefair/plugin-ids} and registers them
* in the settings plugin management block, setting each plugin's version to match this
* plugin's package version. This allows using freefair plugins without explicitly
* specifying version numbers in the plugins block.
* <p>
* Apply this plugin in {@code settings.gradle}:
* <pre>
* plugins {
* id 'io.freefair.plugin-versions' version 'x.y.z'
* }
* </pre>
*/
@Slf4j
public class PluginVersionsPlugin implements Plugin<Settings> {
@SneakyThrows
Expand Down
Loading