apply plugin: 'com.android.application'
android {
- compileSdkVersion 29
+ compileSdkVersion 30
buildToolsVersion '30.0.3'
ndkVersion "$ndk_version"
defaultConfig {
applicationId 'net.minetest.minetest'
minSdkVersion 16
- targetSdkVersion 29
+ targetSdkVersion 30
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionCode project.versionCode
}
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:maxAspectRatio="3.0"
android:screenOrientation="sensorLandscape"
- android:theme="@style/AppTheme">
+ android:theme="@style/AppTheme"
+ android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
android:launchMode="singleTask"
android:maxAspectRatio="3.0"
android:screenOrientation="sensorLandscape"
- android:theme="@style/AppTheme">
+ android:theme="@style/AppTheme"
+ android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
mTextView = findViewById(R.id.textView);
sharedPreferences = getSharedPreferences(SETTINGS, Context.MODE_PRIVATE);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
+ Build.VERSION.SDK_INT < Build.VERSION_CODES.R)
checkPermission();
else
checkAppVersion();
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes;
import java.io.File;
* Migrates user data from deprecated external storage to app scoped storage
*/
private void migrate(Notification.Builder notificationBuilder, File newLocation) throws IOException {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
+ return;
+ }
+
File oldLocation = new File(Environment.getExternalStorageDirectory(), "Minetest");
if (!oldLocation.isDirectory())
return;
apply plugin: 'de.undercouch.download'
android {
- compileSdkVersion 29
+ compileSdkVersion 30
buildToolsVersion '30.0.3'
ndkVersion "$ndk_version"
defaultConfig {
minSdkVersion 16
- targetSdkVersion 29
+ targetSdkVersion 30
externalNativeBuild {
ndkBuild {
arguments '-j' + Runtime.getRuntime().availableProcessors(),