From 612e36297b56f4303c145c0f3691f14b939adc72 Mon Sep 17 00:00:00 2001 From: Yuriy Liskov Date: Wed, 25 Feb 2026 16:41:42 +0200 Subject: [PATCH] Upgrade AGP to 7.4.2, Gradle to 7.5, migrate jcenter to mavenCentral by hypnozee; upd SharedModules --- MediaServiceCore | 2 +- SharedModules | 2 +- build.gradle | 2 +- gradle.properties | 6 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- smarttubetv/build.gradle | 40 ++++++++++++++---------- 6 files changed, 30 insertions(+), 24 deletions(-) diff --git a/MediaServiceCore b/MediaServiceCore index 4aaa7b78c..d2b126893 160000 --- a/MediaServiceCore +++ b/MediaServiceCore @@ -1 +1 @@ -Subproject commit 4aaa7b78c54f7d80163b647b80e002c762cb78b2 +Subproject commit d2b126893ed67bce138a2fc74834d983987dac82 diff --git a/SharedModules b/SharedModules index 8fb67b413..5f90bf23c 160000 --- a/SharedModules +++ b/SharedModules @@ -1 +1 @@ -Subproject commit 8fb67b413fdcb8746fb91e397be3a8c9c9ad2627 +Subproject commit 5f90bf23c6c07b03dde957771a283b254484d809 diff --git a/build.gradle b/build.gradle index 9e4a329b9..83baf3fab 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ buildscript { //jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.0.0+' + classpath 'com.android.tools.build:gradle:7.4.2' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:' + kotlinVersion // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle.properties b/gradle.properties index 5e816f5e9..477654494 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,12 +2,12 @@ android.enableJetifier=true android.useAndroidX=true # Jetifier with Robolectric transform fix: # Add android.jetifier.blacklist=bcprov or android.enableJetifier=false to gradle.properties. or upgrade to 7.1.x of AGP (Android Gradle Plugin). -android.jetifier.blacklist=bcprov -#android.jetifier.ignorelist=bcprov +#android.jetifier.blacklist=bcprov +android.jetifier.ignorelist=bcprov # Get ready for minification (NoSuchMethodError on kivi???) #android.enableR8.fullMode=true # Minification ram usage fix #org.gradle.jvmargs=-Xmx1024m -org.gradle.jvmargs=-Xmx2000m +org.gradle.jvmargs=-Xmx3000m android.suppressUnsupportedCompileSdk=34 android.disableAutomaticComponentCreation=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1a326c979..6dde6db2a 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-6.9.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip diff --git a/smarttubetv/build.gradle b/smarttubetv/build.gradle index 50ecbb6f5..3612d878c 100644 --- a/smarttubetv/build.gradle +++ b/smarttubetv/build.gradle @@ -13,7 +13,7 @@ buildscript { // Check that you have the Google Services Gradle plugin v4.3.2 or later // (if not, add it). - classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' // Add the Crashlytics Gradle plugin. // https://firebase.google.com/docs/crashlytics/get-started?platform=android @@ -50,14 +50,15 @@ android { compileSdkVersion project.properties.compileSdkVersion buildToolsVersion project.properties.buildToolsVersion testOptions.unitTests.includeAndroidResources = true + ndkVersion "21.0.6113669" // reduce size of the *.so files (stripping debug symbols) defaultConfig { // values linked with applicationId: searchable.searchSuggestAuthority, searchable.searchSuggestIntentData, VideoContract.CONTENT_AUTHORITY applicationId "app.smarttube" minSdkVersion project.properties.minSdkVersion targetSdkVersion project.properties.targetSdkVersion - versionCode 2283 - versionName "30.93" + versionCode 2285 + versionName "30.95" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L" @@ -68,17 +69,22 @@ android { // Trying to fix VerifyError/ClassNotFoundException multiDexKeepProguard file("multidex-keep.pro") - // https://stackoverflow.com/questions/37382057/android-apk-how-to-exclude-a-so-file-from-a-3rd-party-dependency-using-gradle - // armeabi-v7a backward compatible with arm64-v8a, x86 -> x86_64 etc - splits { - abi { - enable true - reset() - // Note, Android could soon start warning users when they run 32-bit apps - //include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' //select ABIs to build APKs for - include 'armeabi-v7a', 'x86', 'arm64-v8a' // v7a main build, x86 for WSL, v8a for Pixel Tablet (no 32 bit support) - universalApk true //generate an additional APK that contains all the ABIs - } + // The content of Universal apk + ndk { + abiFilters 'armeabi-v7a', 'arm64-v8a' + } + } + + // https://stackoverflow.com/questions/37382057/android-apk-how-to-exclude-a-so-file-from-a-3rd-party-dependency-using-gradle + // armeabi-v7a backward compatible with arm64-v8a, x86 -> x86_64 etc + splits { + abi { + enable true + reset() + // Note, Android could soon start warning users when they run 32-bit apps + //include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' //select ABIs to build APKs for + include 'armeabi-v7a', 'arm64-v8a', 'x86' // v7a main build, x86 for WSL, v8a for Pixel Tablet (no 32 bit support) + universalApk true //generate an additional APK that contains all the ABIs } } @@ -134,7 +140,7 @@ android { // naming example: SmartYouTubeTV_Xwalk_v6.8.12_r.apk // https://stackoverflow.com/questions/18332474/how-to-set-versionname-in-apk-filename-using-gradle applicationVariants.all { variant -> - variant.outputs.each { output -> + variant.outputs.all { output -> def project = "SmartTube" def flavor = variant.productFlavors[-1].name.substring(2) // remove st prefix def buildType = variant.buildType.name.take(1) @@ -156,8 +162,8 @@ android { // exclude '**/SearchOrbView.class' // Remove unneeded arches from universal apk here because 'splits' cannot do this - exclude "lib/x86_64/**" - exclude "lib/armeabi/**" + // exclude "lib/x86_64/**" + // exclude "lib/armeabi/**" } lintOptions {