Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 4 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
## Gradle:
.gradle/
gradle-app.setting
/build/
/funkin/build/
/flixelgdx/build/
/polyverse/build/
/android/build/
/lwjgl3/build/
/html/build/
/teavm/build/
/ios/build/
/ios-moe/build/
/headless/build/
/server/build/
/shared/build/
**/build/
**/nbbuild/
**/dist/
**/nbdist/

## Java:
*.class
Expand Down
27 changes: 9 additions & 18 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,21 @@ android {
}
}

repositories {
// needed for AAPT2, may be needed for other tools
google()
}

configurations { natives }

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
implementation project(':polyverse')
implementation project(':flixelgdx:android')
}

api "games.rednblack.miniaudio:gdx-miniaudio-platform:$miniaudioVersion:natives-armeabi-v7a"
api "games.rednblack.miniaudio:gdx-miniaudio-platform:$miniaudioVersion:natives-arm64-v8a"
api "games.rednblack.miniaudio:gdx-miniaudio-platform:$miniaudioVersion:natives-x86"
api "games.rednblack.miniaudio:gdx-miniaudio-platform:$miniaudioVersion:natives-x86_64"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
configurations {
coreLibraryDesugaring
}

repositories {
// needed for AAPT2, may be needed for other tools
google()
}

// Called every time gradle gets executed, takes the native dependencies of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ protected void onCreate(Bundle savedInstanceState) {
PolyverseConstants.WINDOW_TITLE,
PolyverseConstants.WINDOW_WIDTH,
PolyverseConstants.WINDOW_HEIGHT,
new InitState()
new InitState(),
PolyverseConstants.FRAMERATE,
PolyverseConstants.VSYNC,
PolyverseConstants.FULLSCREEN
);
AndroidApplicationConfiguration configuration = new AndroidApplicationConfiguration();
configuration.useImmersiveMode = true; // Recommended, but not required.
Expand Down
4 changes: 2 additions & 2 deletions assets/another_test.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.Input
import me.stringdotjar.flixelgdx.Flixel
import me.stringdotjar.flixelgdx.backend.FlixelPaths
import me.stringdotjar.flixelgdx.util.FlixelPathsUtil
import me.stringdotjar.flixelgdx.graphics.sprite.FlixelSprite
import me.stringdotjar.polyverse.util.PolyverseConstants
import me.stringdotjar.polyverse.script.type.Script
Expand All @@ -26,7 +26,7 @@ class AnotherTestClass extends Script {
super.onUpdate(delta)

if (Gdx.input.isKeyJustPressed(Input.Keys.SPACE)) {
var sprite = new FlixelSprite().loadGraphic(FlixelPaths.sharedImageAsset("pauseAlt/bfLol"))
var sprite = new FlixelSprite().loadGraphic(FlixelPathsUtil.sharedImageAsset("pauseAlt/bfLol"))
var randomPosX = new Random().nextInt(PolyverseConstants.WINDOW_WIDTH)
var randomPosY = new Random().nextInt(PolyverseConstants.WINDOW_HEIGHT)

Expand Down
4 changes: 2 additions & 2 deletions assets/test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import com.badlogic.gdx.Input
import com.badlogic.gdx.graphics.Color
import me.stringdotjar.flixelgdx.Flixel
import me.stringdotjar.flixelgdx.graphics.FlixelState
import me.stringdotjar.flixelgdx.backend.FlixelPaths
import me.stringdotjar.flixelgdx.util.FlixelPathsUtil
import me.stringdotjar.flixelgdx.graphics.sprite.FlixelSprite
import me.stringdotjar.polyverse.script.type.SystemScript

Expand Down Expand Up @@ -55,7 +55,7 @@ class TestState extends FlixelState {

// test.changeX(-30)

test = new FlixelSprite().loadGraphic(FlixelPaths.sharedImageAsset('NOTE_hold_assets'))
test = new FlixelSprite().loadGraphic(FlixelPathsUtil.sharedImageAsset('NOTE_hold_assets'))
add(test)
}

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ allprojects {
}
}

configure(subprojects - project(':android')) {
configure(subprojects.findAll { !it.path.contains('android') }) {
apply plugin: 'java-library'
sourceCompatibility = 17

Expand Down
48 changes: 48 additions & 0 deletions flixelgdx/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
eclipse.project.name = appName + '-flixelgdx-android'

apply plugin: 'com.android.library'

android {
namespace "me.stringdotjar.flixelgdx"
compileSdk 36

defaultConfig {
multiDexEnabled = true
minSdkVersion 34
targetSdkVersion 35
}
compileOptions {
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

repositories {
// needed for AAPT2, may be needed for other tools
google()
}

configurations {
coreLibraryDesugaring
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'

api project(":flixelgdx:core")
api "androidx.multidex:multidex:2.0.1"
api "games.rednblack.miniaudio:gdx-miniaudio-platform:$miniaudioVersion:natives-armeabi-v7a"
api "games.rednblack.miniaudio:gdx-miniaudio-platform:$miniaudioVersion:natives-arm64-v8a"
api "games.rednblack.miniaudio:gdx-miniaudio-platform:$miniaudioVersion:natives-x86"
api "games.rednblack.miniaudio:gdx-miniaudio-platform:$miniaudioVersion:natives-x86_64"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package me.stringdotjar.flixelgdx.backend.android;

import me.stringdotjar.flixelgdx.FlixelGame;

/**
* Launches the Android version of a FlixelGDX game.
*/
public class FlixelAndroidLauncher {

/**
* Launches the Android version of the game with the given game instance.
*
* <p>This should be called from the onCreate method of the Android launcher class, and the
* game instance should be created in the same general area.
*
* @param game The game instance to launch. This should already be initialized with the desired configuration values.
*/
public static void launch (FlixelGame game) {}
}
28 changes: 14 additions & 14 deletions flixelgdx/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
eclipse.project.name = appName + '-flixelgdx'
subprojects {

dependencies {
api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.github.tommyettinger:anim8-gdx:$anim8Version"
api "com.github.tommyettinger:libgdx-utils:$utilsVersion"
api "io.github.libktx:ktx-freetype:$ktxVersion"
api "games.rednblack.miniaudio:miniaudio:$miniaudioVersion"
api "org.fusesource.jansi:jansi:$jansiVersion"
group = 'me.stringdotjar.flixelgdx'
version = '1.0.0'

implementation "org.jetbrains:annotations:26.0.2-1"

if (enableGraalNative == 'true') {
implementation "io.github.berstanio:gdx-svmhelper-annotations:$graalHelperVersion"
// Force Java 17 for the entire framework.
if (!project.path.contains('android')) {
plugins.withType(JavaPlugin).tap {
configureEach {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
}
}
}
}
24 changes: 24 additions & 0 deletions flixelgdx/core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
eclipse.project.name = appName + '-flixelgdx-core'

apply plugin: "java-library"

java {
sourceCompatibility = 17
targetCompatibility = 17
}

dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
api "com.github.tommyettinger:anim8-gdx:$anim8Version"
api "com.github.tommyettinger:libgdx-utils:$utilsVersion"
api "games.rednblack.miniaudio:miniaudio:$miniaudioVersion"
api "org.fusesource.jansi:jansi:$jansiVersion"

implementation "org.jetbrains:annotations:26.1.0"

if (enableGraalNative == 'true') {
implementation "io.github.berstanio:gdx-svmhelper-annotations:$graalHelperVersion"
}
}
Loading