Skip to content

Conversation

dmdashenkov
Copy link
Contributor

@dmdashenkov dmdashenkov commented Oct 9, 2020

In this PR we allow the Gradle plugin to patch imports in any Dart file, not just in .pb.dart ones.

In order to collect info about known types, we generate types.dart file in every package. Previously, our Gradle plugin did not resolve relative path imports in those files. Now it does. Thanks to that, we're able to use Dart Protobuf classes from spine_client instead of generating them in place each time.

Also, protoDart.modules is now final to prevent corrupting Gradle model with nulls.

Also, a minor TODO in another Gradle tool is resolved (no issue attached).

@dmdashenkov dmdashenkov self-assigned this Oct 9, 2020
@dmdashenkov dmdashenkov requested a review from armiol October 9, 2020 15:48
@dmdashenkov
Copy link
Contributor Author

@armiol, PTAL.

@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #572 into master will decrease coverage by 14.20%.
The diff coverage is 44.44%.

@@              Coverage Diff              @@
##             master     #572       +/-   ##
=============================================
- Coverage     77.29%   63.08%   -14.21%     
- Complexity     2979     3248      +269     
=============================================
  Files           499      513       +14     
  Lines         11502    15657     +4155     
  Branches        668     1423      +755     
=============================================
+ Hits           8891     9878      +987     
- Misses         2383     5324     +2941     
- Partials        228      455      +227     

@dmdashenkov
Copy link
Contributor Author

Codecov collapse is a mystery.

@dmdashenkov dmdashenkov merged commit b7ffe45 into master Oct 12, 2020
@dmdashenkov dmdashenkov deleted the patch-imports-in-types.dart branch October 12, 2020 11:42
This was referenced Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants