Upgrade AGP to 7.4.2, Gradle to 7.5, migrate jcenter to mavenCentral by hypnozee; upd SharedModules

This commit is contained in:
Yuriy Liskov
2026-02-25 16:41:42 +02:00
parent b3da5fdb22
commit 612e36297b
6 changed files with 30 additions and 24 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 {