Skip to content

Commit

Permalink
Publish Javadoc jar from Gradle build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbeams committed Apr 5, 2018
1 parent 104c8b6 commit 3f976c1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 30 deletions.
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/bisq/asset/Asset.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
Expand Down
29 changes: 1 addition & 28 deletions src/main/java/bisq/core/offer/OfferUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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() ||
Expand All @@ -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);
Expand Down

0 comments on commit 3f976c1

Please sign in to comment.