Skip to content

Improvements to Android Gradle plugin #33064

Closed

Description

@blasten

The Gradle plugin has grown in complexity.

A few things that could be improved:

  • Better treatment for plugins.
  • Better support for add to app.
  • Remove the need for afterEvaluate.
  • Simplify tasks, and move lambdas into separate functions.
  • Upgrade Gradle version
  • Migrate to tasks.register instead of tasks.create

Related issues: #33059, #23586

Activity

  1. added
    platform-androidAndroid applications specifically
    t: gradle"flutter build" and "flutter run" on Android
    on May 20, 2019
  2. blasten commented on Jun 8, 2019

    @blasten
    Author

    Running ./gradlew:

    WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
    It will be removed at the end of 2019.
    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
    To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
    WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
    It will be removed at the end of 2019.
    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
    To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
    /Users/***/p/flutter/bin/cache/artifacts/engine/android-arm64-release/flutter.jar: D8: Type `android.arch.lifecycle.LifecycleRegistry` was not found, it is required for default or static interface methods desugaring of `void io.flutter.embedding.engine.FlutterEngineAndroidLifecycle.handleLifecycleEvent(android.arch.lifecycle.Lifecycle$Event)`
    /Users/***/p/flutter/bin/cache/artifacts/engine/android-arm64-release/flutter.jar: D8: Type `android.support.v4.app.FragmentActivity` was not found, it is required for default or static interface methods desugaring of `void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle)`
    /Users/***/p/flutter/bin/cache/artifacts/engine/android-arm64-release/flutter.jar: D8: Type `android.support.v4.app.Fragment` was not found, it is required for default or static interface methods desugaring of `void io.flutter.embedding.android.FlutterFragment.onAttach(android.content.Context)`
    /Users/***/p/flutter/bin/cache/artifacts/engine/android-arm64-release/flutter.jar: D8: Type `android.support.v4.app.FragmentActivity` was not found, it is required for default or static interface methods desugaring of `void io.flutter.app.FlutterFragmentActivity.onCreate(android.os.Bundle)`
    /Users/***/p/flutter/bin/cache/artifacts/engine/android-arm64-release/flutter.jar: D8: Interface `android.arch.lifecycle.DefaultLifecycleObserver` not found. It's needed to make sure desugaring of `io.flutter.embedding.engine.FlutterEngineAndroidLifecycle$1` is correct. Desugaring will assume that this interface has no default method.
    /Users/***/p/flutter/bin/cache/artifacts/engine/android-arm64-release/flutter.jar: D8: Interface `android.arch.lifecycle.LifecycleOwner` not found. It's needed to make sure desugaring of `io.flutter.embedding.engine.FlutterEngine` is correct. Desugaring will assume that this interface has no default method.
    32 actionable tasks: 31 executed, 1 up-to-date
    
  3. bitsydarel commented on Jul 11, 2019

    @bitsydarel

    Please also find a better way to add subproject to a plugin android module.
    because currently the settings.gradle in the plugin's android module is being ignored...

  4. blasten commented on Oct 10, 2019

    @blasten
    Author

    These items are fixed now.

  5. github-actions commented on Aug 27, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  6. locked as resolved and limited conversation to collaborators on Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions