Skip to content

Commit

Permalink
add javadoc jar
Browse files Browse the repository at this point in the history
  • Loading branch information
baev committed Mar 14, 2017
1 parent aade0b8 commit acb9a03
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@
public @interface Attachment {

/**
* Attachment name.
* The attachment name.
*
* @return the attachment name.
*/
String value() default "{method}";

/**
* Valid attachment MimeType, for example "text/plain" or "application/json".
*
* @return the attachment type.
*/
String type() default "";

/**
* Optional attachment file extension. By default file extension will be determined by
* provided media type. Should be started with dot.
*
* @return the attachment file extension.
*/
String fileExtension() default "";
}
8 changes: 8 additions & 0 deletions allure-java-commons/src/main/java/io/qameta/allure/Link.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,30 @@

/**
* Alias for {@link #name()}.
*
* @return the link name.
*/
String value() default "";

/**
* Name for link, by default url.
*
* @return the link name.
*/
String name() default "";

/**
* Url for link. By default will search for system property `allure.link.{type}.pattern`, and use it
* to generate url.
*
* @return the link url.
*/
String url() default "";

/**
* This type is used for create an icon for link. Also there is few reserved types such as issue and tms.
*
* @return the link type.
*/
String type() default "custom";
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public static AllureLifecycle getLifecycle() {

/**
* Sets lifecycle for aspects. Usually used in tests.
*
* @param lifecycle allure lifecycle to set.
*/
public static void setLifecycle(final AllureLifecycle lifecycle) {
AttachmentsAspects.lifecycle = lifecycle;
Expand All @@ -56,6 +58,9 @@ public void anyMethod() {
/**
* Process data returned from method annotated with {@link Attachment}.
* If returned data is not a byte array, then use toString() method, and get bytes from it.
*
* @param joinPoint the join point to process.
* @param result the returned value.
*/
@AfterReturning(pointcut = "anyMethod() && withAttachmentAnnotation()", returning = "result")
public void attachment(final JoinPoint joinPoint, final Object result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public void stepStop() {

/**
* For tests only.
*
* @param allure allure lifecycle to set.
*/
public static void setLifecycle(final AllureLifecycle allure) {
lifecycle = allure;
Expand Down
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,14 @@ subprojects { project ->
from sourceSets.main.allJava
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourceJar
archives javadocJar
}

repositories {
Expand Down

0 comments on commit acb9a03

Please sign in to comment.