-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
559 additions
and
1,641 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
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
plugins { | ||
id("java-library") | ||
} | ||
|
||
val moduleName = "backend-teavm" | ||
|
||
sourceSets["main"].java.setSrcDirs(mutableSetOf("emu", "src/main/java/")) | ||
|
||
dependencies { | ||
implementation("org.reflections:reflections:${LibExt.reflectionVersion}") | ||
implementation("com.badlogicgames.gdx:gdx:${LibExt.gdxVersion}") | ||
|
||
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}") | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
artifactId = moduleName | ||
from(components["java"]) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
dependencies { | ||
implementation("com.badlogicgames.gdx:gdx:${LibExt.gdxVersion}") | ||
implementation("com.badlogicgames.gdx:gdx-box2d:${LibExt.gdxVersion}") | ||
} |
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
import java.io.File | ||
|
||
val mainClassName = "com.github.xpenatan.gdx.examples.box2d.Main" | ||
val assetsDir = File("../desktop/assets"); | ||
|
||
dependencies { | ||
implementation(project(":examples:box2d:core")) | ||
implementation("com.badlogicgames.gdx:gdx-platform:${LibExt.gdxVersion}:natives-desktop") | ||
implementation("com.badlogicgames.gdx:gdx-backend-lwjgl:${LibExt.gdxVersion}") | ||
implementation("com.badlogicgames.gdx:gdx-box2d-platform:${LibExt.gdxVersion}:natives-desktop") | ||
} | ||
|
||
tasks.register<JavaExec>("runBox2DDesktop") { | ||
dependsOn("classes") | ||
group = "examples-desktop" | ||
description = "Run Box2D example" | ||
mainClass.set(mainClassName) | ||
classpath = sourceSets["main"].runtimeClasspath | ||
|
||
if (org.gradle.internal.os.OperatingSystem.current() == org.gradle.internal.os.OperatingSystem.MAC_OS) { | ||
// Required to run on macOS | ||
jvmArgs?.add("-XstartOnFirstThread") | ||
} | ||
} | ||
|
||
//tasks.register('dist', Jar) { | ||
// manifest { | ||
// attributes 'Main-Class': project.mainClassName | ||
// } | ||
// dependsOn configurations.runtimeClasspath | ||
// from { | ||
// configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } | ||
// } | ||
// with jar | ||
//} |
This file was deleted.
Oops, something went wrong.
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,44 @@ | ||
plugins { | ||
id("org.gretty") version("3.1.0") | ||
} | ||
|
||
gretty { | ||
contextPath = "/" | ||
extraResourceBase("build/dist/webapp") | ||
} | ||
|
||
val mainClassName = "com.github.xpenatan.gdx.examples.box2d.Build" | ||
|
||
dependencies { | ||
implementation(project(":examples:box2d:core")) | ||
implementation("com.badlogicgames.gdx:gdx:${LibExt.gdxVersion}") | ||
|
||
// Use snapshots | ||
// implementation("com.github.xpenatan.gdx-teavm:backend-teavm:1.0.0-SNAPSHOT") | ||
// implementation("com.github.xpenatan.gdx-teavm:gdx-box2d-teavm:1.0.0-SNAPSHOT") | ||
|
||
// Or source projects | ||
implementation(project(":backends:backend-teavm")) | ||
implementation(project(":extensions:gdx-box2d:gdx-box2d-teavm")) | ||
} | ||
|
||
tasks.register<JavaExec>("buildExampleBox2D") { | ||
dependsOn("classes") | ||
group = "teavm" | ||
description = "Build Box2D example" | ||
mainClass.set(mainClassName) | ||
classpath = sourceSets["main"].runtimeClasspath | ||
} | ||
|
||
tasks.register("runBox2D") { | ||
group = "examples-teavm" | ||
description = "Run Box2D example" | ||
val list = arrayOf( | ||
"clean", | ||
"buildExampleBox2D", | ||
"jettyRun" | ||
) | ||
dependsOn(list) | ||
tasks.findByName("buildExampleBox2D")?.mustRunAfter("clean") | ||
tasks.findByName("jettyRun")?.mustRunAfter("buildExampleBox2D") | ||
} |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
dependencies { | ||
implementation("com.badlogicgames.gdx:gdx:${LibExt.gdxVersion}") | ||
|
||
implementation(project(":extensions:gdx-bullet:gdx-bullet")) | ||
} |
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
import java.io.File | ||
|
||
val mainClassName = "com.github.xpenatan.gdx.examples.bullet.Main" | ||
val assetsDir = File("/assets"); | ||
|
||
dependencies { | ||
implementation(project(":examples:bullet:core")) | ||
implementation("com.badlogicgames.gdx:gdx-platform:${LibExt.gdxVersion}:natives-desktop") | ||
implementation("com.badlogicgames.gdx:gdx-backend-lwjgl:${LibExt.gdxVersion}") | ||
|
||
// gdx-teavm Version | ||
implementation(project(":extensions:gdx-bullet:gdx-bullet-desktop")) | ||
} | ||
|
||
tasks.register<JavaExec>("runBulletDesktop") { | ||
dependsOn("classes") | ||
group = "examples-desktop" | ||
description = "Run bullet example" | ||
mainClass.set(mainClassName) | ||
classpath = sourceSets["main"].runtimeClasspath | ||
|
||
if (org.gradle.internal.os.OperatingSystem.current() == org.gradle.internal.os.OperatingSystem.MAC_OS) { | ||
// Required to run on macOS | ||
jvmArgs?.add("-XstartOnFirstThread") | ||
} | ||
} | ||
// | ||
//tasks.register('dist', Jar) { | ||
// manifest { | ||
// attributes 'Main-Class': project.mainClassName | ||
// } | ||
// dependsOn configurations.runtimeClasspath | ||
// from { | ||
// configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } | ||
// } | ||
// with jar | ||
//} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.