Skip to content

Commit

Permalink
Merge pull request #121 from xpenatan/master
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
xpenatan authored Jul 9, 2024
2 parents 6edbaa3 + 5f78f2a commit 41943bb
Show file tree
Hide file tree
Showing 168 changed files with 6,521 additions and 8,883 deletions.
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

0 comments on commit 41943bb

Please sign in to comment.