-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add README + Makefile + ci
fix #1
- Loading branch information
Showing
14 changed files
with
145 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: android | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: macOS-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- run: make init | ||
- run: make heaps-world | ||
- run: make build | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: heapsapp-debug.apk | ||
path: heaps-android-app/heapsapp/build/outputs/apk/debug/heapsapp-debug.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/out/* | ||
out | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.PHONY: all init build install clean heaps-world | ||
|
||
all: build install | ||
|
||
init: | ||
brew install haxe | ||
brew bundle install --file hashlink/Brewfile --no-lock | ||
make -C hashlink | ||
make install -C hashlink | ||
haxelib setup /usr/local/lib/haxe/lib | ||
brew cask install android-studio | ||
ln -sf /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradlew /usr/local/bin | ||
chmod u+x /usr/local/bin/gradlew | ||
|
||
build: | ||
gradlew buildDebug -p heaps-android-app | ||
|
||
install: | ||
adb install heaps-android-app/heapsapp/build/outputs/apk/debug/heapsapp-debug.apk | ||
|
||
clean: | ||
gradlew clean -p heaps-android-app | ||
|
||
heaps-world: heaps-world-hl heaps-world-pak | ||
|
||
heaps-world-hl: | ||
cd heaps/samples && haxelib install --always ../../config/main.hxml && haxe -hl ../../out/main.c ../../config/main.hxml | ||
|
||
heaps-world-pak: | ||
cd heaps/samples && haxe -hl ../../out/pak.hl ../../config/pak.hxml && hl ../../out/pak.hl -out ../../out/res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Heaps Android | ||
Forked from https://github.com/HeapsIO/heaps-android/ | ||
|
||
![android](https://github.com/qkdreyer/heaps-android/workflows/android/badge.svg?branch=master) | ||
<!--- | ||
TODO add asciinema | ||
--> | ||
|
||
## Setup | ||
|
||
```sh | ||
git clone https://github.com/qkdreyer/heaps-android | ||
cd heaps-android | ||
make init | ||
``` | ||
|
||
## Usage | ||
|
||
```sh | ||
make heaps-world | ||
make build | ||
make install | ||
``` | ||
|
||
# Extra | ||
|
||
## Visual Studio Code | ||
|
||
`.vscode/tasks.json` | ||
``` | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Build & Run (Android)", | ||
"dependsOn": [ | ||
"Build (Android)", | ||
"Run (Android)" | ||
], | ||
"dependsOrder": "sequence", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Build (Android)", | ||
"type": "shell", | ||
"command": "make build", | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Run (Android)", | ||
"type": "shell", | ||
"command": "make install", | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
World.hx | ||
-lib heaps | ||
-lib hlsdl | ||
-lib hxbit | ||
-lib format | ||
-lib hashlink | ||
-D windowSize=1024x768 | ||
-D resourcesPath=world_res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
../../config/base.hxml | ||
-main World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
../../config/base.hxml | ||
-main hxd.fmt.pak.Build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.