70 lines
1.6 KiB
Groovy
70 lines
1.6 KiB
Groovy
group 'com.gianlucaparadise.flutter_cast_framework'
|
|
version '1.0-SNAPSHOT'
|
|
|
|
buildscript {
|
|
ext.kotlin_version = '1.9.22'
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
|
|
rootProject.allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'kotlin-android'
|
|
|
|
android {
|
|
// ✅ 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'
|
|
}
|
|
|
|
// ✅ BYTECODE ANDROID: DEVE ESSERE 1.8
|
|
// (Java 21 è solo per il TOOLING, non per il target Android)
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
// ✅ Kotlin allineato a Java 1.8 (OBBLIGATORIO)
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
lint {
|
|
disable 'InvalidPackage'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
// ✅ Google Cast Framework (compatibile AGP 8)
|
|
api "com.google.android.gms:play-services-cast-framework:21.4.0"
|
|
|
|
// ✅ Lifecycle (necessario per Cast)
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:2.8.7"
|
|
|
|
// ✅ Activity (dialog Cast / Tracks chooser)
|
|
implementation "androidx.activity:activity-ktx:1.9.0"
|
|
}
|