Skip to content

Replace gradle script with explicit convention plugins - #38

Merged
alexvanyo merged 7 commits into
android:mainfrom
sjcqs:scjqs/improve-configuration-time
May 31, 2022
Merged

Replace gradle script with explicit convention plugins#38
alexvanyo merged 7 commits into
android:mainfrom
sjcqs:scjqs/improve-configuration-time

Conversation

@sjcqs

@sjcqs sjcqs commented May 15, 2022

Copy link
Copy Markdown
Contributor

name: Replace Gradle script with explicit convention plugins
about:
label: 'triage me'

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Appropriate docs were updated (if necessary)

Fixes #39 🦕

@google-cla

google-cla Bot commented May 15, 2022

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@alexvanyo alexvanyo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this looks great! And it definitely sets up the build faster locally for me as well.

Just a couple minor comments, and I want to double check the apply versus withPlugin behavior.

Comment thread build-logic/convention/src/main/kotlin/SpotlessConventionPlugin.kt Outdated
@sjcqs
sjcqs force-pushed the scjqs/improve-configuration-time branch 2 times, most recently from 2c91f70 to 91c43f4 Compare May 17, 2022 08:35
@alexvanyo
alexvanyo self-requested a review May 23, 2022 20:17
@sjcqs

sjcqs commented May 24, 2022

Copy link
Copy Markdown
Contributor Author

@alexvanyo do you want me to fix the conflicts? 😄

@alexvanyo

Copy link
Copy Markdown
Contributor

Ah sorry, we made an internal change that conflicts now. If you want to rebase that would be great, otherwise I can!

sjcqs and others added 6 commits May 24, 2022 12:13
Those extensions *will* be accessible in build.gradle.kts if not made internal.
They are used to configure the conventions plugins internally.
They should not be accessible by the consumer Gradle modules.
Co-authored-by: Alex Vanyo <vanyoalex@gmail.com>
@sjcqs
sjcqs force-pushed the scjqs/improve-configuration-time branch from 91c43f4 to 8878265 Compare May 24, 2022 10:18
@sud007

sud007 commented May 24, 2022

Copy link
Copy Markdown
Contributor

This was really cool stuff. how much impact does this make really on gradle sync time?

@sjcqs

sjcqs commented May 25, 2022

Copy link
Copy Markdown
Contributor Author

This was really cool stuff. how much impact does this make really on gradle sync time?

I did some basic profiling in the issue 😄 : #39

The configuration part went from 12.724s to 0.765s

@alexvanyo alexvanyo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of the rebase! It all looks good except for just one change that'd I'd like to do separately, outside of the conversion PR.

One that's changed, I'll merge!

Comment thread build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt Outdated
@sjcqs
sjcqs force-pushed the scjqs/improve-configuration-time branch from ec91f97 to 7c761c5 Compare May 29, 2022 18:02
@alexvanyo
alexvanyo merged commit d20e7a3 into android:main May 31, 2022
@alexvanyo

Copy link
Copy Markdown
Contributor

Merged, thank you @sjcqs !

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.

[Build logic] Relying on Gradle script to generate plugins is slowing out the build

3 participants