title: Gradle plugin: Convention vs. Extension
body: <p>I am writing a Gradle plugin and I am learning Gradle by reading the user guide and the source code of the plugins inside the Gradle project.</p>
  <p>In the source code, I found 2 ways of adding properties to the project:</p>
  <ul>
  <li><strong>Convention</strong> (set by the <code>JavaBasePlugin</code> and used by the <code>JavaPlugin</code>)</li>
  <li><strong>Extension</strong> (set by the <code>AnnouncePlugin</code> and used by the <code>BuildAnnouncementsPlugin</code>).</li>
  </ul>
  <p>I don't understand the difference between them and which one to use for which situation. Could someone explain?</p>