From 3f976c1b344ef70848cceb61152c3a34c3c1a7f0 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Thu, 5 Apr 2018 11:39:53 +0200 Subject: [PATCH] Publish Javadoc jar from Gradle build In order to take advantage of JitPack's automatic Javadoc publication service documented at https://jitpack.io/docs/#features. This should result in bisq-core Javadoc being browseable at https://jitpack.io/network/bisq/bisq-core/-SNAPSHOT/javadoc. Note that JDK 8's aggressive 'doclint' warnings and errors had to be suppressed here. See the following link for details: http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html. Also note that several ugly Javadoc warnings coming out of Dispute.java were un-suppressable, apparently for reasons described at https://stackoverflow.com/q/29902718. --- build.gradle | 14 ++++++++++ src/main/java/bisq/asset/Asset.java | 4 +-- src/main/java/bisq/core/offer/OfferUtil.java | 29 +------------------- 3 files changed, 17 insertions(+), 30 deletions(-) diff --git a/build.gradle b/build.gradle index 9f47af87..7ac1805c 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,20 @@ tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } +javadoc { + options.author = true + options.addStringOption('Xdoclint:none', '-quiet') +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives javadocJar +} + repositories { jcenter() maven { url 'https://jitpack.io' } diff --git a/src/main/java/bisq/asset/Asset.java b/src/main/java/bisq/asset/Asset.java index b67d0376..464ffbe9 100644 --- a/src/main/java/bisq/asset/Asset.java +++ b/src/main/java/bisq/asset/Asset.java @@ -19,8 +19,8 @@ /** * Interface representing a given ("crypto") asset in its most abstract form, having a - * {@link #getName() name}, e.g. "Bitcoin", a {@link #getTickerSymbol() ticker symbol}, - * e.g. "BTC", and an address validation function. Together, these properties represent + * {@link #getName() name}, eg "Bitcoin", a {@link #getTickerSymbol() ticker symbol}, + * eg "BTC", and an address validation function. Together, these properties represent * the minimum information and functionality required to register and trade an asset on * the Bisq network. *

diff --git a/src/main/java/bisq/core/offer/OfferUtil.java b/src/main/java/bisq/core/offer/OfferUtil.java index 5b32329f..3a85c590 100644 --- a/src/main/java/bisq/core/offer/OfferUtil.java +++ b/src/main/java/bisq/core/offer/OfferUtil.java @@ -40,9 +40,6 @@ public class OfferUtil { /** * Given the direction, is this a BUY? - * - * @param direction - * @return */ public static boolean isBuyOffer(OfferPayload.Direction direction) { return direction == OfferPayload.Direction.BUY; @@ -51,12 +48,7 @@ public static boolean isBuyOffer(OfferPayload.Direction direction) { /** * Returns the makerFee as Coin, this can be priced in BTC or BSQ. * - * @param bsqWalletService - * @param preferences preferences are used to see if the user indicated a preference for paying fees in BTC - * @param amount - * @param marketPriceAvailable - * @param marketPriceMargin - * @return + * @param preferences preferences are used to see if the user indicated a preference for paying fees in BTC */ @Nullable public static Coin getMakerFee(BsqWalletService bsqWalletService, Preferences preferences, Coin amount, boolean marketPriceAvailable, double marketPriceMargin) { @@ -69,12 +61,6 @@ public static Coin getMakerFee(BsqWalletService bsqWalletService, Preferences pr /** * Calculates the maker fee for the given amount, marketPrice and marketPriceMargin. - * - * @param isCurrencyForMakerFeeBtc - * @param amount - * @param marketPriceAvailable - * @param marketPriceMargin - * @return */ @Nullable public static Coin getMakerFee(boolean isCurrencyForMakerFeeBtc, @Nullable Coin amount, boolean marketPriceAvailable, double marketPriceMargin) { @@ -101,13 +87,6 @@ public static Coin getMakerFee(boolean isCurrencyForMakerFeeBtc, @Nullable Coin /** * Checks if the maker fee should be paid in BTC, this can be the case due to user preference or because the user * doesn't have enough BSQ. - * - * @param preferences - * @param bsqWalletService - * @param amount - * @param marketPriceAvailable - * @param marketPriceMargin - * @return */ public static boolean isCurrencyForMakerFeeBtc(Preferences preferences, BsqWalletService bsqWalletService, Coin amount, boolean marketPriceAvailable, double marketPriceMargin) { return preferences.getPayFeeInBtc() || @@ -116,12 +95,6 @@ public static boolean isCurrencyForMakerFeeBtc(Preferences preferences, BsqWalle /** * Checks if the available BSQ balance is sufficient to pay for the offer's maker fee. - * - * @param bsqWalletService - * @param amount - * @param marketPriceAvailable - * @param marketPriceMargin - * @return */ public static boolean isBsqForFeeAvailable(BsqWalletService bsqWalletService, @Nullable Coin amount, boolean marketPriceAvailable, double marketPriceMargin) { final Coin makerFee = getMakerFee(false, amount, marketPriceAvailable, marketPriceMargin);