Skip to content

Support new gradle dependency configurations #993

Closed

Description

@NickIliev

As explained in this article Gradle 3.4 introduced new Java Library plugin configurations.
The known compile is deprecated in favor of new techniques.

Currently (with tns-android: "4.0.0-rc-2018.4.2.1") dependencies in gradle are added via compile

Feature request: to support implementation, api, etc.

Reported via t.1160649

Demo application here using this gradle configuration

Activity

  1. Plamen5kov commented on Apr 3, 2018

    @Plamen5kov
    Contributor

    @NickIliev
    After a bit of research here are my findings:
    How did we manage up until now to get the compile dependencies resolved by gradle?
    Basically, we got the resolved dependencies at build time which were resolved by the build system.

    Why can't we do that with implementation and api?
    After a bit of tinkering:

    configurations.all.each({ item ->
       if(item.name.equals("implementation")) {
          println item.resolvedConfiguration
       }
    })
    

    I reached this error: Resolving configuration 'implementation' directly is not allowed, which is pretty self-explanatory.

    Unfortunately for us, gradle resolves it's implementation dependencies lazily and I couldn't find the API to find the implementation and api defined project dependencies.

    A possible workaround would be to ask the users and plugin authors to continue using compile instead of implementation and api at least until we figure a way to solve the problem.

  2. petekanev commented on Apr 4, 2018

    @petekanev
    Contributor

    @Plamen5kov @NickIliev I'd like to add that after tinkering on my part, configurations.{depsType} (debugCompile, api, runtimeOnly, etc.) are also inaccessible beyond what we are already using configurations.compile. As a matter of fact, if you inspect the type of the configurations container, you won't find the properties on the object.

    Another thing to note:

    debugCompile dependencies weren't being exploded either, as we'd only explode the compile dependencies. This means that you aren't able to access debug compile dependencies in JavaScript.

  3. removed their assignment
    on Apr 4, 2018
  4. added this to the milestone on Apr 30, 2018
  5. self-assigned this
    on May 21, 2018
  6. added a commit that references this issue on May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions