<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Java on Pauls Blog</title><link>https://prule.github.io/pauls-blog/tags/java/</link><description>Recent content in Java on Pauls Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 08 Feb 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://prule.github.io/pauls-blog/tags/java/index.xml" rel="self" type="application/rss+xml"/><item><title>Sharing gradle configuration</title><link>https://prule.github.io/pauls-blog/post/coding/2025/gradle-shared-config/</link><pubDate>Sat, 08 Feb 2025 00:00:00 +0000</pubDate><guid>https://prule.github.io/pauls-blog/post/coding/2025/gradle-shared-config/</guid><description>&lt;h1 id="sharing-gradle-configuration-between-modules"&gt;Sharing gradle configuration between modules&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;Source code for this project is available at &lt;a href="https://github.com/prule/gradle-sample" target="_blank" rel="noopener"&gt;https://github.com/prule/gradle-sample&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When setting up multimodule gradle projects, we often need to share configuration - such as java toolkit version, plugins, junit platform etc&amp;hellip;&lt;/p&gt;
&lt;p&gt;Previously I would have used the &lt;code&gt;allprojects&lt;/code&gt; or &lt;code&gt;subprojects&lt;/code&gt; block to do this, but now we have convention plugins. These are locally defined plugins which contain the configuration we want to share. The submodules can then apply those plugins without needing to copy and paste the configuration - this makes it easy to selectively choose which plugins to apply to which module.&lt;/p&gt;</description></item></channel></rss>