Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new gradle dependency configurations #993

Closed
NickIliev opened this issue Apr 3, 2018 · 2 comments
Closed

Support new gradle dependency configurations #993

NickIliev opened this issue Apr 3, 2018 · 2 comments
Assignees
Milestone

Comments

@NickIliev
Copy link

NickIliev commented Apr 3, 2018

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

@Plamen5kov
Copy link
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.

@petekanev
Copy link
Contributor

petekanev commented Apr 4, 2018

@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.

@Plamen5kov Plamen5kov removed their assignment Apr 4, 2018
@darind darind added this to the 4.1.0 milestone Apr 30, 2018
@Natalia-Hristova Natalia-Hristova self-assigned this May 10, 2018
@vhristov5555 vhristov5555 self-assigned this May 21, 2018
vhristov5555 pushed a commit to NativeScript/nativescript-cli-tests that referenced this issue May 29, 2018
vhristov5555 pushed a commit to NativeScript/nativescript-cli-tests that referenced this issue Jun 12, 2018
* Add tests for NativeScript/android#993. Also improve interface tests with java interfaces in java code.

* Change java and javascirpt interfaces tests.
Natalia-Hristova pushed a commit to NativeScript/nativescript-cli-tests that referenced this issue Jun 19, 2018
* Add tests for NativeScript/android#993. Also improve interface tests with java interfaces in java code.

* Change java and javascirpt interfaces tests.
Natalia-Hristova pushed a commit to NativeScript/nativescript-cli-tests that referenced this issue Jun 28, 2018
* Add tests for NativeScript/android#993. Also improve interface tests with java interfaces in java code.

* Change java and javascirpt interfaces tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants