Skip to content

Commit

Permalink
Add namespace for Android gradle plugin (AGP) 8 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
timbotimbo committed Jun 25, 2024
1 parent adf2281 commit 8cfb5e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Pending (master branch only)
* [Android] Fix touch detection when using Unity's New Input System. [#938](https://github.com/juicycleff/flutter-unity-view-widget/pull/938)
* [Android] Workaround for mUnityplayer error in Unity plugins using the AndroidJavaProxy. [#908](https://github.com/juicycleff/flutter-unity-view-widget/pull/908)
* [Android] Add namespace for Android gradle plugin (AGP) 8 compatibility.

## 2022.2.1

Expand Down
9 changes: 7 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
ext.kotlin_version = '1.6.20'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -17,7 +17,7 @@ buildscript {
rootProject.allprojects {
repositories {
google()
jcenter()
mavenCentral()

// DO NOT MODIFY
// BUILD_ADD_UNITY_LIBS
Expand All @@ -35,6 +35,11 @@ apply plugin: 'kotlin-android'
android {
compileSdkVersion 29

// backwards compatible for old gradle versions without namespace
if (project.android.hasProperty("namespace")) {
namespace 'com.xraph.plugin.flutter_unity_widget'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
Expand Down
2 changes: 2 additions & 0 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 34

namespace 'com.xraph.plugin.flutter_unity_widget_example'

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down

0 comments on commit 8cfb5e6

Please sign in to comment.