Working on Android build

This commit is contained in:
Vladislav Khorev committed 2026-07-18 17:46:05 +03:00
1 parent e773b51985
commit e5e3d7bb28
17 files changed
+93 -24

No files matched your search

+3 -2
View File
@@ -9,7 +9,7 @@ else {
android {
if (buildAsApplication) {
namespace "org.libsdl.app"
namespace "fishrungames.shadowoverbishkek"
}
compileSdkVersion 37
defaultConfig {
@@ -62,7 +62,7 @@ android {
libraryVariants.all { variant ->
variant.outputs.all { output ->
if (output.outputFileName != null && output.outputFileName.endsWith(".aar")) {
output.outputFileName = "org.libsdl.app.aar"
output.outputFileName = "fishrungames.shadowoverbishkek.aar"
}
}
}
@@ -70,5 +70,6 @@ android {
}
dependencies {
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
}
+6 -6
View File
@@ -16,18 +16,18 @@
# public *;
#}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLInputConnection {
-keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.SDLInputConnection {
void nativeCommitText(java.lang.String, int);
void nativeGenerateScancodeForUnichar(char);
}
-keep,includedescriptorclasses class org.libsdl.app.SDLActivity {
-keep,includedescriptorclasses class fishrungames.shadowoverbishkek.SDLActivity {
# for some reason these aren't compatible with allowoptimization modifier
boolean supportsRelativeMouse();
void setWindowStyle(boolean);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLActivity {
-keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.SDLActivity {
java.lang.String nativeGetHint(java.lang.String); # Java-side doesn't use this, so it gets minified, but C-side still tries to register it
boolean onNativeSoftReturnKey();
void onNativeKeyboardFocusLost();
@@ -62,7 +62,7 @@
boolean showTextInput(int, int, int, int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.HIDDeviceManager {
-keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.HIDDeviceManager {
boolean initialize(boolean, boolean);
boolean openDevice(int);
int sendOutputReport(int, byte[]);
@@ -71,7 +71,7 @@
void closeDevice(int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLAudioManager {
-keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.SDLAudioManager {
int[] getAudioOutputDevices();
int[] getAudioInputDevices();
int[] audioOpen(int, int, int, int, int);
@@ -90,7 +90,7 @@
native void addAudioDevice(boolean, int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
-keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.SDLControllerManager {
void pollInputDevices();
void pollHapticDevices();
void hapticRun(int, float, int);
@@ -52,7 +52,7 @@
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
<!-- Create a Java class extending SDLActivity and place it in a
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
directory under shadowoverbishkek/main/java matching the package, e.g. shadowoverbishkek/main/java/com/gamemaker/game/MyGame.java
then replace "SDLActivity" with the name of your class (e.g. "MyGame")
in the XML below.
@@ -62,14 +62,14 @@
<application android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="true"
android:theme="@style/AppTheme"
android:theme="@style/Theme.App.Starting"
android:hardwareAccelerated="true" >
<!-- Example of setting SDL hints from AndroidManifest.xml:
<meta-data android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK" android:value="0"/>
-->
<activity android:name="SDLActivity"
<activity android:name=".ShadowOverBishkekActivity"
android:label="@string/app_name"
android:alwaysRetainTaskState="true"
android:launchMode="singleInstance"
@@ -0,0 +1,14 @@
package fishrungames.shadowoverbishkek;
import android.os.Bundle;
import androidx.core.splashscreen.SplashScreen;
import org.libsdl.app.SDLActivity;
public class ShadowOverBishkekActivity extends SDLActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.installSplashScreen(this);
super.onCreate(savedInstanceState);
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">Тень над Бишкеком</string>
</resources>
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">Game</string>
<string name="app_name">Shadow Over Bishkek</string>
</resources>
@@ -4,4 +4,13 @@
<style name="AppTheme" parent="android:Theme.NoTitleBar.Fullscreen">
<!-- Customize your theme here. -->
</style>
<!-- Тема для Splash Screen -->
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<!-- Черный фон -->
<item name="windowSplashScreenBackground">#000000</item>
<!-- Ваша картинка 512x512 -->
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
<!-- Ссылка на основную тему, которая применится после загрузки -->
<item name="postSplashScreenTheme">@style/AppTheme</item>
</style>
</resources>