Commit Graph

85 Commits

Author SHA1 Message Date
Manfred Karrer
323d058025
Revert version to -SNAPSHOT 2018-05-11 20:23:53 +02:00
Manfred Karrer
bd690d3878
Add BC jars 2018-05-11 18:16:05 +02:00
Manfred Karrer
7941e55c91
Change version from -SNAPSHOT to 0.7.0 2018-05-11 10:54:44 +02:00
Manfred Karrer
a66a663f48
Revert version to -SNAPSHOT 2018-05-11 10:16:03 +02:00
Manfred Karrer
6e8d4dfd3f
Add mavenLocal to repositories in gradle file 2018-05-10 23:13:40 +02:00
Manfred Karrer
190aca584a
Use version 0.7.0 instead of -SNAPSHOT 2018-05-10 12:27:41 +02:00
Chris Beams
4a7801023d
Re-introduce fat executable jar for release packaging
Prior to this fix, running `./package/osx/create_app.sh` produced a
"Main application jar is missing." error. Now the script works as
expected.
2018-05-06 15:40:00 +02:00
Chris Beams
5613629bbe
Remove distZip.enabled statement from build.gradle
Setting this value to `false` was a minor optimization to improve build
speed, as we don't need both tar and zip dists to be built (and zip
actually takes a few seconds).

PR #1500 set it to `true`, because it ended up causing build failures
down the road. This commit removes the statement altogether, as `true`
is the default value anyway.
2018-04-13 10:20:29 +02:00
Bernard Labno
d2ba3b8c95 Enable distZip flag in "build.gradle". 2018-04-06 11:20:50 +02:00
Chris Beams
86947c976c
Revert to 4-space indentation in build.gradle
Recent changes to dependencyVerification got committed with 8-space
indentation, causing a diff for the whole block. This reverts it to
4-space, which is what is generated by `gradle -q calculateChecksums`.
2018-03-29 19:44:35 +02:00
Manfred Karrer
11446d27f4
Add checksum for org.bouncycastle:bcpg-jdk15on 2018-03-29 12:36:08 -05:00
Manfred Karrer
a05ab5ae17
Update checksum hashes of dependencies 2018-03-29 12:34:39 -05:00
Christoph Atteneder
626cf5fb1b
Remove unused library 2018-03-26 14:08:38 +02:00
Christoph Atteneder
1ad4a679be
Add new version of icon library to enable step-by-step migration 2018-03-26 12:02:31 +02:00
Chris Beams
9d4e015108
Use app scripts instead of fat excutable jars
It doesn't actually work to build fat executable jars because we always
have bouncycastle jars that need to exist outside of the fat jar. This
change drops building fat jars altogether in favor of using Gradle's
built-in `application` plugin to write simple scripts that invoke java
with the correct classpath against a directory of all dependencies
(including bouncycastle) without the need to have a fat jar in the mix.

Essentially, you should now run:

    ./gradlew build
    ./build/app/bin/bisq-desktop [options]

Instead of `java -jar build/libs/bisq-desktop.jar`.

See updated doc/build.md for details.
2018-03-22 02:41:25 +01:00
Chris Beams
50dbe1d646
Remove unnecessary bouncycastle dependency declarations 2018-03-22 02:41:03 +01:00
Chris Beams
2731e044fb
Use 'master' tor-binary Maven repository
For reasons detailed in bisq-network/bisq-p2p@b1528bf3.

This change also regenerates the `dependencyVerification` block, which
is necessary in any case after the upgrade of tor binaries, but note
especially that for unknown reasons, commenting out certain dependencies
items is now no longer necessary as it was in commit
53a9009b06.
2018-03-22 00:34:30 +01:00
Chris Beams
53a9009b06
Comment out problematic dependency verifications
Problem: The dependency commented out in this commit, when left
uncommented cause any Gradle composite build that includes this
(`bisq-desktop`) build to fail with, for example, the following error:

    No dependency for integrity assertion found:
    com.github.bisq-network.libdohj:libdohj-core

Solution: Comment them out until someone can dig into the gradle-witness
plugin, figure out why these specific entries cause these failures, and
fix it. Note that the commented entries work as expected when this
Gradle build is used outside the context of a composite build.
2018-03-21 12:37:55 +01:00
Chris Beams
86a5a711c0
Update macOS packaging script
This commit is *not* a complete re-working of the scripts under package,
but is rather just enough of a re-working of the
package/osx/create_app.sh script to verify that the new Gradle build
creates a suitable fat executable jar for use in this script.

These changes have been tested with the following commands:

    cd package/osx
    ./create_app.sh
    open ../../deploy/Bisq-0.6.7.dmg

Then double-clicking the Bisq icon from the mounted DMG. Bisq starts up
as expected, without errors.

Further work will be required to update the package/osx/finalize.sh
script as well as the package/linux/ and package/windows/ scripts prior
to the next (0.7.0) release. For now, however, enough work has been done
to verify that the Gradle build creates the fat jar these scripts need.
2018-03-21 06:15:00 +01:00
Chris Beams
27cc933c4e
Verify dependency checksums with gradle-witness plugin
This performs the same function that the maven-enforcer-plugin did in
the pom removed by the previous commit, and also includes a more
comprehensive / up-to-date set of dependencies.

Note that the gradle-witness jar checked in here is one built from the
pull request in signalapp/gradle-witness#26.
2018-03-21 06:15:00 +01:00
Chris Beams
6e87bee784
Add Gradle build 2018-03-21 06:14:48 +01:00
Manfred Karrer
6b4f528f47 UpdateFX with maven build (tested only on mac) 2015-02-27 23:47:23 +01:00
Manfred Karrer
75b2e4462f Merged with master 2015-02-16 12:16:40 +01:00
Manfred Karrer
981ae03ac6 Update to Tomp2p beta3 and back to BitcoinJ 0.12.2 2015-02-15 18:01:22 +01:00
Manfred Karrer
61b0bfbe9c Update to latest BitcoinJ master 2015-02-14 22:23:48 +01:00
Joe Schmid
089007a498 Updated project to use 5.0-Beta2 of tomp2p
Note that this has not been thoroughly tested and, in particular, my router does not support UPnP so I've only been able to test with --node.useManualPortForwarding=true  The project does compile and run successfully though. With manual port forwarding I'm able to connect to the p2p network and view open offers successfully.
2015-02-06 22:54:16 -05:00
Sean Gilligan
fd6b78f069 Use https URL for artifactoryonline.com 2014-12-22 00:11:16 -08:00
Manfred Karrer
a7069ee467 Add updateFX 2014-12-17 17:57:55 +01:00
Chris Beams
80990fab50
Increment development version to 0.1.1-SNAPSHOT 2014-12-15 10:58:41 +01:00
Chris Beams
dc99a8cb15
Release Bitsquare v0.1.0 2014-12-11 18:50:13 +01:00
Chris Beams
7dbe3e33b1
Upgrade to the newly-released RxJava 1.0.0
See https://github.com/ReactiveX/RxJava/releases/tag/v1.0.0
2014-11-27 11:09:37 +01:00
Chris Beams
4ebc0c0e41
Complete implementation and testing of @FxmlView support 2014-11-25 22:12:33 +01:00
Chris Beams
30c0ade5f9
Merge branch 'cbeams'
Significant changes in the way that controllers and models interact with
backend services. Most important is the introduction of RxJava's
Observable. See individual commit comments for details.

Conflicts were minor, mainly dealing with the fact that MainPM had been
modified in master, but removed completely on the 'cbeams' branch. All
changes have been preserved by carrying them over to MainModel.

* cbeams:
  Improve service initialization coordination using rx.Observable
  Redesign controller/model types and apply to gui.main.Main*

Conflicts:
	build.gradle
	src/main/java/io/bitsquare/btc/WalletService.java
	src/main/java/io/bitsquare/gui/main/MainPM.java
	src/main/java/io/bitsquare/msg/tomp2p/TomP2PNode.java
2014-11-21 10:37:05 +01:00
Chris Beams
67295aea55
Improve service initialization coordination using rx.Observable
This change introduces the use of RxJava's Observable [1] to redesign
how we work with non-deterministic and/or event-based information, such
as: connecting to peer-to-peer infrastructure, synchronizing the bitcoin
blockchain, and so on.

Prior to this commit, these activities were initiated in methods like
WalletService#initialize and TomP2PMessageService#init. These methods
accepted 'listener' interfaces, and these listeners' callback methods
would be invoked whenever work progressed, completed, or failed.

This approach required significant coordination logic, which, prior to
this commit, was found primarily in MainModel#initBackend. A primary
goal of the logic found here was to determine when the backend was
"ready". This state was represented in MainModel's `backendReady` field,
which would be set to true once the following three conditions were
satisfied:

 1. the message service had finished initialization
 2. the wallet service had finished initialization, and
 3. the blockchain synchronization had reached 100%

Monitoring these three states was complex, and required hard-to-follow
conditional logic spread across a number of locations in the code. In
any case, however, once these three conditions were satisfied and
backendReady's value was set to true, a listener on the backendReady
field (in MainViewCB#doInitialize) would then populate combo boxes and
pending trade counts in the main view and cause the splash screen to
fade out, rendering the application ready for user interaction.

The introduction of rx.Observable is designed to achieve the same
show-the-splash-screen-until-everything-is-ready functionality described
above, without the complex monitoring, conditional logic and nested
callbacks. This is achieved by modeling each process as an Observable
stream of events. Observables in RxJava can emit any number of events,
and can complete either normally or with an error.

These observables may be 'subscribed' to by any number of subscribers,
and events emitted can be acted upon by instructing the subscriber what
to do `onNext`, `onCompleted`, and `onError`. So for example
WalletService now exposes an Observable<Double> called bootstrapState.
This Observable is subscribed to in MainModel#initBackend in such a way
that every time it emits a new double value (i.e. a new percentage), the
various bootstrap state text labels and progress indicators are updated
accordingly.

Where it gets really interesting, however, is when Observables are
combined. The primary complexity described above is coordinating the
fading out of the splash screen with the completed initialization of all
backend services. As can now be seen in MainModel#initBackend, the
wallet service and message service Observables are simply "merged" into
a single observable and returned. From the MainViewCB side, this "single
backend observable" is subscribed to and, when it completes (i.e. when
all the underlying Observables complete), then combo boxes and pending
trade counts are populated and the splash screen is faded out.

Understanding RxJava, Observables, and the principles of "Functional
Reactive Programming" takes time. It is a paradigm shift in dealing with
concurrency and non-determinism, but one that ultimately rewards those
who take the time. In the end, I believe it's use will result in a
significantly more concise and robust internal architecture for
Bitsquare, and using RxJava's lightweight, well-adopted and
infrastructure-agnostic API leaves us open to using Akka or other more
sophisticated infrastructure later without tying ourselves to those
specific APIs (because virtually anything can be modeled as an
Observable). Achieve these benifits means that core committers will need
to understand how RxJava works, how to think about it, and how to design
using it. I have spent the better part of the last week getting to know
it, and I am certainly still learning. I can recommend many resources to
aid in this process, but having gone through it myself, I recommend that
everyone read at least [1] and [2] first.

[1]: https://github.com/ReactiveX/RxJava/wiki/Observable
[2]: [The introduction to Reactive Programming you've been
missing](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754)
2014-11-21 10:34:35 +01:00
Chris Beams
356b76a21a
Configure shadowJar classifier in time for packageNative config
This change avoids the "Main application jar is missing" error described
in the comments on issue #243.
2014-11-20 18:52:46 +01:00
Manfred Karrer
46a56e4e4f Update to BitcoinJ 0.12.2 2014-11-17 18:57:58 +01:00
Manfred Karrer
f6d6f80a64 Update to lastest TomP2P master 2014-11-17 17:40:22 +01:00
Manfred Karrer
9a010a1a4d Update to latest master 2014-11-14 01:34:44 +01:00
Chris Beams
75b7482bf1
Polish formatting 2014-11-12 11:15:28 +01:00
Chris Beams
6c36b2fa46
Add 'appJar' and 'bootstapNodeJar' tasks to build
The build now exposes two explicit ShadowJar tasks: one for the main
JavaFX client (`appJar`) and one for the headless bootstrap node
(`bootstrapNodeJar`).

Run as follows:

    ./gradlew appJar
    -- or --
    ./gradlew bootstrapNodeJar

The resulting executable jar for each will be found in the `build/libs`
directory.

Thanks to @johnrengleman for his help at johnrengelman/shadow#108

Resolves #265
Resolves #252
2014-11-11 23:53:32 +01:00
Chris Beams
9adc41e23f
Introduce 'app.version' property and remove hardcoded version 2014-11-11 22:55:33 +01:00
Chris Beams
0136ea2884
Polish and test BitsquareEnvironment
- Introduce a test-time dependency on spring-test module for access to
   MockPropertySource and friends.

 - Add BitsquareEnvironmentTests and test that property source precedence
   works as expected, i.e. that properties supplied on the command line
   have highest precedence, overriding those picked up via environment
   variables, system properties, the bitsquare.properties file or any of
   the other available property sources.
2014-11-11 19:29:26 +01:00
Chris Beams
2b3c22d382
Merge branch 'wip-cbeams'
* wip-cbeams:
  Overhaul property management and main class infrastructure

Conflicts:
	build.gradle
2014-11-11 04:28:14 +01:00
Chris Beams
acf44128b2
Overhaul property management and main class infrastructure
Use of the Spring Environment
-----------------------------

This change replaces the use of the argparse4j library and basic
Properties objects with the Spring Framework's Environment abstraction.
The Environment allows for managing any number of 'property sources' in
a hierarchical fashion, such that a call to
`environment.getProperty("someKey")` iterates through an ordered set of
property sources, returning the first value associated with the given
key.

BitsquareEnvironment, introduced in this commit, eliminates the
functionality previously present in ConfigLoader, modeling the
bitsquare.conf and bitsquare.properties files as Spring Resource
objects, and in turn creating ResourcePropertySources out of them. These
custom property sources are combined with standard property sources
based on system environment variables and Java system properties as well
as a property source based on the command-line arguments passed to a
Bitsquare application to form a unified, one-stop configuration
hierarchy.

For example, let's say a Bitsquare user wishes to customize the port
that his Bitsquare application listens on. The simplest approach
(assuming the user is comfortable with the command line), would be the
following:

    java -jar bitsquare.jar --port=1234

where '1234' is the custom port of choice. This is convenient enough for
one-off experimentation, but if the user wishes to make this a permanent
arrangement, he may want to add a `port=1234` entry to his
{bitsquare_app_dir}/bitsquare.conf file.

Alternatively, the user may wish to specify the port value as an
environment variable, e.g.:

    PORT=1234 java -jar bitsquare.jar

or with a JVM system property, e.g.:

    java -jar -DPORT=1234 bitsquare.jar

With BitsquareEnvironment, and its customized set of PropertySources in
place, the value of the port property may be specified in any of the
ways described above, and it is all handled in a unified way.

Restructuring of *Main classes
------------------------------

This commit also introduces significant changes to the structure of
executable Bitsquare applications. For example, prior to this change,
the io.bitsquare.app.gui.Main class was responsible for being both a
JavaFX Application and a standard Java main class.

Now, however, these concerns have been renamed and separated.
BitsquareApp is the JavaFX Application, and BitsquareAppMain is the Java
main class. Likewise, BootstrapNode has been broken out into
BootstrapNode and BootstrapNodeMain.

A common base class for the *Main classes has been extracted, named
BitsquareExecutable, which creates a template for option parsing,
environment creation, and ultimately application execution that applies
both to the BootstrapNode and BitsquareApp cases.

Improved help text
------------------

With the removal of argparse4j and the introduction of JOpt for argument
parsing, the application's help text has been improved. Use --help to
display this text, where you'll see information about default values,
etc. To do this easily from the Gradle build, run any of the following
commands:

    # Display help text
    ./gradlew run -Pargs="--help"

    # Qualify the application name as "Bitsquare-Alice"
    ./gradlew run -Pargs="--appName=Alice"

    # Customize the port
    ./gradlew run -Pargs="--port=7377"

Renaming of FatalException
--------------------------

Finally, the exception formerly known as io.bitsquare.gui.FatalException
has been moved up a package and generalized to
io.bitsquare.BitsquareException, as it is now used more widely.
2014-11-11 04:20:48 +01:00
Manfred Karrer
78a09d874d Update TomP2P aa0c736 2014-11-11 00:01:53 +01:00
Chris Beams
20db54e87b
Remove Akka-based seed node infrastructure (for now)
In favor of using the simplified app.cli.SeedNode class while we
continue to debug basic UPnP functionality.
2014-11-10 00:44:17 +01:00
Chris Beams
dfbe6973e7
Split Gradle arguments on comma vs. spaces
Prior to this commit, Gradle was configured to take a -Pargs property
and split the value on whitespace, passing the result to the Gradle
application plugin's 'args' property, for example:

    gradle run -Pargs="--id=foo --ip=1.1.1.1 --port=10001"

While this approach works fine when passing a single argument (i.e. when
no space delimiters are required), when multiple arguments are passed,
such as in the example above, it would result in the following error
from Gradle's own command line parser:

    Unknown command-line option '--ip'

This commit simply splits the value of -Pargs on commas rather than
spaces, meaning that now multiple -Pargs values should be supplied as
follows:

    gradle run -Pargs="--id=foo,--ip=1.1.1.1,--port=10001"

Resolves #264
2014-11-09 23:09:15 +01:00
Manfred Karrer
5d5fd49a45 Update to latest TomP2P master 2014-11-09 13:48:24 +01:00
Manfred Karrer
232a208a03 Revert to 0.12 as 0.12.1 has changes in the Coin class 2014-11-07 17:28:59 +01:00
Manfred Karrer
182218612e Update to bitcoinJ 12.1 2014-11-07 16:04:56 +01:00