plugins {
    id "com.android.application"
    id "kotlin-android"
    // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
    id "dev.flutter.flutter-gradle-plugin"
}

// flutter. variables commented for backwards compatibility with Flutter 3.16 and 3.19.
android {
    namespace = "com.xraph.plugin.flutter_unity_widget_example"
    compileSdk = 34 // flutter.compileSdkVersion
    // ndkVersion = flutter.ndkVersion

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        // if you change this value, also change it in android/build.gradle subprojects{}
        jvmTarget = JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId = "com.xraph.plugin.flutter_unity_widget_example"
        // You can update the following values to match your application needs.
        // For more information, see: https://flutter.dev/to/review-gradle-config.
        minSdk = 24 // flutter.minSdkVersion
        targetSdk = 34 // flutter.targetSdkVersion
        versionCode = 1 // flutter.versionCode
        versionName = "1.0.0" // flutter.versionName
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig = signingConfigs.debug
        }
    }
}

flutter {
    source = "../.."
}

dependencies {
    implementation project(':unityLibrary')
    implementation project(':flutter_unity_widget')
}
