Skip to content

Commit

Permalink
[java] finish gradle migration (#641)
Browse files Browse the repository at this point in the history
1. Update documentation
2. Delete pom.xml files
3. Update dependabot configuration
4. Update live-usb-creator
  • Loading branch information
ivmaykov authored Jul 5, 2023
1 parent 0ab81d7 commit 45b6461
Show file tree
Hide file tree
Showing 22 changed files with 36 additions and 556 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: maven
- package-ecosystem: gradle
directory: "/java"
schedule:
interval: daily
Expand Down
2 changes: 1 addition & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if (ENABLE_COVERAGE)
# In terminal 1:
# LLVM_PROFILE_FILE="subzero.profraw%c" ./subzero
# In terminal 2:
# run the GUI test (e.g. java/gui/target/gui-1.0.0-SNAPSHOT-shaded.jar --signtx-test)
# run the GUI test (e.g. java -jar java/gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar --signtx-test)
# Can also run additional tests in terminal 2, e.g. for wallet creation.
# Back to terminal 1:
# ctrl-C to kill the subzero process
Expand Down
6 changes: 3 additions & 3 deletions docs/regression-testing-howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ instructed in [subzero documentation](./running_without_hsm.md).

```bash
# under subzero repository directory root
./java/gui/target/gui-1.0.0-SNAPSHOT-shaded.jar --signtx-test
java -jar ./java/gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar --signtx-test
```

## How to create test vectors
Expand Down Expand Up @@ -52,7 +52,7 @@ Put the following content in `/data/app/subzero/wallets/subzero-1492.wallet`

```bash
# under subzero repository directory root
./java/server/target/server-1.0.0-SNAPSHOT.jar server
java -jar ./java/server/build/libs/server-1.0.0-SNAPSHOT.jar server
```

- Run python script `txsign_testcase_expect_scrypt_gen.py` to generate an
Expand Down Expand Up @@ -90,7 +90,7 @@ rm expect_subzero.log
# Note: The below expects X server to be running. If you are running this
# on the dev iso(No X server) then prefix it with xvfb-run <command>.
# That will make awt happy and let the command pass through peacefully!
/tmp/subzero_expect.sh ./java/gui/target/gui-1.0.0-SNAPSHOT-shaded.jar
/tmp/subzero_expect.sh ./java/gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar
# 'expect_subzero.log' should show up below
ls -l expect_subzero.log
```
Expand Down
11 changes: 4 additions & 7 deletions docs/running_without_hsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ not encrypted — Subzero's security model assumes you are using a HSM in your p
The instructions in this page work with Mac OS X. Linux users can simply skip irrelevant parts. Windows users are
advised to use a virtualization layer (e.g. Ubuntu inside VirtualBox).

The Core is compiled using _cmake_ and _gcc_. The web server and GUI are built using _maven_ and run with Java.
The Core is compiled using _cmake_ and _gcc_. The web server and GUI are built using _gradle_ and run with Java.
Since we don't have a HSM, we'll be using stub classes (included with Subzero) to successfully compile the
code — HSM-specific steps will then be skipped.

Expand All @@ -27,9 +27,6 @@ provide additional docker files for running the GUI and web server).
brew update
brew cask install java

# install Maven
brew install maven

# note: if Mac OS X gives you a warning about unverified developers, you can go to the
# Security & Privacy settings and allow the action to take place.

Expand All @@ -47,7 +44,7 @@ provide additional docker files for running the GUI and web server).

# build the Java code
cd java
mvn package
./gradlew build

# build the C code, using testnet transactions.
cd ../core
Expand All @@ -70,13 +67,13 @@ See also [sample output](core_sample_output.md).
./subzero/core/build/subzero

# in a fresh Terminal tab, start the dev/demo server (listens on port 8080)
./subzero/java/server/target/server-1.0.0-SNAPSHOT.jar server
java -jar ./subzero/java/server/build/libs/server-1.0.0-SNAPSHOT.jar server

# in a fresh Terminal tab, open http://localhost:8080/.
open http://localhost:8080/

# start the GUI
./subzero/java/gui/target/gui-1.0.0-SNAPSHOT-shaded.jar
java -jar ./subzero/java/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar

Your environment should look as following (from top left, going clockwise): the GUI, a web browser, and a Terminal.

Expand Down
1 change: 0 additions & 1 deletion java/fake_ncipher/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions java/fake_ncipher/pom.xml

This file was deleted.

1 change: 0 additions & 1 deletion java/gui/.gitignore

This file was deleted.

172 changes: 0 additions & 172 deletions java/gui/pom.xml

This file was deleted.

57 changes: 0 additions & 57 deletions java/pom.xml

This file was deleted.

1 change: 0 additions & 1 deletion java/proto/.gitignore

This file was deleted.

57 changes: 0 additions & 57 deletions java/proto/pom.xml

This file was deleted.

1 change: 0 additions & 1 deletion java/server/.gitignore

This file was deleted.

Loading

0 comments on commit 45b6461

Please sign in to comment.