From bba289627c97133e4208a4af019184062deae913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A4in=C3=B6=20M=C3=A4kel=C3=A4?= Date: Fri, 8 May 2020 08:05:26 +0300 Subject: [PATCH] Remove gdx-box2d from build files because it isn't used (#2595) * Remove box2d from build files because it isn't used * Remove some unused includes to make the build work --- android/proguard-rules.pro | 11 ----------- build.gradle | 10 ---------- core/src/com/unciv/logic/GameStarter.kt | 1 - core/src/com/unciv/ui/utils/ImageGetter.kt | 1 - 4 files changed, 23 deletions(-) diff --git a/android/proguard-rules.pro b/android/proguard-rules.pro index 3f3ade7e..1dfea15e 100644 --- a/android/proguard-rules.pro +++ b/android/proguard-rules.pro @@ -24,7 +24,6 @@ -dontwarn android.support.** -dontwarn com.badlogic.gdx.backends.android.AndroidFragmentApplication -dontwarn com.badlogic.gdx.utils.GdxBuild --dontwarn com.badlogic.gdx.physics.box2d.utils.Box2DBuild -dontwarn com.badlogic.gdx.jnigen.BuildTarget* -keep class com.badlogic.gdx.controllers.android.AndroidControllers @@ -32,13 +31,3 @@ -keepclassmembers class com.badlogic.gdx.backends.android.AndroidInput* { (com.badlogic.gdx.Application, android.content.Context, java.lang.Object, com.badlogic.gdx.backends.android.AndroidApplicationConfiguration); } - --keepclassmembers class com.badlogic.gdx.physics.box2d.World { - boolean contactFilter(long, long); - void beginContact(long); - void endContact(long); - void preSolve(long, long); - void postSolve(long, long); - boolean reportFixture(long); - float reportRayFixture(long, float, float, float, float, float); -} diff --git a/build.gradle b/build.gradle index 4403cae3..e170e0e7 100644 --- a/build.gradle +++ b/build.gradle @@ -38,7 +38,6 @@ allprojects { gdxVersion = '1.9.10' roboVMVersion = '2.3.1' - box2DLightsVersion = '1.4' ashleyVersion = '1.7.0' aiVersion = '1.8.0' } @@ -66,7 +65,6 @@ project(":desktop") { implementation project(":core") implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" - implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" implementation "com.badlogicgames.gdx:gdx-tools:$gdxVersion" // This is for the TexturePacker class implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" // This iss so the JAR works with Kotlin @@ -92,12 +90,6 @@ project(":android") { natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64" - implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" - natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi" - natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a" - natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a" - natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86" - natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64" } } @@ -112,7 +104,6 @@ project(":ios") { implementation "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion" implementation "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" - implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios" } } @@ -122,7 +113,6 @@ project(":core") { dependencies { implementation "com.badlogicgames.gdx:gdx:$gdxVersion" - implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" } diff --git a/core/src/com/unciv/logic/GameStarter.kt b/core/src/com/unciv/logic/GameStarter.kt index 7242ac25..4f5a36e5 100644 --- a/core/src/com/unciv/logic/GameStarter.kt +++ b/core/src/com/unciv/logic/GameStarter.kt @@ -1,7 +1,6 @@ package com.unciv.logic import com.badlogic.gdx.math.Vector2 -import com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const import com.unciv.Constants import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.map.* diff --git a/core/src/com/unciv/ui/utils/ImageGetter.kt b/core/src/com/unciv/ui/utils/ImageGetter.kt index d93b3c12..41815e65 100644 --- a/core/src/com/unciv/ui/utils/ImageGetter.kt +++ b/core/src/com/unciv/ui/utils/ImageGetter.kt @@ -12,7 +12,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.utils.Drawable import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable import com.badlogic.gdx.utils.Align -import com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const import com.unciv.Constants import com.unciv.models.ruleset.Nation import com.unciv.models.ruleset.Ruleset