From 093bbfbb79dfafdb32e195d2253fd5d6aa37512c Mon Sep 17 00:00:00 2001 From: Ivan Date: Tue, 23 Jul 2024 15:48:13 -0400 Subject: [PATCH 1/3] Update AGP to 7.4; Gradle to 7.5 --- android/build.gradle | 12 ++++++++---- android/gradle/wrapper/gradle-wrapper.properties | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8a61bc310..7ef06db88 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.4.1' 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 + compileSdk 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -46,8 +46,12 @@ android { } compileOptions { - sourceCompatibility 1.8 - targetCompatibility 1.8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + if (project.android.hasProperty('namespace')) { + namespace 'com.xraph.plugin.flutter_unity_widget' } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index cb24abda1..a1ab70ec6 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Mon Jul 15 17:33:14 EDT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip From 45c74e94c8bce0a7f021d3cc19eb5e915d70d9dc Mon Sep 17 00:00:00 2001 From: Ivan Date: Tue, 23 Jul 2024 16:01:33 -0400 Subject: [PATCH 2/3] Fix pub get issue --- example/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 3419b0e50..fb9991c84 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -6,7 +6,7 @@ description: Demonstrates how to use the flutter_unity_widget plugin. publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: - sdk: ">=2.7.0 <3.0.0" + sdk: ">=2.12.0 <3.0.0" dependencies: cupertino_icons: ^1.0.0 From 40edfb1ec2dcf894bbf9646b496d762f49a30ec7 Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 3 Oct 2024 18:55:22 -0400 Subject: [PATCH 3/3] Make this compatible with more Java compilers --- android/build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 7ef06db88..5e50278a8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -46,8 +46,12 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' } if (project.android.hasProperty('namespace')) {