mwaylabs / flutter-managed-configuration

MIT License
1 stars 14 forks source link

Error when using Gradle 8 #13

Open TomBeckett opened 4 months ago

TomBeckett commented 4 months ago
/Users/tombeckett/Documents/workspace/flutter/bin/flutter --no-color build apk

Running Gradle task 'assembleRelease'...                        

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':managed_configurations'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file: /Users/tombeckett/.pub-cache/hosted/pub.dev/managed_configurations-1.0.1/android/build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

     If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
> Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@32f4a2a6 of type BuildFlowService.Parameters
   > A problem occurred configuring project ':managed_configurations'.
      > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
         > Namespace not specified. Specify a namespace in the module's build file: /Users/tombeckett/.pub-cache/hosted/pub.dev/managed_configurations-1.0.1/android/build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

           If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 7s
Running Gradle task 'assembleRelease'...                            7.8s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1
AlexBacich commented 3 months ago

Fixed in this PR: https://github.com/AlexBacich/flutter-managed-configuration.git For now override may be used:

dependency_overrides:
  managed_configurations: # Till the AGP8 Namespace PR is merged: https://github.com/mwaylabs/flutter-managed-configuration/pull/14/commits
    git:
      url: https://github.com/AlexBacich/flutter-managed-configuration.git
      ref: 9697ada9bf7c043162ff577b842eaa5ebfdd390c