Skip to content

Commit

Permalink
Merge pull request #5 from CBSkarmory/sw2bazel
Browse files Browse the repository at this point in the history
Switch to Bazel from Maven
  • Loading branch information
CBSkarmory authored Jan 17, 2019
2 parents ed04ef0 + 76a1e42 commit f4e8cd5
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 70 deletions.
19 changes: 19 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This is from Bazel's former travis setup, to avoid blowing up the RAM usage.
startup --host_jvm_args=-Xmx2500m
startup --host_jvm_args=-Xms2500m
startup --batch
test --ram_utilization_factor=10

# This is so we understand failures better
build --verbose_failures

# This is so we don't use sandboxed execution. Sandboxed execution
# runs stuff in a container, and since Travis already runs its script
# in a container (unless you require sudo in your .travis.yml) this
# fails to run tests.
build --spawn_strategy=standalone --genrule_strategy=standalone
test --test_strategy=standalone

# Below this line, .travis.yml will cat the default bazelrc.
# This is needed so Bazel starts with the base workspace in its
# package path.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ target/*
.project
*Backup.java
*~
/bazel-*
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
language: Java
before_install:
- echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
- curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
- sudo apt-get update
install:
- sudo apt-get install bazel
script:
- bazel build //:awgw-v0.5-alpha
- bazel build //:awgw-v0.5-alpha_deploy.jar
10 changes: 10 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
java_binary(
name = "awgw-v0.5-alpha",
srcs = glob(["src/main/java/**/*.java"]),
resources = glob([
"src/main/resources/**",
"src/main/java/**/*.gif",
"src/main/java/**/*.properties"
]),
main_class = "cbskarmory.Runner",
)
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,36 @@

*for older commits, see [majig12346/AWGW](https://github.com/majig12346/AWGW)*

## Build instructions
## Usage

Run `mvn package`
### Pre-compiled Binaries

See [Releases](https://github.com/CBSkarmory/AWGW/releases)

### Building it yourself

This will require [Bazel](https://www.bazel.build/).

To build, `bazel build //:awgw-v0.5-alpha'`

To run (and build at once), `bazel run //:awgw-v0.5-alpha'`

To run, the use the generated executable in `bazel-bin/`

Alternatively, build a standalone jar file using `bazel build //:awgw-v0.5-alpha_deploy.jar`.
This will generate `awgw-v0.5-alpha_deploy.jar` in `bazel-bin/`.

## Description

Recreation and expansion of Advance Wars in Java with GridWorld API

With 7 new Units!

If you want to know how to play, you will be linked to Wikipedia in-game along with a breif summary of directions.
If you want to know how to play, you will be linked to Wikipedia in-game along with a brief summary of directions.

Alternatively, https://en.wikipedia.org/wiki/Advance_Wars#Gameplay

**NOT IN IN-GAME DIRECTIONS**: hover a tile to see its applied defense (ie defense stars, unless the occupying unit is an air unit, in which case, it gets 0 defense stars)
**NOT IN IN-GAME DIRECTIONS**: hover a tile to see its applied defense (i.e. defense stars, unless the occupying unit is an air unit, in which case, it gets 0 defense stars)

## Featuring :

Expand Down
1 change: 1 addition & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

66 changes: 0 additions & 66 deletions pom.xml

This file was deleted.

0 comments on commit f4e8cd5

Please sign in to comment.