-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Record noteworthy build items into extension metadata
- Loading branch information
1 parent
a8d3b17
commit 88bdd29
Showing
16 changed files
with
314 additions
and
22 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
core/builder/src/main/java/io/quarkus/builder/item/AddToMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package io.quarkus.builder.item; | ||
|
||
public @interface AddToMetadata { | ||
String value(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
core/processor/src/test/resources/org/acme/examples/ClassWithNoteworthyBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.acme.examples; | ||
|
||
import io.quarkus.deployment.annotations.BuildStep; | ||
|
||
public class ClassWithNoteworthyBuildItem { | ||
@BuildStep | ||
NoteworthyBuildItem devService() { | ||
return new NoteworthyBuildItem(); | ||
} | ||
|
||
// This one shouldn't get recorded for use in the metadata | ||
@BuildStep | ||
ArbitraryBuildItem arbitrary() { | ||
return new ArbitraryBuildItem(); | ||
} | ||
|
||
// This one shouldn't get recorded, obviously, and it should not cause runtime exceptions | ||
@BuildStep | ||
void boring() { | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
core/processor/src/test/resources/org/acme/examples/NoteworthyBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.acme.examples; | ||
|
||
import io.quarkus.builder.item.AddToMetadata; | ||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
@AddToMetadata("some-cool-ability") | ||
public final class NoteworthyBuildItem extends MultiBuildItem { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.