diff --git a/android/build.gradle b/android/build.gradle index dd5cd98c34..c215486765 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -41,9 +41,6 @@ android{ assets.srcDirs = ['assets', 'src/main/assets', '../core/assets/'] jniLibs.srcDirs = ['libs'] } - gp{ - java.srcDirs = ['srcgp'] - } androidTest.setRoot('tests') } @@ -95,17 +92,6 @@ android{ } } - buildTypes{ - all{ - minifyEnabled = true - shrinkResources = true - //this is the ONLY WAY I could find to force r8 to keep its filthy hands off of my default interfaces. - //may have undesirable side effects - debuggable = true - proguardFiles("proguard-rules.pro") - } - } - if(project.hasProperty("RELEASE_STORE_FILE") || System.getenv("CI") == "true"){ buildTypes{ release{ @@ -113,18 +99,6 @@ android{ } } } - - // Specifies one flavor dimension. - flavorDimensions "version" - productFlavors{ - standard{ - - } - gp{ - applicationIdSuffix ".gp" - versionNameSuffix "-gp" - } - } } dependencies{ @@ -136,9 +110,6 @@ dependencies{ natives "com.github.Anuken.Arc:natives-android:${getArcHash()}" natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}" - gpImplementation "com.google.android.gms:play-services-games:21.0.0" - gpImplementation "com.google.android.gms:play-services-auth:19.0.0" - //TODO dynamically find best android platform jar instead of hard-coding to 30 def sdkFile = new File((String)findSdkDir(), "/platforms/android-30/android.jar") if(sdkFile.exists()) compileOnly files(sdkFile.absolutePath) diff --git a/android/src/mindustry/android/AndroidLauncher.java b/android/src/mindustry/android/AndroidLauncher.java index b3ed4b782d..da3944fe06 100644 --- a/android/src/mindustry/android/AndroidLauncher.java +++ b/android/src/mindustry/android/AndroidLauncher.java @@ -33,9 +33,6 @@ public class AndroidLauncher extends AndroidApplication{ FileChooser chooser; Runnable permCallback; - Object gpService; - Class serviceClass; - @Override protected void onCreate(Bundle savedInstanceState){ UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler(); @@ -243,24 +240,6 @@ public class AndroidLauncher extends AndroidApplication{ } } - @Override - public void onResume(){ - super.onResume(); - - //TODO enable once GPGS is set up on the GP console - if(false && getPackageName().endsWith(".gp")){ - try{ - if(gpService == null){ - serviceClass = Class.forName("mindustry.android.GPGameService"); - gpService = serviceClass.getConstructor().newInstance(); - } - serviceClass.getMethod("onResume", Context.class).invoke(gpService, this); - }catch(Exception e){ - Log.err("Failed to update Google Play Services", e); - } - } - } - private void checkFiles(Intent intent){ try{ Uri uri = intent.getData(); diff --git a/android/srcgp/mindustry/android/GPGameService.java b/android/srcgp/mindustry/android/GPGameService.java deleted file mode 100644 index 9a64b6f3d4..0000000000 --- a/android/srcgp/mindustry/android/GPGameService.java +++ /dev/null @@ -1,40 +0,0 @@ -package mindustry.android; - -import android.content.*; -import arc.util.*; -import com.google.android.gms.auth.api.signin.*; -import com.google.android.gms.games.*; -import mindustry.service.*; - -public class GPGameService extends GameService{ - private GoogleSignInAccount account; - - public void onResume(Context context){ - Log.info("[GooglePlayService] Resuming."); - - GoogleSignInAccount current = GoogleSignIn.getLastSignedInAccount(context); - - GoogleSignInOptions options = - new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN) - .requestScopes(Games.SCOPE_GAMES_SNAPSHOTS) - .build(); - - if(GoogleSignIn.hasPermissions(current, options.getScopeArray())){ - this.account = current; - Log.info("Already signed in to Google Play Games."); - }else{ - GoogleSignIn.getClient(context, options).silentSignIn().addOnCompleteListener(complete -> { - if(!complete.isSuccessful()){ - if(complete.getException() != null){ - Log.err("Failed to sign in to Google Play Games.", complete.getException()); - }else{ - Log.warn("Failed to sign in to Google Play Games."); - } - }else{ - this.account = complete.getResult(); - Log.info("Signed in to Google Play Games."); - } - }); - } - } -} diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index c86ebee88d..ec33b51bf8 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -31,7 +31,7 @@ public class Rules{ public boolean pvp; /** Whether to pause the wave timer until all enemies are destroyed. */ public boolean waitEnemies = false; - /** Determinates if gamemode is attack mode. */ + /** Determines if gamemode is attack mode. */ public boolean attackMode = false; /** Whether this is the editor gamemode. */ public boolean editor = false;