Skip to content

Add obfuscation option to flutter build aar also #56068

Closed

Description

@xster

#50509 missed build_aar :)

cc @jonahwilliams

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    t: gradle"flutter build" and "flutter run" on Android
    a: existing-appsIntegration with existing apps via the add-to-app flow
    a: buildBuilding flutter applications with the tool
    on Apr 30, 2020
  2. jonahwilliams commented on Apr 30, 2020

    @jonahwilliams
    Contributor

    should build aar have this? What is it for?

  3. jonahwilliams commented on Apr 30, 2020

    @jonahwilliams
    Contributor

    i.e. I though aar was for producing testing artifacts, and the actual build would be done separately

  4. xster commented on Apr 30, 2020

    @xster
    MemberAuthor

    I meant the dart obfuscation flag you added (awesome feature btw) is equally useful for APKs as it is for AARs. It's an Android library. For library developers, that's sometimes the final shipping artifacts (to be consumed by other companies that they don't want to share "source" with).

  5. jonahwilliams commented on Apr 30, 2020

    @jonahwilliams
    Contributor

    Oh okay, I thought that was only for testing artifacts

  6. jonahwilliams commented on Apr 30, 2020

    @jonahwilliams
    Contributor

    The build_aar command would need to be refactored to get the buildInfo from the flutter command instead of manually constructing it. I don't have time to look at this right now, but I could advise someone else that wanted to take a look

  7. xster commented on Apr 30, 2020

    @xster
    MemberAuthor

    (I don't know what's the best way to test) but can't it just do #56069?

  8. jmagman commented on May 4, 2020

    @jmagman
    Member

    I can look at this.

  9. self-assigned this
    on May 4, 2020
  10. jmagman commented on May 6, 2020

    @jmagman
    Member

    Should plugins also be obfuscated? And if so, what's the right thing to do with splitDebugInfoPath?
    https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/android/gradle.dart#L773-L775

  11. jonahwilliams commented on May 6, 2020

    @jonahwilliams
    Contributor

    Dart doesn't support any sort of separate compilation, so any plugin dart code would be compiled into libapp.so in the main AAR and obfuscated. I think (but @blasten would need to confirm) that this is only building the Java side of things

  12. github-actions commented on Aug 21, 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.

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

Metadata

Metadata

Assignees

Labels

a: buildBuilding flutter applications with the toola: existing-appsIntegration with existing apps via the add-to-app flowtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions