DEADSOFTWARE

Upgrade project
authorfredboy <fredboy@protonmail.com>
Sun, 14 Apr 2024 17:01:12 +0000 (00:01 +0700)
committerfredboy <fredboy@protonmail.com>
Sun, 14 Apr 2024 17:01:12 +0000 (00:01 +0700)
android/AndroidManifest.xml
android/build.gradle
android/src/ru/deadsoftware/cavedroid/AndroidLauncher.java
build.gradle
core/build.gradle
core/src/ru/deadsoftware/cavedroid/misc/Renderer.java
desktop/build.gradle
desktop/gradle/wrapper/gradle-wrapper.properties [new file with mode: 0644]
desktop/src/ru/deadsoftware/cavedroid/desktop/DesktopLauncher.java
gradle.properties
gradle/wrapper/gradle-wrapper.properties

index 47eaf7a1afc8266caabc5563a9b7a645e66a9216..233083d5d18a72f75ffaebfe73d5aad89ba145ff 100644 (file)
@@ -9,6 +9,7 @@
             android:theme="@style/GdxTheme" tools:ignore="GoogleAppIndexingWarning"
             android:fullBackupContent="@xml/backup_descriptor">
         <activity
+                android:exported="true"
                 android:name="ru.deadsoftware.cavedroid.AndroidLauncher"
                 android:label="@string/app_name"
                 android:screenOrientation="sensorLandscape"
index a5ed087df1b3458384d90a0ddf8b1bccd50ba73f..cb9d71a9ebe98b510585ad2b6d54271d92d7ccbc 100644 (file)
@@ -1,6 +1,10 @@
+plugins {
+    id "kotlin-android"
+}
+
 android {
-    buildToolsVersion "28.0.3"
-    compileSdkVersion 29
+    namespace "ru.deadsoftware.cavedroid"
+    compileSdkVersion 34
     sourceSets {
         main {
             manifest.srcFile 'AndroidManifest.xml'
@@ -16,8 +20,8 @@ android {
         }
     }
     compileOptions {
-        sourceCompatibility 1.8
-        targetCompatibility 1.8
+        sourceCompatibility 11
+        targetCompatibility 11
     }
     packagingOptions {
         exclude 'META-INF/robovm/ios/robovm.xml'
@@ -25,7 +29,7 @@ android {
     defaultConfig {
         applicationId "ru.deadsoftware.cavedroid"
         minSdkVersion 24
-        targetSdkVersion 29
+        targetSdkVersion 34
         versionCode 10
         versionName "alpha0.4"
     }
index fcf083199e0e667bb839c4e45a2c7fdfc22330a0..3019a9e767da7f04feae1aa5062aa0a3a2b2744b 100644 (file)
@@ -4,13 +4,13 @@ import android.content.pm.PackageManager;
 import android.os.Bundle;
 import com.badlogic.gdx.backends.android.AndroidApplication;
 import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
+import com.badlogic.gdx.backends.android.BuildConfig;
 
 public class AndroidLauncher extends AndroidApplication {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
-        config.hideStatusBar = true;
         config.useImmersiveMode = true;
         String gameFolder = "";
         try {
index 11e98376ca656b705d23b4870051fcb527e77ffe..684f01560565ca89fdba1fefd0101dcfb91a16b5 100644 (file)
@@ -9,7 +9,7 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:7.3.1'
+        classpath 'com.android.tools.build:gradle:8.2.2'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
     }
 }
@@ -19,7 +19,7 @@ allprojects {
     version = 'alpha0.4'
     ext {
         appName = "CaveDroid"
-        gdxVersion = '1.11.0'
+        gdxVersion = '1.12.0'
         guavaVersion = '28.1'
         daggerVersion = '2.40.1'
     }
@@ -30,6 +30,7 @@ allprojects {
         google()
         maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
         maven { url "https://oss.sonatype.org/content/repositories/releases/" }
+        maven { url "https://jitpack.io" }
     }
 }
 
@@ -38,7 +39,7 @@ project(":desktop") {
 
     dependencies {
         implementation project(":core")
-        api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
+        api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
         api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
     }
 }
@@ -51,7 +52,6 @@ project(":android") {
     dependencies {
         implementation project(":core")
         api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
-        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
         natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
         natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
         natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
index af764b0ba4b3910ad1d47869e3c5f080721f364e..2c25846e203fb3bf023292d8c2856f4c279c5ce6 100644 (file)
@@ -1,11 +1,11 @@
 plugins {
     id "org.jetbrains.kotlin.jvm"
-    id "java"
+    id "kotlin"
     id "idea"
 }
 
-sourceCompatibility = 1.8
+sourceCompatibility = 11
 
 sourceSets.main.java.srcDirs = [ "src/" ]
 
-java.targetCompatibility = JavaVersion.VERSION_1_8
\ No newline at end of file
+java.targetCompatibility = JavaVersion.VERSION_11
\ No newline at end of file
index a4b19ab9b847ed8027f21860c81c1bab5e85e993..290f7ce266539045df9cd352d76dac273719cfc2 100644 (file)
@@ -105,4 +105,8 @@ public abstract class Renderer implements InputProcessor {
         return false;
     }
 
+    @Override
+    public boolean touchCancelled(int i, int i1, int i2, int i3) {
+        return false;
+    }
 }
index b3a6693f285b98a686c56c8db34af36336b6be2c..88ef144f460626ead46e01f094e94219b2fd352a 100644 (file)
@@ -1,6 +1,6 @@
-apply plugin: "java"
+apply plugin: "kotlin"
 
-sourceCompatibility = 1.8
+sourceCompatibility = 11
 sourceSets.main.java.srcDirs = [ "src/" ]
 sourceSets.main.resources.srcDirs = ["../android/assets"]
 
@@ -34,6 +34,7 @@ task debug(dependsOn: classes, type: JavaExec) {
 }
 
 task dist(type: Jar) {
+    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
     manifest {
         attributes 'Main-Class': project.mainClassName
     }
diff --git a/desktop/gradle/wrapper/gradle-wrapper.properties b/desktop/gradle/wrapper/gradle-wrapper.properties
new file mode 100644 (file)
index 0000000..d884b3f
--- /dev/null
@@ -0,0 +1,6 @@
+#Sat Apr 13 17:22:59 NOVT 2024
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
index 2e9ae424749693629aa5adfa9acd0226b50b754f..62b554b3027671b4ba4aa46978a8d8ea15c4bf43 100644 (file)
@@ -1,25 +1,25 @@
 package ru.deadsoftware.cavedroid.desktop;
 
 import com.badlogic.gdx.Files;
-import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
-import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
+import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
+import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
 import ru.deadsoftware.cavedroid.CaveGame;
 
 class DesktopLauncher {
        public static void main (String[] arg) {
-               LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
-               config.addIcon("icons/icon256.png", Files.FileType.Internal);
-               config.addIcon("icons/icon128.png", Files.FileType.Internal);
-               config.foregroundFPS = 144;
-        config.title = "CaveDroid";
-               config.width = 960;
-               config.height = 540;
-               config.forceExit = false;
+               Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
+               config.setWindowIcon(Files.FileType.Internal, "icons/icon256.png", "icons/icon128.png");
+               config.setForegroundFPS(144);
+        config.setTitle("CaveDroid");
+               config.setWindowedMode(960, 540);
 
                boolean touch = false;
                for (String anArg : arg) {
-                       if (anArg.equals("--touch")) touch = true;
+            if (anArg.equals("--touch")) {
+                touch = true;
+                break;
+            }
                }
-        new LwjglApplication(new CaveGame(System.getProperty("user.home") + "/.cavedroid", touch), config);
+        new Lwjgl3Application(new CaveGame(System.getProperty("user.home") + "/.cavedroid", touch), config);
        }
 }
index 339fa1508b04d641faacd40a6958049724bbdf76..b7f66d430f6f4d25e3db7900a59a42c0962076ff 100644 (file)
@@ -1,3 +1,4 @@
 org.gradle.daemon=true
 org.gradle.jvmargs=-Xms128m -Xmx1500m
 org.gradle.configureondemand=true
+android.useAndroidX=true
index 074840a77c7b4f26dab9d75901819ee4850704af..b3497272b316d215d0731d4299d41673c6d1621f 100644 (file)
@@ -1,6 +1,6 @@
 #Thu Sep 26 22:30:23 NOVT 2019
 distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
 distributionPath=wrapper/dists
 zipStorePath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME