Description
Description:
In newly created Flutter projects, Flutter now generates only build.gradle.kts (Gradle Kotlin DSL) files instead of traditional build.gradle (Groovy). When trying to build unityLibrary, the build fails because it does not recognize build.gradle.
I'm facing a compilation issue when using flutter_unity_widget in my Flutter project, which uses Gradle Kotlin DSL (build.gradle.kts). The error occurs when running ./gradlew assembleDebug or flutter build.
Error Log
Execution failed for task ':flutter_unity_widget:compileReleaseKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details
Kotlin Version
kotlin -version
Kotlin version 2.1.10-release-473 (JRE 17.0.14+0)
Steps to Reproduce:
Create a Flutter project with Gradle Kotlin DSL (build.gradle.kts).
Add flutter_unity_widget as a dependency.
Run flutter pub get.
Attempt to build the project with flutter build apk or ./gradlew assembleDebug.