diff --git a/AndEngine/build.gradle b/AndEngine/build.gradle index e9393bd10..33883c0a8 100644 --- a/AndEngine/build.gradle +++ b/AndEngine/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 + namespace 'org.anddev.andengine' + compileSdk 34 defaultConfig { minSdkVersion 21 + //noinspection ExpiredTargetSdkVersion targetSdkVersion 29 - versionCode 1 - versionName '1.0' } sourceSets { @@ -18,16 +18,18 @@ android { } useLibrary 'org.apache.http.legacy' - - lintOptions { + lint { abortOnError true ignoreWarnings true - disable 'ExpiredTargetSdkVersion' } + buildFeatures { + buildConfig true + } + } dependencies { - implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'com.google.android.material:material:1.0.0' + implementation 'com.google.android.material:material:1.11.0' } \ No newline at end of file diff --git a/LibBASS/build.gradle b/LibBASS/build.gradle index 3e47c641d..9d8456e74 100644 --- a/LibBASS/build.gradle +++ b/LibBASS/build.gradle @@ -1,21 +1,15 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 + compileSdk 34 ndkVersion '22.1.7171670' defaultConfig { minSdkVersion 21 + //noinspection ExpiredTargetSdkVersion targetSdkVersion 29 - versionCode 1 - versionName "1.0" } - lintOptions { - abortOnError true - ignoreWarnings true - disable 'ExpiredTargetSdkVersion' - } buildTypes { release { @@ -23,6 +17,11 @@ android { // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + namespace 'com.un4seen.bass' + lint { + abortOnError true + ignoreWarnings true + } } diff --git a/LibBASS/src/main/AndroidManifest.xml b/LibBASS/src/main/AndroidManifest.xml index 27972219b..97330b776 100644 --- a/LibBASS/src/main/AndroidManifest.xml +++ b/LibBASS/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/andnext_markdown/build.gradle b/andnext_markdown/build.gradle index ae883adc4..45d183b37 100644 --- a/andnext_markdown/build.gradle +++ b/andnext_markdown/build.gradle @@ -1,20 +1,14 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 + compileSdk 34 defaultConfig { minSdkVersion 21 + //noinspection ExpiredTargetSdkVersion targetSdkVersion 29 - versionCode 1 - versionName "1.0" } - lintOptions { - abortOnError true - ignoreWarnings true - disable 'MissingTranslation', 'ExpiredTargetSdkVersion', 'ProtectedPermissions', 'AppLinkUrlError' - } buildTypes { release { @@ -22,11 +16,20 @@ android { // proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + namespace 'club.andnext.markdown' + lint { + abortOnError true +// disable 'MissingTranslation', 'ExpiredTargetSdkVersion', 'ProtectedPermissions', 'AppLinkUrlError' + ignoreWarnings true + } + buildFeatures { + buildConfig true + } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.appcompat:appcompat:1.6.1' } diff --git a/andnext_markdown/src/main/AndroidManifest.xml b/andnext_markdown/src/main/AndroidManifest.xml index 7c5a8040f..94cbbcfc3 100644 --- a/andnext_markdown/src/main/AndroidManifest.xml +++ b/andnext_markdown/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - + diff --git a/build.gradle b/build.gradle index 3d5382c8c..56409772f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { ext{ - kotlin_version = '1.7.0' + kotlin_version = '1.9.22' } repositories { google() @@ -8,9 +8,9 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' - classpath 'com.google.gms:google-services:4.3.10' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' + classpath 'com.android.tools.build:gradle:8.2.2' + classpath 'com.google.gms:google-services:4.4.1' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -46,10 +46,10 @@ apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 30 + namespace 'ru.nsu.ccfit.zuev.osuplus' + compileSdk 34 ndkVersion '22.1.7171670' defaultConfig { @@ -61,11 +61,13 @@ android { abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' } } - packagingOptions { - exclude 'META-INF/proguard/coroutines.pro' + resources { + excludes += ['META-INF/proguard/coroutines.pro'] + } } + signingConfigs { debug { storeFile file('debug.jks') @@ -97,7 +99,6 @@ android { release { resValue "string", "app_name", "osu!droid" - zipAlignEnabled true // minifyEnabled true // proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg', 'proguard-kotlin.pro' signingConfig signingConfigs.release @@ -109,7 +110,6 @@ android { pre_release { matchingFallbacks = ['release'] resValue "string", "app_name", "osu!droid" - zipAlignEnabled true // minifyEnabled true // debuggable true // proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg', 'proguard-kotlin.pro' @@ -132,17 +132,20 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } useLibrary 'org.apache.http.legacy' - - lintOptions { + lint { abortOnError true - ignoreWarnings true disable 'MissingTranslation', 'ExpiredTargetSdkVersion', 'ProtectedPermissions', 'AppLinkUrlError' + ignoreWarnings true } + buildFeatures { + buildConfig true + } + android.applicationVariants.all { variant -> variant.outputs.all { output -> @@ -157,32 +160,32 @@ dependencies { implementation project(':AndEngine') implementation project(':andnext_markdown') implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.preference:preference:1.1.1' - implementation 'com.google.android.material:material:1.4.0' - implementation 'com.google.firebase:firebase-crashlytics:18.2.1' - implementation 'com.google.firebase:firebase-analytics:19.0.1' - implementation 'com.google.firebase:firebase-messaging:22.0.0' + implementation 'androidx.preference:preference:1.2.1' + implementation 'com.google.android.material:material:1.11.0' + implementation 'com.google.firebase:firebase-crashlytics:18.6.2' + implementation 'com.google.firebase:firebase-analytics:21.5.1' + implementation 'com.google.firebase:firebase-messaging:23.4.1' // implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' // implementation 'io.reactivex.rxjava2:rxjava:2.2.21' - implementation 'com.squareup.okhttp3:okhttp:4.9.0' + implementation 'com.squareup.okhttp3:okhttp:4.12.0' // implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0' - implementation 'com.google.code.gson:gson:2.8.8' + implementation 'com.google.code.gson:gson:2.10.1' //implementation 'com.github.tbruyelle:rxpermissions:0.12' implementation 'pub.devrel:easypermissions:3.0.0' - implementation 'net.lingala.zip4j:zip4j:2.9.0' + implementation 'net.lingala.zip4j:zip4j:2.11.5' implementation 'com.github.EdrowsLuo:osudroidstrings:bd9507b289' implementation 'com.github.EdrowsLuo.EdlGameFramework:EdlJavaExt:d91c53fcff' implementation 'com.github.EdrowsLuo.EdlGameFramework:EdlOsbSupport:d91c53fcff' implementation project(path: ':LibBASS') - implementation 'commons-io:commons-io:2.11.0' + implementation 'commons-io:commons-io:2.15.1' implementation 'com.github.delight-im:Android-AdvancedWebView:v3.2.1' // Multiplayer - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0") - implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10" + implementation('org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3') + implementation 'org.jetbrains.kotlin:kotlin-reflect:1.9.22' implementation ('io.socket:socket.io-client:2.1.0') { exclude group: 'org.json', module: 'json' } diff --git a/gradle.properties b/gradle.properties index 0319a3b1f..cc220e004 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,6 +14,8 @@ # org.gradle.parallel=true #Thu Oct 06 22:58:27 CST 2016 android.enableJetifier=true +android.nonFinalResIds=false +android.nonTransitiveRClass=true android.useAndroidX=true org.gradle.daemon=true org.gradle.jvmargs=-Xmx2048m \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f0b90ffa0..9516abfc2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip diff --git a/src/com/edlplan/framework/support/batch/AbstractBatch.java b/src/com/edlplan/framework/support/batch/AbstractBatch.java index ccd301f6e..d30e5adc9 100644 --- a/src/com/edlplan/framework/support/batch/AbstractBatch.java +++ b/src/com/edlplan/framework/support/batch/AbstractBatch.java @@ -23,12 +23,6 @@ public abstract class AbstractBatch { protected abstract boolean applyToGL(); - public void addAll(T... ts) { - for (T t : ts) { - add(t); - } - } - protected void checkForBind() { if (!isBind()) { bind(); diff --git a/src/com/edlplan/osu/support/timing/TimingPoint.java b/src/com/edlplan/osu/support/timing/TimingPoint.java index 8d6c80d1d..8f2026a3b 100644 --- a/src/com/edlplan/osu/support/timing/TimingPoint.java +++ b/src/com/edlplan/osu/support/timing/TimingPoint.java @@ -42,7 +42,7 @@ public double getBeatLength() { return beatLength; } - public strictfp void setBeatLength(double beatLength) { + public void setBeatLength(double beatLength) { this.beatLength = beatLength; speedMultiplier = (beatLength < 0 ? (100.0 / -beatLength) : 1); } diff --git a/src/com/edlplan/ui/InputDialog.java b/src/com/edlplan/ui/InputDialog.java index 18f676e64..3633d152d 100644 --- a/src/com/edlplan/ui/InputDialog.java +++ b/src/com/edlplan/ui/InputDialog.java @@ -10,7 +10,7 @@ public class InputDialog extends Dialog { public InputDialog(@NonNull Context context) { - super(context, R.style.Theme_Design_BottomSheetDialog); + super(context, com.google.android.material.R.style.Theme_Design_BottomSheetDialog); setContentView(R.layout.dialog_for_input); } diff --git a/src/com/edlplan/ui/fragment/FilterMenuFragment.kt b/src/com/edlplan/ui/fragment/FilterMenuFragment.kt index 04317f14d..77f757199 100644 --- a/src/com/edlplan/ui/fragment/FilterMenuFragment.kt +++ b/src/com/edlplan/ui/fragment/FilterMenuFragment.kt @@ -65,9 +65,9 @@ class FilterMenuFragment : BaseFragment(), IUpdateHandler, IFilterMenu { override fun getOrder(): SongMenu.SortOrder { val prefs = - PreferenceManager.getDefaultSharedPreferences(configContext) + PreferenceManager.getDefaultSharedPreferences(configContext!!) val order = prefs.getInt("sortorder", 0) - return SongMenu.SortOrder.values()[order % SongMenu.SortOrder.values().size] + return SongMenu.SortOrder.entries[order % SongMenu.SortOrder.entries.size] } override fun isFavoritesOnly(): Boolean = favoritesOnly.isChecked @@ -253,13 +253,13 @@ class FilterMenuFragment : BaseFragment(), IUpdateHandler, IFilterMenu { private fun nextOrder() { var order = order - order = SongMenu.SortOrder.values()[(order.ordinal + 1) % SongMenu.SortOrder.values().size] + order = SongMenu.SortOrder.entries.toTypedArray()[(order.ordinal + 1) % SongMenu.SortOrder.entries.size] saveOrder(order) } private fun saveOrder(order: SongMenu.SortOrder) { PreferenceManager - .getDefaultSharedPreferences(configContext) + .getDefaultSharedPreferences(configContext!!) .edit() .putInt("sortorder", order.ordinal) .commit() diff --git a/src/com/edlplan/ui/fragment/InGameSettingMenu.kt b/src/com/edlplan/ui/fragment/InGameSettingMenu.kt index 0489ed7bd..67a5725d8 100644 --- a/src/com/edlplan/ui/fragment/InGameSettingMenu.kt +++ b/src/com/edlplan/ui/fragment/InGameSettingMenu.kt @@ -204,7 +204,7 @@ class InGameSettingMenu : BaseFragment() { } val backgroundBrightness = findViewById(R.id.backgroundBrightnessBar)!! - backgroundBrightness.progress = PreferenceManager.getDefaultSharedPreferences(context) + backgroundBrightness.progress = PreferenceManager.getDefaultSharedPreferences(requireContext()) .getInt("bgbrightness", 25) backgroundBrightness.setOnSeekBarChangeListener( object : OnSeekBarChangeListener { @@ -239,14 +239,14 @@ class InGameSettingMenu : BaseFragment() { val progress = seekBar!!.progress findViewById(R.id.bgBrightnessText)!!.text = "$progress%" Config.setBackgroundBrightness(seekBar.progress / 100f) - PreferenceManager.getDefaultSharedPreferences(context).edit() + PreferenceManager.getDefaultSharedPreferences(context!!).edit() .putInt("bgbrightness", progress).commit() } } ) findViewById(R.id.bgBrightnessText)!!.text = "${ - PreferenceManager.getDefaultSharedPreferences(context).getInt("bgbrightness", 25) + PreferenceManager.getDefaultSharedPreferences(requireContext()).getInt("bgbrightness", 25) }%" speedModifyBar = findViewById(R.id.changeSpeedBar)!! @@ -533,7 +533,7 @@ class InGameSettingMenu : BaseFragment() { ?.setInterpolator(EasingHelper.asInterpolator(Easing.InOutQuad)) ?.setListener( object : BaseAnimationListener() { - override fun onAnimationEnd(animation: Animator?) { + override fun onAnimationEnd(animation: Animator) { super.onAnimationEnd(animation) val background = findViewById(R.id.frg_background)!! background.isClickable = true @@ -555,7 +555,7 @@ class InGameSettingMenu : BaseFragment() { ?.setInterpolator(EasingHelper.asInterpolator(Easing.InOutQuad)) ?.setListener( object : BaseAnimationListener() { - override fun onAnimationEnd(animation: Animator?) { + override fun onAnimationEnd(animation: Animator) { super.onAnimationEnd(animation) findViewById(R.id.frg_background)!!.isClickable = false } diff --git a/src/com/edlplan/ui/fragment/SettingsFragment.kt b/src/com/edlplan/ui/fragment/SettingsFragment.kt index 7d4fa93d3..9f314a8e8 100644 --- a/src/com/edlplan/ui/fragment/SettingsFragment.kt +++ b/src/com/edlplan/ui/fragment/SettingsFragment.kt @@ -65,10 +65,10 @@ abstract class SettingsFragment : PreferenceFragmentCompat(), BackPressListener dismiss() } - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { isCreated = true root = super.onCreateView(inflater, container, savedInstanceState) onLoadView() - return root + return root as View } } \ No newline at end of file diff --git a/src/com/reco1l/legacy/ui/multiplayer/RoomPlayerList.kt b/src/com/reco1l/legacy/ui/multiplayer/RoomPlayerList.kt index 5085553cf..5e331b346 100644 --- a/src/com/reco1l/legacy/ui/multiplayer/RoomPlayerList.kt +++ b/src/com/reco1l/legacy/ui/multiplayer/RoomPlayerList.kt @@ -51,7 +51,7 @@ class RoomPlayerList(val room: Room) : ScrollableList(), IScrollDetectorListener } - override fun onManagedUpdate(pSecondsElapsed: Float) + override fun onManagedUpdate(secondsElapsed: Float) { if (!isValid) { @@ -68,7 +68,7 @@ class RoomPlayerList(val room: Room) : ScrollableList(), IScrollDetectorListener } } - super.onManagedUpdate(pSecondsElapsed) + super.onManagedUpdate(secondsElapsed) } diff --git a/src/ru/nsu/ccfit/zuev/osu/menu/SongMenu.java b/src/ru/nsu/ccfit/zuev/osu/menu/SongMenu.java index bd058b19c..9df29c96a 100644 --- a/src/ru/nsu/ccfit/zuev/osu/menu/SongMenu.java +++ b/src/ru/nsu/ccfit/zuev/osu/menu/SongMenu.java @@ -1231,7 +1231,7 @@ public void updateScore() { public void openScore(final int id, boolean showOnline, final String playerName) { if (showOnline) { engine.setScene(new LoadingScreen().getScene()); - ToastLogger.showTextId(R.string.online_loadrecord, false); + ToastLogger.showTextId(com.edlplan.osudroidresource.R.string.online_loadrecord, false); Async.run(() -> { try {