Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.0 #121

Merged
merged 120 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
6d11bae
update action
xpenatan Jan 11, 2024
cd99883
update get version code
xpenatan Jan 11, 2024
522916a
update get version code
xpenatan Jan 11, 2024
834e7f4
Merge pull request #115 from xpenatan/release
xpenatan Jan 11, 2024
5023d4c
wip add resource files
xpenatan Mar 4, 2024
f7e04b9
add pixel test
xpenatan Mar 5, 2024
88b7354
update settings
xpenatan Mar 5, 2024
bed6e70
Merge remote-tracking branch 'origin/master'
xpenatan Mar 5, 2024
acd40fd
fix drawing single pixel in angle
xpenatan Mar 7, 2024
e49e4df
update settings includeBuild
xpenatan Apr 13, 2024
f68fcb2
update snapshot to 0.10.0-dev-12
xpenatan Apr 23, 2024
1a1235c
update teavm version
xpenatan May 1, 2024
ff078b6
Breaking stuff. Use native Gdx2DPixmap, Add more gdx tests. update wasm.
xpenatan May 9, 2024
88a3d10
fix line
xpenatan May 9, 2024
aaf2a6e
update imgui gdx tests
xpenatan May 9, 2024
0a0554d
add default gradle runs
xpenatan May 9, 2024
d80d6e3
add desktop freetype
xpenatan May 10, 2024
4fe367e
Few changes
xpenatan May 10, 2024
b32c031
disable generator
xpenatan May 10, 2024
d277168
Fix pixmap and freetype. Improve getting js buffers
xpenatan May 13, 2024
04957f2
improvements
xpenatan May 15, 2024
4ef01e7
fix read pixel
xpenatan May 15, 2024
2e29f85
Fix readpixel
xpenatan May 15, 2024
405b1f1
Clean up
xpenatan May 15, 2024
1cb2282
Small resource fix
xpenatan May 16, 2024
cb5a48d
fix copying gltf resources
xpenatan May 25, 2024
12ee017
throw when file is null
xpenatan May 25, 2024
2080b91
remove comment from adding directory asset
xpenatan May 28, 2024
b05d185
add file test
xpenatan May 28, 2024
0f61612
update filetest
xpenatan May 28, 2024
12c5607
wip indexeddb
xpenatan May 29, 2024
565cb69
add delay count in application
xpenatan May 29, 2024
d524f02
update indexeddb code
xpenatan May 30, 2024
6ef3443
indexeddb improvements
xpenatan May 30, 2024
ebfdcaa
Some db fixes
xpenatan May 30, 2024
3d37968
Update changes
xpenatan May 31, 2024
0662298
local file improvements
xpenatan Jun 8, 2024
1f713ae
Small file handle change
xpenatan Jun 8, 2024
96a94e6
Make all paths start with dash
xpenatan Jun 9, 2024
b7e3436
Fix local path
xpenatan Jun 9, 2024
299d481
wip assets
xpenatan Jun 10, 2024
895c108
wip file system
xpenatan Jun 12, 2024
bbf6562
remove emulated byte buffer
xpenatan Jun 12, 2024
19e8ef4
Improvements
xpenatan Jun 12, 2024
413e973
small code improvement
xpenatan Jun 13, 2024
85335bc
fix typo
xpenatan Jun 13, 2024
daec145
fix comment
xpenatan Jun 13, 2024
811899a
Memory file improvements
xpenatan Jun 15, 2024
e7114bf
Memory file improvements
xpenatan Jun 15, 2024
b1102ea
file fixes
xpenatan Jun 15, 2024
5e124b9
Dispose when browser closes
xpenatan Jun 15, 2024
0b830db
update gradle
xpenatan Jun 15, 2024
8b5c697
encode/decode preference
xpenatan Jun 15, 2024
3b417a5
improvements
xpenatan Jun 15, 2024
acd877b
log byte size
xpenatan Jun 15, 2024
effde03
Fix deleting all child folder/files
xpenatan Jun 15, 2024
ef91f7a
Improve file renaming
xpenatan Jun 19, 2024
ee9efed
Fix moving files/folders
xpenatan Jun 19, 2024
8396621
add more tests
xpenatan Jun 19, 2024
7e2e954
Fix saving local data
xpenatan Jun 21, 2024
b52264d
Call resume/pause if state is loop
xpenatan Jun 22, 2024
109ff37
Fix starting with empty file
xpenatan Jun 22, 2024
f794cb1
remove typo
xpenatan Jun 22, 2024
2d23254
Reduce init count in onComplete
xpenatan Jun 22, 2024
0fafa33
add copy/paste clipboard event
xpenatan Jun 24, 2024
d161793
fix indent
xpenatan Jun 24, 2024
39f75f2
update readme
xpenatan Jun 26, 2024
3ff2c6e
update workflow
xpenatan Jun 26, 2024
2fbd709
update workflow
xpenatan Jun 26, 2024
9ed9350
update file drop listener
xpenatan Jul 3, 2024
6a7a393
kill old file system
xpenatan Jul 4, 2024
61d4bc2
Improve adding gdx source
xpenatan Jul 4, 2024
2b21727
fix imgui code
xpenatan Jul 4, 2024
6d7fa00
wip audio
xpenatan Jul 5, 2024
9ee34fd
Improve adding gdx source
xpenatan Jul 4, 2024
534af11
fix imgui code
xpenatan Jul 4, 2024
f88f1f6
Fixes
xpenatan Jul 5, 2024
c7f1f91
Merge branch 'master' into work/kill-old-filesystem
xpenatan Jul 5, 2024
454c201
Fixes
xpenatan Jul 5, 2024
ac0fa4e
Merge branch 'master' into work/kill-old-filesystem
xpenatan Jul 5, 2024
8ae8c02
Change file to asset file handle
xpenatan Jul 5, 2024
aff774b
wip audio
xpenatan Jul 5, 2024
59b24e5
add new audio
xpenatan Jul 6, 2024
2a39636
Remove old audio
xpenatan Jul 6, 2024
acdce56
add sound lib
xpenatan Jul 6, 2024
1c3064f
Merge pull request #119 from xpenatan/work/kill-old-filesystem
xpenatan Jul 6, 2024
b4a4694
Fix when properties don't exist
xpenatan Jul 6, 2024
813bdf2
scripts is now at scripts folder
xpenatan Jul 6, 2024
86bede2
Improve copying assets
xpenatan Jul 7, 2024
175619c
Clean up asset downloader, preloader and some improvements
xpenatan Jul 8, 2024
fe85b08
update readme
xpenatan Jul 8, 2024
d5bbd02
Merge pull request #120 from xpenatan/work/change-preloader
xpenatan Jul 8, 2024
c080dee
Change preload to interface
xpenatan Jul 8, 2024
660009d
Add preloader instance
xpenatan Jul 8, 2024
a7fc818
Rename Preloader to AssetLoader
xpenatan Jul 8, 2024
23dd856
move asset filter
xpenatan Jul 8, 2024
e385d49
Move asset loader to a new module
xpenatan Jul 8, 2024
000df65
Remove unused dependencies
xpenatan Jul 8, 2024
4debbe4
Download log fix
xpenatan Jul 8, 2024
6c0ff04
add retry attempt
xpenatan Jul 9, 2024
4e50cc5
Improvements
xpenatan Jul 9, 2024
f3cbc47
update workflow
xpenatan Jul 9, 2024
a00a156
Check if object is null
xpenatan Jul 9, 2024
9823a10
Add internal test to gdx tests
xpenatan Jul 9, 2024
d5fd793
update workflow
xpenatan Jul 9, 2024
c47966c
Fix badge
xpenatan Jul 9, 2024
ce54e3d
Fix badge
xpenatan Jul 9, 2024
20717cb
fix readme
xpenatan Jul 9, 2024
b1706a5
update readme
xpenatan Jul 9, 2024
2c054e7
update example
xpenatan Jul 9, 2024
1f08421
Fix typo
xpenatan Jul 9, 2024
3b79831
Classpath and resources always generate asset file
xpenatan Jul 9, 2024
a062ad5
Copy heap buffer because buffer isDetached is setting to true
xpenatan Jul 9, 2024
acf670f
update examples
xpenatan Jul 9, 2024
b60226b
add gltf example to gdx tests
xpenatan Jul 9, 2024
8a22694
update changes and version.
xpenatan Jul 9, 2024
dca6a52
Prevent folder download
xpenatan Jul 9, 2024
6a74bbc
upda test
xpenatan Jul 9, 2024
e575095
update readme
xpenatan Jul 9, 2024
5f78f2a
fix download logs
xpenatan Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions .github/workflows/build_and_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get version
uses: madhead/read-java-properties@latest
id: version
with:
file: "./gradle.properties"
property: version
default: 0.0.1

- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
Expand All @@ -44,10 +52,34 @@ jobs:
run: ./gradlew build

- name: Upload to repository
uses: nick-fields/retry@v3
if: ${{ inputs.shouldUpload }}
run: ./gradlew publish
with:
max_attempts: 3
timeout_minutes: 10
retry_on: error
command: ./gradlew publish
env:
USER: ${{ secrets.USER }}
PASSWORD: ${{ secrets.PASSWORD }}
SIGNING_KEY: ${{ secrets.PGP_SECRET }}
SIGNING_PASSWORD: ${{ secrets.PGP_PASSPHRASE }}
SIGNING_PASSWORD: ${{ secrets.PGP_PASSPHRASE }}

- name: Create Git tag
uses: actions/github-script@v7
if: ${{ inputs.isRelease }}
with:
script: |
const versionOutputs = ${{ toJSON(steps.version.outputs) }};

var version = versionOutputs.value;

console.log("Version: " + version);

var ref = "refs/tags/" + version
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: ref,
sha: context.sha
});
24 changes: 24 additions & 0 deletions .run/core-run-desktop.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="core-run-desktop" type="GradleRunConfiguration" factoryName="Gradle" folderName="examples">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="core-run-desktop" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/core-run-teavm.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="core-run-teavm" type="GradleRunConfiguration" factoryName="Gradle" folderName="examples">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="core-run-teavm" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/gdx-tests-build.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="gdx-tests-build" type="GradleRunConfiguration" factoryName="Gradle" folderName="gdx-tests">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/examples/gdx-tests/teavm" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="gdx-tests-build" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/gdx-tests-run-desktop.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="gdx-tests-run-desktop" type="GradleRunConfiguration" factoryName="Gradle" folderName="gdx-tests">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="gdx-tests-run-desktop" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/gdx-tests-run-teavm.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="gdx-tests-run-teavm" type="GradleRunConfiguration" factoryName="Gradle" folderName="gdx-tests">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="gdx-tests-run-teavm" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
13 changes: 12 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
[1.0.0-SNAPSHOT]
[-SNAPSHOT]

[1.0.0]
- Update teavm to 0.10.0
- Pixmap now use Gdx2DPixmap
- New Gdx.files.internal, classpath and local implementation. Local files uses IndexedDB.
- Call dispose when browser closes
- Improve clipboard text copy/paste.
- Change default sound/music api to howler.js
- add shouldEncodePreference config
- add localStoragePrefix config
- AssetManager can now download assets

[1.0.0-b9]
- add TeaClassFilter printAllowedClasses() and printExcludedClasses()
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
![Build](https://github.com/xpenatan/gdx-html5-tools/workflows/Build/badge.svg)
# gdx-teavm

[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/r/com.github.xpenatan.gdx-teavm/backend-teavm?nexusVersion=2&server=https%3A%2F%2Foss.sonatype.org&label=release)](https://repo.maven.apache.org/maven2/com/github/xpenatan/gdx-teavm/)
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/com.github.xpenatan.gdx-teavm/backend-teavm?server=https%3A%2F%2Foss.sonatype.org&label=snapshot)](https://oss.sonatype.org/content/repositories/snapshots/com/github/xpenatan/gdx-teavm/)
![Build](https://github.com/xpenatan/gdx-teavm/actions/workflows/release.yml/badge.svg)
![Build](https://github.com/xpenatan/gdx-teavm/actions/workflows/snapshot.yml/badge.svg)
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/releases/com.github.xpenatan.gdx-teavm/backend-teavm?nexusVersion=2&server=https%3A%2F%2Foss.sonatype.org&label=release)](https://repo.maven.apache.org/maven2/com/github/xpenatan/gdx-teavm/)
[![Static Badge](https://img.shields.io/badge/snapshot---SNAPSHOT-red)](https://oss.sonatype.org/content/repositories/snapshots/com/github/xpenatan/gdx-teavm/)

gdx-teavm is a backend solution for running [libgdx](https://github.com/libgdx/libgdx) games in a web browser. It uses [TeaVM](https://github.com/konsoletyper/teavm) behind the scene to convert Java/Kotlin bytecode to Javascript.

Expand All @@ -12,7 +14,7 @@ Note:
* Box2d, Bullet, ImGui, PhysX and Freetype libraries use [emscripten](https://emscripten.org/) and [jParser](https://github.com/xpenatan/jParser) to convert C++ to Javascript/WebAssembly.

## TeaVM Examples:
* [gdx-tests](https://xpenatan.github.io/gdx-teavm/teavm/gdx-tests/)
* [gdx-tests](https://xpenatan.github.io/gdx-teavm/teavm/gdx-tests/) (Updated 07/09/2024)
* [demo-cubocy](https://xpenatan.github.io/gdx-teavm/teavm/demo-cubocy/)
* [demo-superjumper](https://xpenatan.github.io/gdx-teavm/teavm/demo-superjumper/)
* [test-freetype](https://xpenatan.github.io/gdx-teavm/teavm/test-freetype-packtest/)
Expand Down
3 changes: 3 additions & 0 deletions backends/backend-teavm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ compileJavaTask.mustRunAfter("clean")
dependencies {
implementation("org.reflections:reflections:${LibExt.reflectionVersion}")
implementation("com.badlogicgames.gdx:gdx:${LibExt.gdxVersion}")
api(project(":extensions:asset-loader"))

api("org.teavm:teavm-tooling:${LibExt.teaVMVersion}")
api("org.teavm:teavm-core:${LibExt.teaVMVersion}")
api("org.teavm:teavm-classlib:${LibExt.teaVMVersion}")
api("org.teavm:teavm-jso:${LibExt.teaVMVersion}")
api("org.teavm:teavm-jso-apis:${LibExt.teaVMVersion}")
api("org.teavm:teavm-jso-impl:${LibExt.teaVMVersion}")

testImplementation("com.google.truth:truth:${LibExt.truthVersion}")
}

publishing {
Expand Down
Loading