Class AutoConfigurationOptimizerPlugin
java.lang.Object
com.patbaumgartner.optimizer.gradle.AutoConfigurationOptimizerPlugin
- All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>
public class AutoConfigurationOptimizerPlugin
extends Object
implements org.gradle.api.Plugin<org.gradle.api.Project>
Gradle plugin for Spring Boot Autoconfiguration Optimizer.
This plugin adds the following tasks:
trainAutoconfiguration- Runs the application in training mode to detect which auto-configurations are loadedinjectOptimizerCore- Injects the optimizer core classes into the build output before thejartask runs
The autoconfiguration-optimizer-core JAR is automatically added to
the
training subprocess classpath, so users do not need to declare it as
a project
dependency. After training the core classes are also injected into the main
output
directory so they are included in the packaged JAR.
Usage in build.gradle:
plugins {
id 'com.patbaumgartner.autoconfiguration-optimizer' version '1.0.0'
}
autoconfigurationOptimizer {
mainClass = 'com.example.MyApplication'
timeout = 120
}
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the configuration extension registered by this plugin.static final StringThe name of the core-injection task registered by this plugin.static final StringThe task group under which all plugin tasks are listed.static final StringThe name of the training task registered by this plugin. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newAutoConfigurationOptimizerPlugin. -
Method Summary
-
Field Details
-
EXTENSION_NAME
The name of the configuration extension registered by this plugin.- See Also:
-
TRAIN_TASK_NAME
The name of the training task registered by this plugin.- See Also:
-
INJECT_TASK_NAME
The name of the core-injection task registered by this plugin.- See Also:
-
TASK_GROUP
The task group under which all plugin tasks are listed.- See Also:
-
-
Constructor Details
-
AutoConfigurationOptimizerPlugin
public AutoConfigurationOptimizerPlugin()Creates a newAutoConfigurationOptimizerPlugin.
-
-
Method Details
-
apply
public void apply(org.gradle.api.Project project) - Specified by:
applyin interfaceorg.gradle.api.Plugin<org.gradle.api.Project>
-