diff --git a/CHANGELOG.md b/CHANGELOG.md index 664341e82..3b0138d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * [Android] Add namespace for Android gradle plugin (AGP) 8 compatibility. * [Android] Fix kotlin compilation error with Flutter 3.24 and newer. [#973](https://github.com/juicycleff/flutter-unity-view-widget/issues/973) * [Android] Update documentation for new `.gradle.kts` files. +* [Android] Update some ancient build.gradle values to match Unity 2022.3. Like CompileSdk to 34 and Java to 11. * [iOS] Add an empty privacy manifest. * [Web] Don't crash on unknown event data from Unity. * Disable windows support in `pubspec.yaml` to avoid confusion. Windows support was never completed. diff --git a/android/build.gradle b/android/build.gradle index 5fe001ab8..21d1d1514 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,15 +1,15 @@ group 'com.xraph.plugin.flutter_unity_widget' -version '4.0-SNAPSHOT' +version '2022.2.2-SNAPSHOT' buildscript { - ext.kotlin_version = '1.6.20' + ext.kotlin_version = '1.8.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -33,7 +33,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 29 + compileSdkVersion 34 // backwards compatible for old gradle versions without namespace if (project.android.hasProperty("namespace")) { @@ -51,12 +51,12 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_11.toString() } } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 38ddf6e36..93ee001db 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -12,13 +12,13 @@ android { // ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { // if you change this value, also change it in android/build.gradle subprojects{} - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_11.toString() } defaultConfig { diff --git a/example/android/build.gradle b/example/android/build.gradle index 5aa11d7d2..3d414ec2a 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -34,7 +34,7 @@ subprojects { } project.android.kotlinOptions { // if you change this value, also change it in android/app/build.gradle - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_11.toString() } } }