Skip to content

Commit de4ed85

Browse files
committed
Correct Javadoc of Gradle plugin to avoid errors and warnings during generation.
1 parent 5d3a312 commit de4ed85

8 files changed

Lines changed: 101 additions & 1 deletion

File tree

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAndroidPlugin.java

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ public class ByteBuddyAndroidPlugin implements Plugin<Project> {
112112
TRANSFORMATION_DISPATCHER = dispatcher;
113113
}
114114

115+
/**
116+
* Creates a new Byte Buddy plugin for Android.
117+
*/
118+
public ByteBuddyAndroidPlugin() {
119+
/* empty */
120+
}
121+
115122
/**
116123
* {@inheritDoc}
117124
*/
@@ -213,6 +220,13 @@ public void execute(Variant variant) {
213220
*/
214221
protected abstract static class RuntimeClassPathResolver {
215222

223+
/**
224+
* Creates a new runtime class path resolver.
225+
*/
226+
protected RuntimeClassPathResolver() {
227+
/* empty */
228+
}
229+
216230
/**
217231
* The runtime class path resolver to use.
218232
*/
@@ -245,6 +259,13 @@ protected abstract static class RuntimeClassPathResolver {
245259
*/
246260
protected static class OfLegacyAgp extends RuntimeClassPathResolver {
247261

262+
/**
263+
* Creates a new runtime class path resolver for a legacy Android Gradle plugin.
264+
*/
265+
protected OfLegacyAgp() {
266+
/* empty */
267+
}
268+
248269
@Override
249270
protected FileCollection apply(Variant variant) {
250271
if (!(variant instanceof ComponentCreationConfig)) {
@@ -440,6 +461,13 @@ public void execute(AttributeContainer attributes) {
440461
*/
441462
protected static class AttributeMatchingStrategyConfigurationAction implements Action<AttributeMatchingStrategy<String>> {
442463

464+
/**
465+
* Creates a new configuration action for an attribute matching strategy.
466+
*/
467+
protected AttributeMatchingStrategyConfigurationAction() {
468+
/* empty */
469+
}
470+
443471
/**
444472
* {@inheritDoc}
445473
*/
@@ -453,6 +481,13 @@ public void execute(AttributeMatchingStrategy<String> stringAttributeMatchingStr
453481
*/
454482
protected static class ConfigurationConfigurationAction implements Action<Configuration> {
455483

484+
/**
485+
* Creates a new configuration action for a configuration.
486+
*/
487+
protected ConfigurationConfigurationAction() {
488+
/* empty */
489+
}
490+
456491
/**
457492
* {@inheritDoc}
458493
*/
@@ -467,6 +502,13 @@ public void execute(Configuration configuration) {
467502
*/
468503
public abstract static class ByteBuddyDependencyRule implements AttributeCompatibilityRule<String> {
469504

505+
/**
506+
* Creates a new dependency rule.
507+
*/
508+
public ByteBuddyDependencyRule() {
509+
/* empty */
510+
}
511+
470512
/**
471513
* {@inheritDoc}
472514
*/
@@ -725,6 +767,10 @@ protected enum ByteBuddyViewConfiguration implements Action<ArtifactView.ViewCon
725767
* For external dependencies, it provides their JAR files. For local project's dependencies, it provides their local
726768
* build dirs for both classes and resources. The latter allows for faster and more reliable (up-to-date) compilation processes
727769
* when using local plugins.
770+
*
771+
* @param project The current project.
772+
* @param configuration The configuration to resolve.
773+
* @return The class path that is represented by the supplied configuration.
728774
*/
729775
protected static FileCollection toClassPath(Project project, Configuration configuration) {
730776
return project.files(

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAndroidService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
*/
5656
public abstract class ByteBuddyAndroidService implements BuildService<ByteBuddyAndroidService.Parameters>, Closeable {
5757

58+
/**
59+
* Creates a new Byte Buddy Android service.
60+
*/
61+
public ByteBuddyAndroidService() {
62+
/* empty */
63+
}
64+
5865
/**
5966
* A {@link ClassVisitorFactory} to bridge between Android and Byte Buddy's ASM namespace.
6067
*/

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAsmClassVisitorFactory.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
*/
2626
public abstract class ByteBuddyAsmClassVisitorFactory implements AsmClassVisitorFactory<ByteBuddyInstrumentationParameters> {
2727

28+
/**
29+
* Creates a new class visitor factory.
30+
*/
31+
public ByteBuddyAsmClassVisitorFactory() {
32+
/* empty */
33+
}
34+
2835
/**
2936
* {@inheritDoc}
3037
*/

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@
7575
*/
7676
public abstract class ByteBuddyLocalClassesEnhancerTask extends DefaultTask {
7777

78+
/**
79+
* Creates a new local classes enhancer task.
80+
*/
81+
public ByteBuddyLocalClassesEnhancerTask() {
82+
/* empty */
83+
}
84+
85+
/**
86+
* Returns the transformations to apply.
87+
*
88+
* @return The transformations to apply.
89+
*/
7890
@Nested
7991
public abstract ListProperty<Transformation> getTransformations();
8092

@@ -331,6 +343,8 @@ public static class ConfigurationAction implements Action<ByteBuddyLocalClassesE
331343
private final ByteBuddyAndroidTaskExtension byteBuddyExtension;
332344

333345
/**
346+
* Creates a new configuration action.
347+
*
334348
* @param byteBuddyClassPath The current variant Byte Buddy configuration.
335349
* @param commonExtension The Android Gradle extension.
336350
* @param androidComponentsExtension The Android components extension.

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/LegacyByteBuddyLocalClassesEnhancerTask.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,17 @@
5353
import java.util.Set;
5454

5555
/**
56-
* Transformation task for instrumenting the project's local classes using the legacy AGP api < 7.4.0.
56+
* Transformation task for instrumenting the project's local classes using the legacy AGP api prior to version 7.4.0.
5757
*/
5858
public abstract class LegacyByteBuddyLocalClassesEnhancerTask extends DefaultTask {
5959

60+
/**
61+
* Creates a new legacy local classes enhancer task.
62+
*/
63+
public LegacyByteBuddyLocalClassesEnhancerTask() {
64+
/* empty */
65+
}
66+
6067
/**
6168
* Returns the boot class path of Android.
6269
*
@@ -223,6 +230,8 @@ public static class ConfigurationAction implements Action<LegacyByteBuddyLocalCl
223230
private final FileCollection runtimeClasspath;
224231

225232
/**
233+
* Creates a new configuration action.
234+
*
226235
* @param byteBuddyConfiguration The current variant Byte Buddy configuration.
227236
* @param androidExtension The android gradle extension.
228237
* @param runtimeClasspath The current variant's runtime classpath.

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/PluginArgument.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ public void setValue(@MaybeNull Object value) {
107107
this.value = value;
108108
}
109109

110+
/**
111+
* Resolves this argument to an equivalent argument of the non-Android Byte Buddy Gradle plugin.
112+
*
113+
* @return A {@code net.bytebuddy.build.gradle.PluginArgument} that represents this argument.
114+
*/
110115
protected Object resolve() {
111116
try {
112117
Class<?> type = Class.forName("net.bytebuddy.build.gradle.PluginArgument");

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/Transformation.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ public void setPluginName(@MaybeNull String pluginName) {
149149
this.pluginName = pluginName;
150150
}
151151

152+
/**
153+
* Resolves this transformation to an equivalent transformation of the non-Android Byte Buddy Gradle plugin.
154+
*
155+
* @return A {@code net.bytebuddy.build.gradle.Transformation} that represents this transformation.
156+
*/
152157
protected Object resolve() {
153158
try {
154159
Class<?> type = Class.forName("net.bytebuddy.build.gradle.Transformation");

byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyPlugin.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ public class ByteBuddyPlugin implements Plugin<Project> {
5555
DISPATCHER = dispatcher;
5656
}
5757

58+
/**
59+
* Creates a new Byte Buddy plugin.
60+
*/
61+
public ByteBuddyPlugin() {
62+
/* empty */
63+
}
64+
5865
/**
5966
* {@inheritDoc}
6067
*/

0 commit comments

Comments
 (0)