Skip to content

Commit

Permalink
Merge pull request #99 from xpenatan/master
Browse files Browse the repository at this point in the history
Release v1.0.0-b5
  • Loading branch information
xpenatan authored May 14, 2023
2 parents a584fc1 + 6926b01 commit c78498a
Show file tree
Hide file tree
Showing 100 changed files with 10,691 additions and 1,316 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* text eol=lf
* text=auto eol=lf

# Binary files.
*.png binary
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/build_and_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and Upload

on:
workflow_call:
inputs:
isRelease:
required: true
type: boolean
shouldUpload:
required: true
type: boolean

env:
RELEASE: ${{ inputs.isRelease }}

jobs:
build_linux:
name: Build Linux
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

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

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- name: Check Ant
run: ant -version
- name: Set up MinGW
run: |
sudo apt install -y --force-yes mingw-w64 lib32z1
- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Generate Native Project
run: ./gradlew generateNativeProject

- name: Build
run: ./gradlew build

- name: Upload to repository
if: ${{ inputs.shouldUpload }}
run: ./gradlew publish
env:
USER: ${{ secrets.USER }}
PASSWORD: ${{ secrets.PASSWORD }}
SIGNING_KEY: ${{ secrets.PGP_SECRET }}
SIGNING_PASSWORD: ${{ secrets.PGP_PASSPHRASE }}
15 changes: 15 additions & 0 deletions .github/workflows/dispatch_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Dispatch Build

on:
workflow_dispatch:
inputs:
isRelease:
required: true
type: boolean
jobs:
build-and-upload:
uses: ./.github/workflows/build_and_upload.yml
with:
isRelease: ${{ inputs.isRelease }}
shouldUpload: true
secrets: inherit
40 changes: 6 additions & 34 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,10 @@ on:
- 'master'
- 'release'

env:
RELEASE: false

jobs:
pull_request:
name: Pull Request
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

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

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 11

- name: Check Ant
run: ant -version
- name: Set up MinGW
run: |
sudo apt install -y --force-yes mingw-w64 lib32z1
- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Generate Native Project
run: ./gradlew generateNativeProject

- name: Build
run: ./gradlew build
build-and-upload:
uses: ./.github/workflows/build_and_upload.yml
with:
isRelease: false
shouldUpload: false
secrets: inherit
42 changes: 6 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,10 @@ on:
branches:
- 'release'

env:
RELEASE: true

jobs:
build_Linux:
name: Build Windows/Linux
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 11

- name: Check Ant
run: ant -version

- name: Set up MinGW
run: |
sudo apt install -y --force-yes mingw-w64 lib32z1
- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Generate Native Project
run: ./gradlew generateNativeProject

- name: Upload to repository
run: ./gradlew publish
env:
USER: ${{ secrets.USER }}
PASSWORD: ${{ secrets.PASSWORD }}
signingKey: ${{ secrets.PGP_SECRET }}
signingPassword: ${{ secrets.PGP_PASSPHRASE }}
build-and-upload:
uses: ./.github/workflows/build_and_upload.yml
with:
isRelease: true
shouldUpload: true
secrets: inherit
42 changes: 6 additions & 36 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,10 @@ on:
branches:
- 'master'

env:
RELEASE: false

jobs:
build_Linux:
name: Build Windows/Linux
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 11

- name: Check Ant
run: ant -version

- name: Set up MinGW
run: |
sudo apt install -y --force-yes mingw-w64 lib32z1
- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Generate Native Project
run: ./gradlew generateNativeProject

- name: Upload to repository
run: ./gradlew publish
env:
USER: ${{ secrets.USER }}
PASSWORD: ${{ secrets.PASSWORD }}
signingKey: ${{ secrets.PGP_SECRET }}
signingPassword: ${{ secrets.PGP_PASSPHRASE }}
build-and-upload:
uses: ./.github/workflows/build_and_upload.yml
with:
isRelease: false
shouldUpload: true
secrets: inherit
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
[1.0.0-SNAPSHOT]
-

[1.0.0-b5]
- Option in App config to show download logs. Default is set to false.
- Implement setApplicationLogger method.
- Rename bullet desktop lib from platform to desktop.
- Add file drag & drop using TeaWindowListener in App config.
- Add WIP Gdx2DPixmap. Can toggle in App config.
- Update teavm to 0.9.0-dev-4
- Add userAgent system property
- Add Storage prefix #94

[1.0.0-b4]
- Fix an issue with TeaClassloader that was giving annotation error when building artemis games
Expand Down
97 changes: 10 additions & 87 deletions backends/backend-teavm/build.gradle
Original file line number Diff line number Diff line change
@@ -1,109 +1,32 @@
plugins {
id 'java'
id 'java-library'
id 'signing'
}

group = project.groupId
version = project.gdxTeaVMVersion

def module_name = "backend-teavm"

sourceSets.main.java.srcDirs = [ "emu", "src/main/java/"]
sourceSets.main.resources.srcDirs = ["src/main/resources/"]

configurations {
includeDep
api.extendsFrom includeDep
}

dependencies {
includeDep "org.reflections:reflections:$project.reflectionVersion"
implementation "org.reflections:reflections:$project.reflectionVersion"
implementation "com.badlogicgames.gdx:gdx:$project.gdxVersion"

includeDep "org.teavm:teavm-tooling:$project.teaVMVersion"
includeDep "org.teavm:teavm-core:$project.teaVMVersion"
includeDep "org.teavm:teavm-classlib:$project.teaVMVersion"
includeDep "org.teavm:teavm-jso:$project.teaVMVersion"
includeDep "org.teavm:teavm-jso-apis:$project.teaVMVersion"
includeDep "org.teavm:teavm-jso-impl:$project.teaVMVersion"
}

task fromClasses(type: Jar) {
from(sourceSets.main.output) {
}
}

task javadocJar(type: Jar) {
archiveClassifier.set("javadoc")
from javadoc
}

task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}

javadoc {
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:none', '-quiet')
}

artifacts {
archives javadocJar, sourcesJar
api "org.teavm:teavm-tooling:$project.teaVMVersion"
api "org.teavm:teavm-core:$project.teaVMVersion"
api "org.teavm:teavm-classlib:$project.teaVMVersion"
api "org.teavm:teavm-jso:$project.teaVMVersion"
api "org.teavm:teavm-jso-apis:$project.teaVMVersion"
api "org.teavm:teavm-jso-impl:$project.teaVMVersion"
}

publishing {
publications {
maven(MavenPublication) {
version project.gdxTeaVMVersion
project.version = project.gdxTeaVMVersion
artifactId module_name
artifact fromClasses
artifact javadocJar
artifact sourcesJar

pom {
name = "Gdx-teaVM"
description = "Tool to generate libgdx to javascript using teaVM"
url = "https://github.com/xpenatan/gdx-teavm"
developers {
developer {
id = "Xpe"
name = "Natan"
}
}
scm {
connection = "scm:git:git://https://github.com/xpenatan/gdx-teavm.git"
developerConnection = "scm:git:ssh://https://github.com/xpenatan/gdx-teavm.git"
url = "http://https://github.com/xpenatan/gdx-teavm/tree/master"
}
licenses {
license {
name = "The Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
withXml {
def dependencies = asNode().appendNode('dependencies')
configurations.includeDep.allDependencies.each {
def dependencyNode = dependencies.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
artifactId = module_name
from components.java
}
}
}

signing {
def ver = project.version.toString()
def isSnapshot = ver.toUpperCase().contains("SNAPSHOT")
if(!isSnapshot) {
def signingKey = System.getenv("signingKey")
def signingPassword = System.getenv("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}

This file was deleted.

10 changes: 10 additions & 0 deletions backends/backend-teavm/emu/com/artemis/utils/reflect/FieldEmu.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.artemis.utils.reflect;

import com.github.xpenatan.gdx.backends.teavm.gen.Emulate;

@Emulate(valueStr = "com.artemis.utils.reflect.Field")
public final class FieldEmu extends FieldGen {
public FieldEmu(java.lang.reflect.Field field) {
super(field);
}
}
Loading

0 comments on commit c78498a

Please sign in to comment.