Modernize Android build.gradle for AGP 8 / Aves compatibility
This commit is contained in:
parent
5eff99f9a7
commit
d9ad184549
1 changed files with 22 additions and 16 deletions
|
|
@ -2,14 +2,15 @@ group 'com.gianlucaparadise.flutter_cast_framework'
|
|||
version '1.0-SNAPSHOT'
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.5.31'
|
||||
ext.kotlin_version = '1.9.22'
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.2.2'
|
||||
// VERSIONE AGP EREDITATA DAL PROGETTO HOST (Aves)
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +18,7 @@ buildscript {
|
|||
rootProject.allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -25,31 +26,36 @@ apply plugin: 'com.android.library'
|
|||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
// ✅ OBBLIGATORIO con AGP 8+
|
||||
namespace "com.gianlucaparadise.flutter_cast_framework"
|
||||
|
||||
compileSdkVersion 34
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
lintOptions {
|
||||
|
||||
lint {
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def lifecycle_version = "2.0.0"
|
||||
def lifecycle_version = "2.8.7"
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
|
||||
api "com.google.android.gms:play-services-cast-framework:19.0.0"
|
||||
// ✅ Google Cast SDK
|
||||
api "com.google.android.gms:play-services-cast-framework:21.4.0"
|
||||
|
||||
// Lifecycle
|
||||
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
||||
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
||||
|
||||
// To open TracksChooserDialogFragment
|
||||
implementation "androidx.activity:activity-ktx:1.3.1"
|
||||
// Activity (per dialog Cast)
|
||||
implementation "androidx.activity:activity-ktx:1.9.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue