<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>✨Otowa no Yume🌙 Space</title>
        <link>https://blog.mikufancx.cyou/</link>
        <description>CXwudi&#39;s (✨Otowa no Yume🌙) Personal Blog</description>
        <generator>Hugo -- gohugo.io</generator><language>en</language><copyright>This work is licensed under a Creative Commons Attribution 4.0 International License.</copyright><lastBuildDate>Sun, 12 May 2024 14:52:55 &#43;0000</lastBuildDate>
            <atom:link href="https://blog.mikufancx.cyou/index.xml" rel="self" type="application/rss+xml" />
        <item>
    <title>A beautiful workaround for accessing Gradle Version Catalogs from Precompiled Script Plugins</title>
    <link>https://blog.mikufancx.cyou/posts/202405/version-catalog-plugin-wordaround/</link>
    <pubDate>Sun, 12 May 2024 14:52:55 &#43;0000</pubDate><author>
                        <name>CXwudi</name><uri>https://linktr.ee/CXwudi</uri><email>charleschen0502@gmail.com</email></author><guid>https://blog.mikufancx.cyou/posts/202405/version-catalog-plugin-wordaround/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/posts/202405/version-catalog-plugin-wordaround/img/featured%20image.webp" referrerpolicy="no-referrer">
            </div><p>TL;DR: Apply the <a href="https://github.com/gmazzo/gradle-buildconfig-plugin" target="_blank" rel="noopener noreferrer">gradle-buildconfig-plugin</a> or the <a href="https://github.com/yshrsmz/BuildKonfig" target="_blank" rel="noopener noreferrer">BuildKonfig</a> plugin to <code>buildSrc/build.gradle.kts</code>.</p>
<div class="details admonition quote open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"/></svg></span>Featured Image Source<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><strong>Source</strong>: <a href="https://medium.com/@gopalsays108/android-gradle-version-catalog-by-gopal-cf459e90fb92" target="_blank" rel="noopener noreferrer">Medium</a></div></div></div>
<h2 id="introduction" class="headerLink">
    <a href="#introduction" class="header-mark"></a>1. Introduction</h2><p>There is a long-lasted Gradle issue <a href="https://github.com/gradle/gradle/issues/15383" target="_blank" rel="noopener noreferrer">gradle/gradle#15383</a> that has almost been impossible to resolve, and it has been very frustrating for the Gradle community. It is about accessing the version catalogs from precompiled script plugins. While many workarounds exist, today I want to show you the workaround I found recently.</p>
<p>Let&rsquo;s begin.</p>
<h2 id="understanding-the-issue" class="headerLink">
    <a href="#understanding-the-issue" class="header-mark"></a>2. Understanding the issue</h2><p>The issue <a href="https://github.com/gradle/gradle/issues/15383" target="_blank" rel="noopener noreferrer">gradle/gradle#15383</a>, created by <span class="h-card  person-mentiontw-inline-block"><a href="https://github.com/melix" class="u-url url" title="Member of Micronaut team and GraalVM team, contributes to several Micronaut&#39;s tools and the GraalVM Native Build Tools"><img class="u-photo photo tw-max-h-4 tw-inline-block tw-rounded-full tw-align-image" src="https://avatars.githubusercontent.com/u/316357?v=4" alt="melix">&#8201;&#8201;<span class="p-name fn">Cédric Champeau</span> (<span class="p-nickname nickname">melix</span>)</a></span>, states:</p>
<blockquote>
  <p>In a similar way to <a href="https://github.com/gradle/gradle/issues/15382" target="_blank" rel="noopener noreferrer">gradle/gradle#15382</a>, we want to make the version catalogs accessible to precompiled script plugins. Naively, one might think that it&rsquo;s easier to do because precompiled script plugins are applied to the &ldquo;main&rdquo; build scripts, but this isn&rsquo;t necessarily the case:</p>
<ul>
<li>First, precompiled script plugins can be published too, meaning that they are no different from regular plugins in practice</li>
<li>Second, precompiled script plugins can be declared in included builds, not just buildSrc</li>
</ul>
<p>Therefore, the &ldquo;version catalog&rdquo; that a precompiled script plugin should see cannot be the catalog declared in the &ldquo;main build&rdquo;. It cannot be, either, the catalog declared in the project which itself declares the precompiled script plugin (typically the settings file of the buildSrc project): in particular, the catalogs declared in buildSrc/settings.gradle are for the build logic of buildSrc itself, not for the &ldquo;main&rdquo; build.</p>
</blockquote><p>In short, precompiled script plugins are not able to access version catalogs, and it is quite hard to fix this issue. But why? To better understand this issue, let&rsquo;s review some concepts in Gradle.</p>
<h3 id="what-is-the-composite-build" class="headerLink">
    <a href="#what-is-the-composite-build" class="header-mark"></a>2.1. What is the composite build?</h3><p>Gradle official documentation says:</p>
<blockquote>
  <p>A composite build is a build that includes other builds.</p>
</blockquote><p>Basically, this is the <code>includeBuild(&quot;relative/path/to/another/gradle/project&quot;)</code> statement in your <code>settings.gradle.kts</code> file. The included build itself is a valid, isolated, and self-contained Gradle project that has its own <code>settings.gradle.kts</code> and/or <code>build.gradle.kts</code> file.</p>
<p>You can try adding the Gradle wrapper to <code>relative/path/to/another/gradle/project</code> and opening the folder in your IDEA. Watch your IDEA treat it as a normal Gradle project, just like your typical Java Gradle projects 😂.</p>
<h3 id="the-precompiled-script-plugin-as-a-composite-build" class="headerLink">
    <a href="#the-precompiled-script-plugin-as-a-composite-build" class="header-mark"></a>2.2. The precompiled script plugin as a composite build</h3><p>Gradle official documentation recommends two ways to <a href="https://docs.gradle.org/current/userguide/intro_multi_project_builds.html#sec:project_standard" target="_blank" rel="noopener noreferrer">structure your multi-module project</a>. Either use <code>buildSrc</code> or a composite build to extract common build logic into a build project, used by subprojects in your multi-module project.</p>
<figure><a class="lightgallery" href="https://docs.gradle.org/current/userguide/img/multi-project-standards.png" title="" data-thumbnail="https://docs.gradle.org/current/userguide/img/multi-project-standards.png" data-sub-html="<h2>Structure of the multi-module project, from the Gradle official documentation</h2>"><img  loading="lazy" src='https://docs.gradle.org/current/userguide/img/multi-project-standards.png'     ></a><figcaption class="image-caption">Structure of the multi-module project, from the Gradle official documentation</figcaption>
    </figure>
<p>Here is the folder structure:</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">text</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-1" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">├── gradle/
</span></span><span class="line"><span class="cl">├── gradlew
</span></span><span class="line"><span class="cl">├── settings.gradle.kts
</span></span><span class="line"><span class="cl">├── build-logic/ or buildSrc/
</span></span><span class="line"><span class="cl">│   ├── settings.gradle.kts
</span></span><span class="line"><span class="cl">│   └── conventions
</span></span><span class="line"><span class="cl">│       ├── build.gradle.kts
</span></span><span class="line"><span class="cl">│       └── src/main/kotlin/shared-build-conventions.gradle.kts
</span></span><span class="line"><span class="cl">├── sub-project1/
</span></span><span class="line"><span class="cl">│   └── build.gradle.kts
</span></span><span class="line"><span class="cl">├── sub-project2/
</span></span><span class="line"><span class="cl">│   └── build.gradle.kts
</span></span><span class="line"><span class="cl">└── lib/
</span></span><span class="line"><span class="cl">    └── build.gradle.kts</span></span></code></pre>
</div>
<!-- {{\< admonition type=tip title="For composite build" open=true \>}}

If using composite build, make sure to add the following code to your `settings.gradle.kts` in the project's root directory:

```kotlin {title="settings.gradle.kts"}
pluginManagement {
    includeBuild("./build-logic") // relative path to the build logic
}
``` 

{{\< /admonition \>}} -->
<p>Since Gradle 8.0, <strong><code>buildSrc</code> has started to <a href="https://docs.gradle.org/8.0/release-notes.html" target="_blank" rel="noopener noreferrer">behave more like a composite build</a></strong>. Both ways are now more or less the same.</p>
<p>Cool! 😲 So now your common build logic is a self-contained Gradle project by itself.</p>
<p>In fact, if you look closely at the folder structure of the build project.</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">text</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-2" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">├── settings.gradle.kts
</span></span><span class="line"><span class="cl">└── conventions
</span></span><span class="line"><span class="cl">    ├── build.gradle.kts
</span></span><span class="line"><span class="cl">    └── src/main/kotlin/shared-build-conventions.gradle.kts</span></span></code></pre>
</div>
<p>It looks like a normal Gradle project, right?</p>
<p>So, here comes the truth about the precompiled script plugin.</p>
<h3 id="the-truth-of-the-precompiled-script-plugin" class="headerLink">
    <a href="#the-truth-of-the-precompiled-script-plugin" class="header-mark"></a>2.3. The truth of the precompiled script plugin</h3><p>Have you ever wondered why the precompiled script plugin is placed in the <code>src/main/kotlin</code> folder? 🤔 Like the <code>shared-build-conventions.gradle.kts</code> example from above. Can it just stay in the first level in the build project like <code>build-logic/shared-build-conventions.gradle.kts</code>?</p>
<p>Well, here I would like to invite you to watch a video from <span class="h-card  person-mentiontw-inline-block"><a href="https://onepiece.software/#jendrik" class="u-url url" title="A previous core member in the Gradle team"><img class="u-photo photo tw-max-h-4 tw-inline-block tw-rounded-full tw-align-image" src="https://onepiece.software/img/jendrik.png" alt="jjohannes">&#8201;&#8201;<span class="p-name fn">Jendrik Johannes</span> (<span class="p-nickname nickname">jjohannes</span>)</a></span> titled <a href="https://youtu.be/XnVZdMROVG8?list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE&amp;t=263" target="_blank" rel="noopener noreferrer">Understanding Gradle #25 – Using Java to configure builds</a>. Basically, each Gradle script is just an implementation of the <a href="https://docs.gradle.org/current/dsl/org.gradle.api.Project.html" target="_blank" rel="noopener noreferrer"><code>Plugin</code></a> interface. The build script <code>build.gradle.kts</code> corresponds to <code>Plugin&lt;Project&gt;</code>, and the settings script <code>settings.gradle.kts</code> corresponds to <code>Plugin&lt;Settings&gt;</code>.</p>
<figure><a class="lightgallery" href="https://docs.gradle.org/current/userguide/img/author-gradle-4.png" title="" data-thumbnail="https://docs.gradle.org/current/userguide/img/author-gradle-4.png" data-sub-html="<h2>A build script is just a piece of code configuring a Project instance, same applies to the precompiled script plugin</h2>"><img  loading="lazy" src='https://docs.gradle.org/current/userguide/img/author-gradle-4.png'     ></a><figcaption class="image-caption">A build script is just a piece of code configuring a <code>Project</code> instance, same applies to the precompiled script plugin</figcaption>
    </figure>
<p>Therefore, the precompiled script plugin, placed inside the <code>src/main/&lt;jvm language&gt;</code> folder, is also business logic code, but the business logic here is the build logic of your main project. Such code typically starts from the <code>apply(Project project)</code> method in your <code>class MyPlugin implements Plugin&lt;Project&gt;</code> implementation.</p>
<h3 id="the-version-catalog-using-it-from-srcmainkotlin-" class="headerLink">
    <a href="#the-version-catalog-using-it-from-srcmainkotlin-" class="header-mark"></a>2.4. The version catalog, using it from <code>src/main/kotlin</code>? 🤔</h3><p>Now, let&rsquo;s look back to the statement from the issue <a href="https://github.com/gradle/gradle/issues/15383" target="_blank" rel="noopener noreferrer">gradle/gradle#15383</a>:</p>
<blockquote>
  <p>We want to make the version catalogs accessible to precompiled script plugins</p>
</blockquote><p>Let&rsquo;s translate this using the knowledge we reviewed above; it becomes:</p>
<p>&ldquo;A file called <code>libs.versions.toml</code> is meant to be used in the <code>build.gradle.kts</code> file. Now we want to use it in the business code in the <code>src/main/kotlin</code> folder.&rdquo;</p>
<p>Now it sounds weird, right? 🤔</p>
<p>That&rsquo;s why the issue is rarely possible to be solved, because it is a design issue that breaks the separation of concerns principle.</p>
<h2 id="existing-workaround" class="headerLink">
    <a href="#existing-workaround" class="header-mark"></a>3. Existing workaround</h2><p>Several intelligent people have proposed great workarounds to this issue. The most famous one is from <span class="h-card  person-mentiontw-inline-block"><a href="https://github.com/Vampire" class="u-url url" title="A core member in the Gradle team"><img class="u-photo photo tw-max-h-4 tw-inline-block tw-rounded-full tw-align-image" src="https://avatars.githubusercontent.com/u/325196?v=4" alt="Vampire">&#8201;&#8201;<span class="p-name fn">Björn Kautler</span> (<span class="p-nickname nickname">Vampire</span>)</a></span>&rsquo;s <a href="https://github.com/gradle/gradle/issues/15383#issuecomment-779893192" target="_blank" rel="noopener noreferrer">comment</a>, where you add a sneaky Gradle internal file to the <code>dependencies {}</code> block. It works, but it is very hacky, not guaranteed to work in any Gradle project (at least it doesn&rsquo;t work for me 😕), <a href="https://github.com/gradle/gradle/issues/15383#issuecomment-900569305" target="_blank" rel="noopener noreferrer">not working in the <code>plugins {}</code> block</a>, and the workaround relies on a Gradle internal API that is subject to change anytime in the future.</p>
<p>Are there other workarounds, preferably without hacks?</p>
<p>Fortunately, there is one for the <code>plugins {}</code> block mentioned by <a href="https://github.com/gradle/gradle/issues/15383#issuecomment-1855984127" target="_blank" rel="noopener noreferrer">this comment</a>. Since applying external plugins to the precompiled script plugin requires adding the corresponding dependency of the external plugin to the <code>build.gradle.kts</code> file, you can add that dependency to the version catalog. This method assumes that the <code>settings.gradle.kts</code> file in the build project <a href="https://docs.gradle.org/current/userguide/platforms.html#sec:importing-catalog-from-file" target="_blank" rel="noopener noreferrer">imports the same version catalog</a> used in the main project. I also discovered that the method works for setting plugins, as I described in <a href="https://discuss.gradle.org/t/how-to-use-version-catalog-in-the-root-settings-gradle-kts-file/44603/5" target="_blank" rel="noopener noreferrer">this forum post</a>.</p>
<!-- . If you have ever written a precompiled script plugin that applies other plugins, you know how painful is it to find the right coordinate of the dependency of the plugin from [Gradle Plugin Portal](https://plugins.gradle.org/), and add it into the `implementation()` inside the `build.gradle.kts` file. And that's right, your `build.gradle.kts` has direct access to the version catalog, as long as your `setting.gradle.kts` imported the `libs.versions.toml` that can be anywhere in your project. Therefore simply just add the plugin's dependency into the `[libraries]` section of the version catalog, and replace the string in `implementation()` with `libs.something`.  -->
<figure><a class="lightgallery" href="/posts/202405/version-catalog-plugin-wordaround/img/Screenshot%202024-05-12%20170857.png" title="" data-thumbnail="/posts/202405/version-catalog-plugin-wordaround/img/Screenshot%202024-05-12%20170857.png" data-sub-html="<h2>Screenshot from Jendrik Johannes (jjohannes)&rsquo;s video about writing your own precompiled script plugin. One of the steps is to find the right coordinate of the plugin dependency. Fortunately, that coordinate can go into your version catalog.</h2>"><img  loading="lazy" src='/posts/202405/version-catalog-plugin-wordaround/img/Screenshot%202024-05-12%20170857.png'    height="1032" width="1843"></a><figcaption class="image-caption">Screenshot from Jendrik Johannes (jjohannes)&rsquo;s <a href="https://www.youtube.com/watch?v=N95YI-szd78&amp;list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE&amp;index=3" target="_blank" rel="noopener noreferrer">video</a> about writing your own precompiled script plugin. One of the steps is to find the right coordinate of the plugin dependency. Fortunately, that coordinate can go into your version catalog.</figcaption>
    </figure>
<p>I also found a hack-free workaround for the <code>dependencies {}</code> block and I described it in <a href="https://github.com/gradle/gradle/issues/15383#issuecomment-1858465843" target="_blank" rel="noopener noreferrer">this comment</a>. This method plays around the <a href="https://docs.gradle.org/current/userguide/platforms.html#sub:using-platform-to-control-transitive-deps" target="_blank" rel="noopener noreferrer">Gradle platform</a> and <a href="https://docs.gradle.org/current/userguide/build_lifecycle.html#sec:build_phases" target="_blank" rel="noopener noreferrer">build phases of Gradle</a> in order to do the trick. However, that method is very annoying because adding/removing a dependency requires 3 modifications around your project.</p>
<p>Together, non-hacky workarounds can cover the <code>plugins {}</code> block and the <code>dependencies {}</code> block. In most cases, this is enough. But what about <a href="https://docs.gradle.org/current/userguide/implementing_gradle_plugins_precompiled.html#sec:getting_input_from_the_build" target="_blank" rel="noopener noreferrer">extensions</a>? For example, if a precompiled script plugin applies the <a href="https://micronaut-projects.github.io/micronaut-gradle-plugin/latest/index.html" target="_blank" rel="noopener noreferrer">Micronaut Gradle Plugin</a>, how to set the version of the Micronaut framework in the <code>micronaut {}</code> extension using the version catalog? 🤷‍♂️</p>
<div class="details admonition Note">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"/></svg></span>Off topic: A fun fact about my feature request to the Micronaut Gradle Plugin<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><p>One day, I was investigating the Micronaut framework, and I realized that I couldn&rsquo;t apply any centralized version management solution mentioned in <a href="https://www.youtube.com/watch?v=8044F5gc1dE&amp;list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE&amp;index=9" target="_blank" rel="noopener noreferrer">Understanding Gradle #09 – Centralizing Dependency Versions</a> from <span class="h-card  person-mentiontw-inline-block"><img class="u-photo photo tw-max-h-4 tw-inline-block tw-rounded-full tw-align-image" src="https://onepiece.software/img/jendrik.png" alt="jjohannes">  <span class="p-name fn">Jendrik Johannes</span> (<span class="p-nickname nickname">jjohannes</span>)</span>.</p>
<p>So I created a <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin/issues/681" target="_blank" rel="noopener noreferrer">feature request</a> to the Micronaut team. I even investigated into the source code of the plugin and pointed out the <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin/blob/cc84332f5635e3da7c71e81460659f41fd36ae2b/minimal-plugin/src/main/java/io/micronaut/gradle/PluginsHelper.java#L48-L60" target="_blank" rel="noopener noreferrer">codes</a> that prevent the use of the version catalog or the Gradle platform.</p>
<p>The same person who created the issue gradle/gradle#15383, <span class="h-card  person-mentiontw-inline-block"><img class="u-photo photo tw-max-h-4 tw-inline-block tw-rounded-full tw-align-image" src="https://avatars.githubusercontent.com/u/316357?v=4" alt="melix">  <span class="p-name fn">Cédric Champeau</span> (<span class="p-nickname nickname">melix</span>)</span>, responded. 😲</p>
<p>He quickly came up with <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin/pull/701" target="_blank" rel="noopener noreferrer">a PR</a>, which adds a new option <code>importMicronautPlatform</code> to the Micronaut Gradle Plugin that can be set to <code>false</code> to allow you to achieve centralized version management with Gradle platform. Once I am able to use Gradle platform, I will be able to use the version catalog using the workaround I mentioned above.</p>
<p>Today, you can see that the option is mentioned in the Micronaut Gradle Plugin <a href="https://micronaut-projects.github.io/micronaut-gradle-plugin/latest/index.html#_micronaut_library_plugin" target="_blank" rel="noopener noreferrer">document</a>.</p>
</div></div></div>
<h2 id="introducing-the-new-beautiful-workaround-" class="headerLink">
    <a href="#introducing-the-new-beautiful-workaround-" class="header-mark"></a>4. Introducing the new beautiful workaround 🤩</h2><p>All workarounds mentioned above are more or less doing one thing: &ldquo;sending&rdquo; the variables that are meant to be used in Gradle build scripts into the business code in the <code>src/main/kotlin</code> folder.</p>
<p>One day, I unintentionally found two Gradle plugins: the <a href="https://github.com/gmazzo/gradle-buildconfig-plugin" target="_blank" rel="noopener noreferrer">gradle-buildconfig-plugin</a> and the <a href="https://github.com/yshrsmz/BuildKonfig" target="_blank" rel="noopener noreferrer">BuildKonfig</a> plugin.</p>
<p>Both plugins are typically used in Kotlin Multiplatform projects (typically Compose Multiplatform apps) to generate a Kotlin file that contains configuration variables you defined inside the <code>build.gradle.kts</code> script.</p>
<p>For example, if you have:</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">build.gradle.kts</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-3" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl"><span class="n">plugins</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// ...
</span></span></span><span class="line"><span class="cl"><span class="c1"></span>  <span class="n">id</span><span class="p">(</span><span class="s2">&#34;com.github.gmazzo.buildconfig&#34;</span><span class="p">)</span> <span class="n">version</span> <span class="p">&lt;</span><span class="n">current</span> <span class="n">version</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">buildConfig</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">className</span><span class="p">(</span><span class="s2">&#34;MyConfig&#34;</span><span class="p">)</span>   <span class="c1">// forces the class name. Defaults to &#39;BuildConfig&#39;
</span></span></span><span class="line"><span class="cl"><span class="c1"></span>  <span class="n">packageName</span><span class="p">(</span><span class="s2">&#34;com.foo&#34;</span><span class="p">)</span>  <span class="c1">// forces the package. Defaults to &#39;${project.group}&#39;
</span></span></span><span class="line"><span class="cl"><span class="c1"></span>
</span></span><span class="line"><span class="cl">  <span class="n">buildConfigField</span><span class="p">(</span><span class="n">String</span><span class="o">::</span><span class="k">class</span><span class="p">.</span><span class="n">java</span><span class="p">,</span> <span class="err">&#39;</span><span class="n">APP_NAME</span><span class="err">&#39;</span><span class="p">,</span> <span class="s2">&#34;my-project&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="c1">//...</span></span></span></code></pre>
</div>
<p>You will get:</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">com.foo.MyConfig.kt</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-4" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl"><span class="k">package</span> <span class="nn">com.foo</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">object</span> <span class="nc">MyConfig</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="k">const</span> <span class="k">val</span> <span class="py">APP</span><span class="n">_NAME</span><span class="p">:</span> <span class="n">String</span> <span class="p">=</span> <span class="s2">&#34;my-project&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
<p>Suddenly, I realized that what if I apply this plugin to the <code>build.gradle.kts</code> inside the build project? 😲</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">gradle/libs.versions.toml</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-5" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl"><span class="p">[</span><span class="nx">versions</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="nx">java</span> <span class="p">=</span> <span class="s2">&#34;21&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">slf4j</span> <span class="p">=</span> <span class="s2">&#34;2.0.13&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">libraries</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="nx">slf4j-api</span> <span class="p">=</span> <span class="p">{</span><span class="nx">module</span> <span class="p">=</span> <span class="s2">&#34;org.slf4j:slf4j-api&#34;</span><span class="p">,</span> <span class="nx">version</span><span class="p">.</span><span class="nx">ref</span> <span class="p">=</span> <span class="s2">&#34;slf4j&#34;</span><span class="p">}</span></span></span></code></pre>
</div>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">build-logic/conventions/build.gradle.kts</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-6" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl"><span class="n">plugins</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// ...
</span></span></span><span class="line"><span class="cl"><span class="c1"></span>  <span class="n">id</span><span class="p">(</span><span class="s2">&#34;com.github.gmazzo.buildconfig&#34;</span><span class="p">)</span> <span class="n">version</span> <span class="p">&lt;</span><span class="n">current</span> <span class="n">version</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">buildConfig</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">className</span><span class="p">(</span><span class="s2">&#34;VersionCatalog&#34;</span><span class="p">)</span>   <span class="c1">// forces the class name. Defaults to &#39;BuildConfig&#39;
</span></span></span><span class="line"><span class="cl"><span class="c1"></span>  <span class="n">packageName</span><span class="p">(</span><span class="s2">&#34;my.util&#34;</span><span class="p">)</span>  <span class="c1">// forces the package. Defaults to &#39;${project.group}&#39;
</span></span></span><span class="line"><span class="cl"><span class="c1"></span>
</span></span><span class="line"><span class="cl">  <span class="n">buildConfigField</span><span class="p">(</span><span class="n">Int</span><span class="o">::</span><span class="k">class</span><span class="p">.</span><span class="n">java</span><span class="p">,</span> <span class="s2">&#34;JAVA_VERSION&#34;</span><span class="p">,</span> <span class="n">libs</span><span class="p">.</span><span class="n">versions</span><span class="p">.</span><span class="n">java</span><span class="p">.</span><span class="k">get</span><span class="p">().</span><span class="n">toInt</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">  <span class="n">buildConfigField</span><span class="p">(</span><span class="n">String</span><span class="o">::</span><span class="k">class</span><span class="p">.</span><span class="n">java</span><span class="p">,</span> <span class="s2">&#34;SLF4J_API&#34;</span><span class="p">,</span> <span class="n">libs</span><span class="p">.</span><span class="n">dep</span><span class="p">.</span><span class="n">slf4j</span><span class="p">.</span><span class="k">get</span><span class="p">().</span><span class="n">toString</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
<p>Can my precompiled script plugin access <code>JAVA_VERSION</code> and <code>SLF4J_API</code> variables?</p>
<p>Guess what? It actually works! 😱</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">build-logic/conventions/src/main/kotlin/shared-build-conventions.gradle.kts</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-7" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl"><span class="k">import</span> <span class="nn">my.util.VersionCatalog</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">// other configs
</span></span></span><span class="line"><span class="cl"><span class="c1"></span>
</span></span><span class="line"><span class="cl"><span class="n">java</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">toolchain</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">languageVersion</span><span class="p">.</span><span class="k">set</span><span class="p">(</span><span class="nc">JavaLanguageVersion</span><span class="p">.</span><span class="n">of</span><span class="p">(</span><span class="nc">VersionCatalog</span><span class="p">.</span><span class="n">JAVA_VERSION</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">dependencies</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">implementation</span><span class="p">(</span><span class="nc">VersionCatalog</span><span class="p">.</span><span class="n">SLF4J_API</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">// other configs</span></span></span></code></pre>
</div>
<figure><img src="/posts/202405/version-catalog-plugin-wordaround/img/ohhhhhhh.gif">
</figure>

<h2 id="conclusion" class="headerLink">
    <a href="#conclusion" class="header-mark"></a>5. Conclusion</h2><p>The method, that utilizes the gradle-buildconfig-plugin or the BuildKonfig plugin for accessing Gradle Version Catalogs from precompiled script plugins, is a beautiful workaround. It is not too hacky, guaranteed to work in any Gradle project, and doesn&rsquo;t have the limitation where it is only accessible from the <code>plugins {}</code> block or the <code>dependencies {}</code> block. It is a great solution for centralizing version management in your Gradle project.</p>
<p>I hope this workaround can help you in your Gradle project. If you have any questions or suggestions, feel free to leave a comment below. 😊</p>]]></description>
</item><item>
    <title>Commemorating the 11th anniversary of starting to watch anime</title>
    <link>https://blog.mikufancx.cyou/posts/202403/11-anniversary-of-meeting-anime/</link>
    <pubDate>Sun, 24 Mar 2024 20:44:52 &#43;0000</pubDate><author>
                        <name>CXwudi</name><uri>https://linktr.ee/CXwudi</uri><email>charleschen0502@gmail.com</email></author><guid>https://blog.mikufancx.cyou/posts/202403/11-anniversary-of-meeting-anime/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/posts/202403/11-anniversary-of-meeting-anime/img/da-capo-pc3.png" referrerpolicy="no-referrer">
            </div><p>It&rsquo;s almost the 11th anniversary of the day I got into anime.</p>
<p>Ah, I actually don&rsquo;t know the exact day, but I still remember that day, the beautiful scene of sakura fluttering outside the window, just like the sakura tree in D.C. (Da Capo) that I had just finished watching.</p>
<p><div class="details admonition quote open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"/></svg></span>Featured Image Source<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><strong>Source</strong>: D.C. Galgame CG <!--just to insert a double space behind--><br>
<strong>Game Company</strong>: CIRCUS</div></div></div>
<div class="details admonition info open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"/></svg></span>Attention<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content">This content is translated and appropriately modified from the original Chinese version of the post on this blog using GitHub Copilot. Please forgive any issues, such as unnatural English sentences.</div></div></div></p>
<h2 id="unintentionally-the-branch-derived-from-hatsune-miku" class="headerLink">
    <a href="#unintentionally-the-branch-derived-from-hatsune-miku" class="header-mark"></a>1. Unintentionally, The Branch Derived from Hatsune Miku</h2><p>As someone who was completely segregated from girls, I had never been able to enjoy the joy of getting along with girls.</p>
<p>it was the end of January 2013, <a href="/posts/202312/11-anniversary-of-meeting-miku/" rel="">Hatsune Miku had saved me from the abyss</a> for a month already. An anime named AKB0048 mentioned in a Miku douji fiction attracted my attention.</p>
<figure><a href="https://www.bilibili.com/video/BV1RE411G7Ax?t=7.3&amp;p=2"><img src="/posts/202403/11-anniversary-of-meeting-anime/img/Screenshot_2013-01-27-00-40-53.png"
    alt="Although the resolution of the screen of the thousand-yuan old phone from 2012 was only 480p, the slender and beautiful body of protagonists in the ED alone had already planted the seeds of otaku in someone&rsquo;s heart. (It&rsquo;s also one of the earliest screenshots proving that I started watching Japanese anime.)"></a><figcaption>
      <p>Although the resolution of the screen of the thousand-yuan old phone from 2012 was only 480p, the slender and beautiful body of protagonists in the ED alone had already planted the seeds of otaku in someone&rsquo;s heart. (It&rsquo;s also one of the earliest screenshots proving that I started watching Japanese anime.)</p>
    </figcaption>
</figure>

<p>In April, the second season finished airing. The moe style girls unique in Japanese anime born the idea of looking for the next anime.</p>
<p>Let&rsquo;s search for some good animes. &ldquo;Da Capo&rdquo;? What&rsquo;s this anime? In Chinese, it is translated to 初音岛 which literally means HatsuneJima, which is true because the place in Da Capo is called HatsuneJima. I was aware that the &ldquo;Hatsune&rdquo; part is unrelated to Hatsune Miku (初音ミク). But who cares? It has “Hatsune”! Just yolo and watch it. 😄</p>
<h2 id="as-sakura-flutters-where-do-my-thoughts-fall-with-the-wind" class="headerLink">
    <a href="#as-sakura-flutters-where-do-my-thoughts-fall-with-the-wind" class="header-mark"></a>2. As Sakura Flutters, Where Do My Thoughts Fall with the Wind</h2><figure><a class="lightgallery" href="/posts/202403/11-anniversary-of-meeting-anime/img/D.C.%20%EF%BD%9E%E3%83%80%E3%83%BB%E3%82%AB%E3%83%BC%E3%83%9D%EF%BD%9E%20Blu-ray%20BOX%20DISC1%20MENU%20%28BD%201920x1080%29.png" title="" data-thumbnail="/posts/202403/11-anniversary-of-meeting-anime/img/D.C.%20%EF%BD%9E%E3%83%80%E3%83%BB%E3%82%AB%E3%83%BC%E3%83%9D%EF%BD%9E%20Blu-ray%20BOX%20DISC1%20MENU%20%28BD%201920x1080%29.png" data-sub-html="<h2>D.C. ～Da Capo～ BD Cover 1, Asakura Nemu and Yoshino Sakura</h2>"><img  loading="lazy" src='/posts/202403/11-anniversary-of-meeting-anime/img/D.C.%20%EF%BD%9E%E3%83%80%E3%83%BB%E3%82%AB%E3%83%BC%E3%83%9D%EF%BD%9E%20Blu-ray%20BOX%20DISC1%20MENU%20%28BD%201920x1080%29.png'    height="1080" width="1920"></a><figcaption class="image-caption"><a href="https://share.dmhy.org/topics/view/637016_1080P_FN_Lv_1_D_C_I_II_I_II_BDRip_1920x1080_HEVC_D_C_D_C_S_S_D_C_if_SP_D_C_II_D_C_II_S_S_SP.html" target="_blank" rel="noopener noreferrer">D.C. ～Da Capo～ BD</a> Cover 1, Asakura Nemu and Yoshino Sakura</figcaption>
    </figure>
<p>Under the forever-blooming sakura tree, a moe and cheerful campus story began.</p>
<p>There&rsquo;s the lively and adorable younger sister, Asakura Nemu; the petite and cute Yoshino Sakura; the gentle and talented school idol, Shirakawa Kotori; and also Amakase Miharu, Sagisawa Yoriko, Mizukoshi Mako, and Mizukoshi Moe.</p>
<p>Watching their interactions with the protagonist, Asakura Junichi, sparking all kinds of engaging stories—this represents a joyful life, a level of happiness I feel I could never possibly match in my own entire lifetime.</p>
<p>However, as much joy as the various jokes and memes brought in the first half of the story, the &ldquo;bloodbath&rdquo; love story in the later half was equally tragic.</p>
<p>Even though the ending was good, the sweet-then-tear-jerking plot was hard to shake off in my mind.</p>
<figure><a class="lightgallery" href="/posts/202403/11-anniversary-of-meeting-anime/img/Screenshot_2013-04-05-12-15-34.png" title="" data-thumbnail="/posts/202403/11-anniversary-of-meeting-anime/img/Screenshot_2013-04-05-12-15-34.png" data-sub-html="<h2>The rooftop confrontation between Asakura Nemu and Yoshino Sakura pushes the story to its climax. (The exact date of starting to watch anime should be the date when this screenshot was taken, but because Da Capo is related to sakura, and April is the time when sakura is in full bloom, so I later decided that each year, the anniversary of starting to watch anime is the time when sakura blooms.)</h2>"><img  loading="lazy" src='/posts/202403/11-anniversary-of-meeting-anime/img/Screenshot_2013-04-05-12-15-34.png'    height="480" width="800"></a><figcaption class="image-caption">The rooftop confrontation between Asakura Nemu and Yoshino Sakura pushes the story to its climax. (The exact date of starting to watch anime should be the date when this screenshot was taken, but because Da Capo is related to sakura, and April is the time when sakura is in full bloom, so I later decided that each year, the anniversary of starting to watch anime is the time when sakura blooms.)</figcaption>
    </figure>
<p>Ah, what a joyful, heart-wrenching yet beautiful story.</p>
<!-- Because, these were the joys of getting along with girls, which I could never imagine. -->
<p>However, every story has an end, and endlessly repeating an anime was not ideal.</p>
<p>&ldquo;Go find the next anime, go find the next happiness, just like how we found Da Capo from AKB0048 initially.&rdquo;</p>
<p>I smiled with relief.</p>
<p>&ldquo;However, choosing this path means you will join the Otaku crew and become one of them, being completely socially awkward and being more despised by others, including all the girls in your class. Are you willing?&rdquo;</p>
<!-- Hey, would I hesitate? I've had enough of the abyss. My thoughts, falling with the sakura in D.C., had drifted towards the beautiful world called "anime". -->
<p>The sakura of Da Capo, fluttering in the gentle breeze, fell like a riot of colors. The anime world is so beautiful, why would I hesitate?</p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
      <iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/Z90uLSH9mkE?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
    </div>]]></description>
</item><item>
    <title>Sharing my Zsh setup: Oh My Zsh &#43; Powerlevel10k &#43; plugins = ❤️</title>
    <link>https://blog.mikufancx.cyou/posts/202403/my-zsh-setup/</link>
    <pubDate>Tue, 12 Mar 2024 19:37:30 &#43;0000</pubDate><author>
                        <name>CXwudi</name><uri>https://linktr.ee/CXwudi</uri><email>charleschen0502@gmail.com</email></author><guid>https://blog.mikufancx.cyou/posts/202403/my-zsh-setup/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/posts/202403/my-zsh-setup/power10k%20screenshot.png" referrerpolicy="no-referrer">
            </div><p>This is my first time writing a tech blog post, sharing my own knowledge and experience. Today, I&rsquo;d like to share my personal setup of Oh My Zsh + Powerlevel10k + some commonly used plugins. This setup has made my terminal experience more enjoyable, and I hope you can have the same delightful experience as I have. 😊</p>
<h2 id="reference" class="headerLink">
    <a href="#reference" class="header-mark"></a>1. Reference</h2><p>This blog post is written based on the following resources:</p>
<ol>
<li><a href="https://github.com/ohmyzsh/ohmyzsh/wiki" target="_blank" rel="noopener noreferrer">Oh My Zsh</a></li>
<li><a href="https://github.com/romkatv/powerlevel10k#getting-started" target="_blank" rel="noopener noreferrer">Powerlevel10k</a></li>
</ol>
<p>Feel free to check them out for more detailed information.</p>
<h2 id="prerequisites" class="headerLink">
    <a href="#prerequisites" class="header-mark"></a>2. Prerequisites</h2><p>This guide works well for Linux (including WSL2), MacOS, and Windows <a href="https://git-scm.com/downloads" target="_blank" rel="noopener noreferrer">Git Bash</a>.</p>
<div class="details admonition tip">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"/></svg></span>What about Windows Powershell?<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content">Check out <a href="https://ohmyposh.dev/" target="_blank" rel="noopener noreferrer">oh-my-posh</a> for a similar setup in Powershell. However, this post won&rsquo;t cover it.</div></div></div>
<h2 id="step-1-install-necessary-fonts" class="headerLink">
    <a href="#step-1-install-necessary-fonts" class="header-mark"></a>3. Step 1: Install Necessary Fonts</h2><p>Powerlevel10k works best with its own font called <a href="https://github.com/romkatv/powerlevel10k#manual-font-installation" target="_blank" rel="noopener noreferrer"><em>Meslo Nerd Font</em></a>. Therefore, you need to install it on your OS first. Then, for each shell/terminal program you use (VSCode, Intellij, Windows Terminal, iTerm2, to name a few&hellip;), you need to configure it to use these custom fonts.</p>
<p>I know this is a pretty tedious work. Fortunately, Here is the <a href="https://github.com/romkatv/powerlevel10k#manual-font-installation" target="_blank" rel="noopener noreferrer">guidance</a> from the Powerlevel10k official GitHub repository. The guide provides instructions on configuring the terminal to utilize the Meslo Nerd Font across many of the well-known terminals.</p>
<h2 id="step-2-install-necessary-dependencies" class="headerLink">
    <a href="#step-2-install-necessary-dependencies" class="header-mark"></a>4. Step 2: Install Necessary Dependencies</h2><p>Oh My Zsh is an open-source, community-driven framework built on top of Zsh. The installation process also requires other dependencies on your OS. So, make sure you have the following installed:</p>
<ul>
<li><code>zsh</code> (Z shell)</li>
<li><code>git</code> (version control system)</li>
<li><code>curl</code> or <code>wget</code> (to download the installation script)</li>
</ul>
<p>For example, on a Debian-based system, you can install them with the following command:</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">bash</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-1" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl">sudo apt update
</span></span><span class="line"><span class="cl">sudo apt install curl git zsh -y</span></span></code></pre>
</div>
<p>For Windows Git Bash, installing Zsh can be challenging. You can check out <a href="https://dominikrys.com/posts/zsh-in-git-bash-on-windows/#installing-zsh-in-git-bash" target="_blank" rel="noopener noreferrer">this post</a> by Dominik Rys for how to install Zsh in Windows Git Bash.</p>
<h2 id="step-3-install-oh-my-zsh-powerlevel10k-and-plugins" class="headerLink">
    <a href="#step-3-install-oh-my-zsh-powerlevel10k-and-plugins" class="header-mark"></a>5. Step 3: Install Oh My Zsh, Powerlevel10k, and Plugins</h2><p>At this point, you should have all the necessary dependencies installed. Now, run the following to install Oh My Zsh, Powerlevel10k, and some common plugins.</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">bash</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-2" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl">sh -c <span class="s2">&#34;</span><span class="k">$(</span>curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh<span class="k">)</span><span class="s2">&#34;</span> <span class="s2">&#34;&#34;</span> --unattended
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">git clone --depth<span class="o">=</span><span class="m">1</span> https://github.com/romkatv/powerlevel10k.git <span class="si">${</span><span class="nv">ZSH_CUSTOM</span><span class="k">:-</span><span class="p">~/.oh-my-zsh/custom</span><span class="si">}</span>/themes/powerlevel10k
</span></span><span class="line"><span class="cl">git clone https://github.com/zsh-users/zsh-syntax-highlighting.git <span class="si">${</span><span class="nv">ZSH_CUSTOM</span><span class="k">:-</span><span class="p">~/.oh-my-zsh/custom</span><span class="si">}</span>/plugins/zsh-syntax-highlighting
</span></span><span class="line"><span class="cl">git clone https://github.com/zsh-users/zsh-autosuggestions <span class="si">${</span><span class="nv">ZSH_CUSTOM</span><span class="k">:-</span><span class="p">~/.oh-my-zsh/custom</span><span class="si">}</span>/plugins/zsh-autosuggestions
</span></span><span class="line"><span class="cl">git clone https://github.com/Pilaton/OhMyZsh-full-autoupdate <span class="si">${</span><span class="nv">ZSH_CUSTOM</span><span class="k">:-</span><span class="p">~/.oh-my-zsh/custom</span><span class="si">}</span>/plugins/ohmyzsh-full-autoupdate</span></span></code></pre>
</div>
<p>The above script does the following:</p>
<ol>
<li>Install Oh My Zsh without triggering the interactive shell that asks the user to transfer the default shell to Zsh or not. We will transfer the default shell to Zsh manually later.</li>
<li>Install the <a href="https://github.com/romkatv/powerlevel10k" target="_blank" rel="noopener noreferrer">Powerlevel10k</a> theme.</li>
<li>Install the <a href="https://github.com/zsh-users/zsh-syntax-highlighting" target="_blank" rel="noopener noreferrer">zsh-syntax-highlighting</a> plugin.
<ul>
<li>This plugin provides syntax highlighting for the shell, so you will know if you have typed a command incorrectly before pressing enter.</li>
</ul>
</li>
<li>Install the <a href="https://github.com/zsh-users/zsh-autosuggestions" target="_blank" rel="noopener noreferrer">zsh-autosuggestions</a> plugin.
<ul>
<li>This plugin suggests commands as you type based on history and completions, which can dramatically save your time on repetitive tasks and commands.</li>
</ul>
</li>
<li>Install the <a href="https://github.com/Pilaton/OhMyZsh-full-autoupdate" target="_blank" rel="noopener noreferrer">OhMyZsh-full-autoupdate</a> plugin.
<ul>
<li>Since everything is installed using git, it is crucial to keep them up-to-date. This plugin will automatically update Powerlevel10k and Oh My Zsh plugins by running <code>git pull</code> in the background. The update frequency depends on the Oh My Zsh settings. By default, it should be every 13 days.</li>
</ul>
</li>
</ol>
<h2 id="step-4-configuring-zshrc-to-use-powerlevel10k-and-plugins" class="headerLink">
    <a href="#step-4-configuring-zshrc-to-use-powerlevel10k-and-plugins" class="header-mark"></a>6. Step 4: Configuring <code>.zshrc</code> to use Powerlevel10k and Plugins</h2><p>Like Bash uses <code>.bashrc</code>, Zsh uses <code>.zshrc</code> as the configuration file.</p>
<p>By default, Oh My Zsh will create a <code>.zshrc</code> file with a default theme and a single plugin <code>git</code>. To enable Powerlevel10k and the plugins we just installed, we need to modify the <code>.zshrc</code> file.</p>
<p>Open it with your favorite text editor like <code>nano</code> and change the following lines:</p>
<ol>
<li>Change the theme from <code>ZSH_THEME=&quot;robbyrussell&quot;</code> to <code>ZSH_THEME=&quot;powerlevel10k/powerlevel10k&quot;</code>.</li>
<li>Add more plugins to the <code>plugins</code> array, from <code>plugins=(git)</code> to:
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">bash</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-3" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl"><span class="nv">plugins</span><span class="o">=(</span>git aliases common-aliases zsh-syntax-highlighting zsh-autosuggestions ohmyzsh-full-autoupdate<span class="o">)</span></span></span></code></pre>
</div>
</li>
</ol>
<p>The above can be achieved by running two <code>sed</code> commands:</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">bash</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-4" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl">sed -i <span class="s1">&#39;s/ZSH_THEME=&#34;robbyrussell&#34;/ZSH_THEME=&#34;powerlevel10k\/powerlevel10k&#34;/&#39;</span> ~/.zshrc
</span></span><span class="line"><span class="cl">sed -i <span class="s1">&#39;s/plugins=(git)/plugins=(git aliases common-aliases zsh-syntax-highlighting zsh-autosuggestions ohmyzsh-full-autoupdate)/&#39;</span> ~/.zshrc</span></span></code></pre>
</div>
<h2 id="step-5-migrate-bashrc-to-zshrc-and-profile-to-zprofile" class="headerLink">
    <a href="#step-5-migrate-bashrc-to-zshrc-and-profile-to-zprofile" class="header-mark"></a>7. Step 5: Migrate <code>.bashrc</code> to <code>.zshrc</code>, and <code>.profile</code> to <code>.zprofile</code></h2><p>Skip this step if you are setting up a new system.</p>
<p>If you are migrating from Bash to Zsh on your existing system, you might need to take some time to migrate your <code>.bashrc</code> and <code>.profile</code> to <code>.zshrc</code> and <code>.zprofile</code>, respectively.</p>
<p>Unfortunately, there is no way to automate the migration. I also strongly discourage you from executing Zsh at the end of your <code>.bashrc</code> or <code>.profile</code> file, as it can cause problems for other scripts, applications, or IDEs.</p>
<p>However, here are some general things that worth to be considered during the migration:</p>
<ul>
<li>Scripts that third-party package managers like Homebrew, SDKMan, etc. have added to your <code>.bashrc</code> or <code>.profile</code>.</li>
<li>Custom environment variables.</li>
<li>Custom <code>PATH</code>.</li>
<li>Custom aliases.
<ul>
<li>Consider migrating to existing plugins in Oh My Zsh. Check out the <a href="https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/common-aliases" target="_blank" rel="noopener noreferrer"><code>common-aliases</code></a> plugin and more in the <a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins" target="_blank" rel="noopener noreferrer">official documentation</a>.</li>
<li>For example, if you use Docker, consider adding the <a href="https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker" target="_blank" rel="noopener noreferrer"><code>docker</code></a> and <code>docker-compose</code> aliases to the <code>plugins</code> array in <code>.zshrc</code>.</li>
</ul>
</li>
</ul>
<h2 id="step-6-set-zsh-as-the-default-shell" class="headerLink">
    <a href="#step-6-set-zsh-as-the-default-shell" class="header-mark"></a>8. Step 6: Set Zsh as the Default Shell</h2><p>Finally, set Zsh as the default shell by running the following command:</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">bash</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-5" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl">chsh -s <span class="k">$(</span>which zsh<span class="k">)</span></span></span></code></pre>
</div>
<p>For Windows Git Bash, as far as I know, there is no official way to set another shell as the default shell. However, you can run <code>zsh</code> manually every time you open the terminal. Or append this script to the end of your <code>.bashrc</code> file to automatically run Zsh when you open the terminal (Yeah, it goes against what I said in Step 5, but it&rsquo;s the best we can do for now 😕):</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">bash</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-6" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl"><span class="c1"># At the end, switch to zsh</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="o">[[</span> -t <span class="m">1</span> <span class="o">&amp;&amp;</span> -x /usr/bin/zsh <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">    <span class="nb">export</span> <span class="nv">SHELL</span><span class="o">=</span><span class="k">$(</span>which zsh<span class="k">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">if</span> <span class="o">[[</span> -o login <span class="o">]]</span>
</span></span><span class="line"><span class="cl">    <span class="k">then</span>
</span></span><span class="line"><span class="cl">        <span class="nb">exec</span> zsh -l
</span></span><span class="line"><span class="cl">    <span class="k">else</span>
</span></span><span class="line"><span class="cl">        <span class="nb">exec</span> zsh
</span></span><span class="line"><span class="cl">    <span class="k">fi</span>
</span></span><span class="line"><span class="cl"><span class="k">fi</span></span></span></code></pre>
</div>
<blockquote>
  <p>Feel free to leave a comment below if you have a better solution for setting Zsh as the default shell in Windows Git Bash.</p>
</blockquote><h2 id="step-7-running-powerlevel10k-configuration-wizard" class="headerLink">
    <a href="#step-7-running-powerlevel10k-configuration-wizard" class="header-mark"></a>9. Step 7: Running Powerlevel10k Configuration Wizard</h2><p>After you have set Zsh as the default shell, starting a new terminal session will immediately bring you to the Powerlevel10k configuration wizard. You can also run <code>p10k configure</code> at any time to run the wizard again. The wizard will guide you through the process of configuring Powerlevel10k to your liking.</p>
<figure><img src="/posts/202403/my-zsh-setup/power10k-configuration-wizard.gif"
    alt="Screen recording of the Powerlevel10k Configuration Wizard (from the official GitHub repo)"><figcaption>
      <p>Screen recording of the Powerlevel10k Configuration Wizard (from the official GitHub repo)</p>
    </figcaption>
</figure>

<p>Going through the wizard can be time-consuming. So here, I have prepared a snippet of answers that you can use to quickly configure Powerlevel10k to be like the style shown in the GIF above. Just copy and paste it after you have just started the <code>p10k configure</code> wizard:</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">bash</p>
      </button>

   <div class="tw-flex">
      <button 
        class="
          line-number-button
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.show-line-numbers]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw-select-none 
          tw-mx-2 
          tw-hidden 
          group-[.is-open]:tw-block 
          group-[.is-wrap]:tw-text-fgColor-link 
          print:!tw-hidden" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw-select-none
          tw-mx-2 
          tw-hidden
          group-[.is-open]:tw-block
          hover:tw-text-fgColor-link 
          print:!tw-hidden"
        title="Copy code">
          <span class="copy-icon tw-block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw-hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw-select-none 
          tw-mx-2 
          tw-block 
          group-[.is-open]:tw-hidden 
          print:!tw-hidden" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw-block tw-m-0 tw-p-0"><code 
    id="codeblock-id-7" 
    class="
      chroma 
      !tw-block 
      tw-p-0
      tw-m-0
      tw-transition-[max-height] 
      tw-duration-500 
      tw-ease-in-out 
      group-[.is-closed]:!tw-max-h-0 
      group-[.is-wrap]:tw-text-wrap
      tw-overflow-y-hidden
      tw-overflow-x-auto
      tw-scrollbar-thin
      "><span class="line"><span class="cl">y
</span></span><span class="line"><span class="cl">y
</span></span><span class="line"><span class="cl">y
</span></span><span class="line"><span class="cl">y
</span></span><span class="line"><span class="cl"><span class="m">3</span>
</span></span><span class="line"><span class="cl"><span class="m">1</span>
</span></span><span class="line"><span class="cl"><span class="m">2</span>
</span></span><span class="line"><span class="cl"><span class="m">1</span>
</span></span><span class="line"><span class="cl"><span class="m">1</span>
</span></span><span class="line"><span class="cl"><span class="m">1</span>
</span></span><span class="line"><span class="cl"><span class="m">2</span>
</span></span><span class="line"><span class="cl"><span class="m">2</span>
</span></span><span class="line"><span class="cl"><span class="m">3</span> <span class="c1"># change this to 1 if you want to use the style shown in the featured image of this post</span>
</span></span><span class="line"><span class="cl"><span class="m">2</span>
</span></span><span class="line"><span class="cl"><span class="m">2</span>
</span></span><span class="line"><span class="cl"><span class="m">2</span>
</span></span><span class="line"><span class="cl"><span class="m">1</span>
</span></span><span class="line"><span class="cl">y
</span></span><span class="line"><span class="cl"><span class="m">1</span>
</span></span><span class="line"><span class="cl">y</span></span></code></pre>
</div>
<h2 id="conclusion" class="headerLink">
    <a href="#conclusion" class="header-mark"></a>10. Conclusion</h2><p>That&rsquo;s it! You have successfully set up Oh My Zsh with Powerlevel10k and some common plugins. Now you can enjoy a more productive and enjoyable terminal experience. 😁</p>
<p>Any questions or suggestions? Feel free to leave a comment below.</p>]]></description>
</item><item>
    <title>Commemorating the 11th anniversary of meeting Hatsune Miku</title>
    <link>https://blog.mikufancx.cyou/posts/202312/11-anniversary-of-meeting-miku/</link>
    <pubDate>Wed, 20 Dec 2023 00:00:00 -0500</pubDate><author>
                        <name>CXwudi</name><uri>https://linktr.ee/CXwudi</uri><email>charleschen0502@gmail.com</email></author><guid>https://blog.mikufancx.cyou/posts/202312/11-anniversary-of-meeting-miku/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/posts/202312/11-anniversary-of-meeting-miku/101525363_p0.png" referrerpolicy="no-referrer">
            </div><p>This article was originally written last year to commemorate the 10th anniversary of meeting Hatsune Miku, but it was abandoned due to the large scope.</p>
<p>Today, to commemorate the day I met Hatsune Miku 11 years ago on December 20, 2012, I made some modifications and wrote this slightly magical article.</p>
<p><div class="details admonition quote open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"/></svg></span>Featured Image Source<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><strong>Artist</strong>: <a href="https://www.pixiv.net/users/2254287" target="_blank" rel="noopener noreferrer">saihate</a> <!--just to insert a double space behind--><br>
<strong>Source</strong>: <a href="https://www.pixiv.net/artworks/101525363" target="_blank" rel="noopener noreferrer">Pixiv</a></div></div></div>
<div class="details admonition info open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"/></svg></span>Attension<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content">This content is translated from the original Chinses version of the post from this blog through GitHub Copilot translation, and then modified appropriately.
Please forgive me if there are some bugs such as unfluent English sentences.</div></div></div></p>
<h2 id="the-diva-who-illuminates-the-darkness" class="headerLink">
    <a href="#the-diva-who-illuminates-the-darkness" class="header-mark"></a>1. The Diva Who Illuminates the Darkness</h2><p>At that time, I, who was always second to last, was trapped in the abyss called ninth grade, with no expectations for life, and the sky was dark.</p>
<p>On December 20, 2012, the weekly school TV show started, with the theme being anime. The show ended with <a href="https://www.bilibili.com/video/av308040" target="_blank" rel="noopener noreferrer">H.K.君 feai. 洛天依 - 千年食谱颂</a> (The school was quite open-minded back then, playing what was popular in the world of anime at that time. It&rsquo;s impossible to imagine that happening in 2023).</p>
<figure><a href="https://www.bilibili.com/video/BV1Jx411F7tf?t=56.9"><img src="/posts/202312/11-anniversary-of-meeting-miku/image-20221221164311322.png"
    alt="Opening of the 千年食谱颂 PV"></a><figcaption>
      <p>Opening of the 千年食谱颂 PV</p>
    </figcaption>
</figure>

<p>Oh~, her name is Luo Tianyi. This anime character on the right caught my attention, and curiosity drove me to continue searching. I found Luo Tianyi&rsquo;s MMD animation of Senbonzakura (千本桜). Following this clue, I discovered VOCALOID and, of course, Hatsune Miku.</p>
<figure><a href="https://www.bilibili.com/video/BV1Ex411F7Xs?t=56.8"><img src="/posts/202312/11-anniversary-of-meeting-miku/Screenshot_2012-12-26-22-42-43.png"
    alt="The first time I met Miku was in an MMD video featuring Hatsune and Dongfang Zhizi (It&rsquo;s also the earliest screenshot I could find as proof of me knowing Hatsune Miku)"></a><figcaption>
      <p>The first time I met Miku was in an MMD video featuring Hatsune and Dongfang Zhizi (It&rsquo;s also the earliest screenshot I could find as proof of me knowing Hatsune Miku)</p>
    </figcaption>
</figure>

<p>Later on, I found the Project Diva series of games and played Project Diva Extend using <a href="https://github.com/jpcsp/jpcsp" target="_blank" rel="noopener noreferrer">JPCSP</a> (at that time, PPSSPP was only at version 0.6.0 and couldn&rsquo;t run any of the Project Diva PSP games). Although the emulator was laggy and I couldn&rsquo;t even pass the easy difficulty, it didn&rsquo;t stop me from meeting Hatsune Miku.</p>
<p>Through the Project Diva Extend, I got to know the 6 members of Crypton Future Media - Hatsune Miku, Kagamine Rin, Kagamine Len, Megurine Luka, KAITO, and MEIKO.</p>
<p>Nekomimi Switch, Utani Katachi wa Nai Keredo, Sennen no Dokusouka, Just Be Friends, and many more.
Beautiful songs are stored in my phone, played on my way home from school, played during the toughest time preparing for finals, or when doing homework. They shine in the abyss.</p>
<figure><a class="lightgallery" href="/posts/202312/11-anniversary-of-meeting-miku/2022-12-21%2018-05-09.gif" title="" data-thumbnail="/posts/202312/11-anniversary-of-meeting-miku/2022-12-21%2018-05-09.gif" data-sub-html="<h2>I, who don&rsquo;t even know how to take screenshots or understand screen resolutions, try to capture the adorable appearance of Hatsune Miku</h2>"><img  loading="lazy" src='/posts/202312/11-anniversary-of-meeting-miku/2022-12-21%2018-05-09.gif'    height="1262" width="2560"></a><figcaption class="image-caption">I, who don&rsquo;t even know how to take screenshots or understand screen resolutions, try to capture the adorable appearance of Hatsune Miku</figcaption>
    </figure>
<p>When I came to my senses, I realized that I was already sitting in Hatsune Miku&rsquo;s room, admiring her adorable appearance. It was as if a first love had begun, as if a light was illuminating the darkness in the abyss. I gradually fell in love with Hatsune Miku, the diva who was two years older than me at the time.</p>
<p>The pressure was overwhelming, and I couldn&rsquo;t help but grab a corner of Hatsune Miku&rsquo;s clothes and almost cry out, &ldquo;Can you stay by my side?&rdquo;</p>
<p>&ldquo;I am the manifestation of the wishes of all fans and creators, the embodiment of Hatsune Miku from everyone&rsquo;s hearts, so of course I am willing.&rdquo;</p>
<p>At this moment, I no longer feared the darkness, because I had someone to protect in my heart, and the story of turning the tide in the abyss begun.</p>]]></description>
</item><item>
    <title>How to listen old Vocaloid songs</title>
    <link>https://blog.mikufancx.cyou/posts/202305/listen-old-songs/</link>
    <pubDate>Sat, 27 May 2023 17:24:30 -0400</pubDate><author>
                        <name>CXwudi</name><uri>https://linktr.ee/CXwudi</uri><email>charleschen0502@gmail.com</email></author><guid>https://blog.mikufancx.cyou/posts/202305/listen-old-songs/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/posts/202305/listen-old-songs/70473600_p0%20reduced.jpg" referrerpolicy="no-referrer">
            </div><p>You are new to Vocaloid/Miku? You&rsquo;re wondering which songs should you listen first?</p>
<p>Then come read this post and I will introduce you 2 quick ways to get familiar with Vocaloid/Miku 🙂.</p>
<div class="details admonition quote open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"/></svg></span>Featured Image Source<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><strong>Artist</strong>: <a href="https://www.pixiv.net/users/21214140" target="_blank" rel="noopener noreferrer">右の狛犬</a> <!--just to insert a double space behind--><br>
<strong>Source</strong>: <a href="https://www.pixiv.net/artworks/70473600" target="_blank" rel="noopener noreferrer">Pixiv</a></div></div></div>
<h2 id="prerequisites" class="headerLink">
    <a href="#prerequisites" class="header-mark"></a>1. Prerequisites</h2><p>Before we get started, let&rsquo;s make sure you have access to the following sites:</p>
<ul>
<li><a href="https://www.nicovideo.jp/" target="_blank" rel="noopener noreferrer">Niconico</a></li>
<li><a href="https://www.youtube.com/" target="_blank" rel="noopener noreferrer">Youtube</a></li>
</ul>
<p>It&rsquo;s better if you can understand some basic Japanese, or use a translator to understand Japanese.</p>
<h2 id="the-main-idea" class="headerLink">
    <a href="#the-main-idea" class="header-mark"></a>2. The Main Idea</h2><!-- First off, let's all agree that Hatsune Miku and other Vocaloid products are essentially voice synthesizers. So neither does Hatsune Miku "personally" create nor own any music. The Vocaloid Producers are the ones who write Vocaloid songs with the love to Miku ♥.

Numerous Vocaloid songs were created during the Vocaloid history by various Vocaloid Producers. Some of these songs are famous and become the symbol of Vocaloid throughout the years. -->
<p>Vocaloid has been around for 10+ years. Numerous Vocaloid songs were created by various Vocaloid Producers. Some of these songs are famous and become the symbol of Vocaloid throughout the years.</p>
<p>Therefore, <strong>listening famous Vocaloid songs in the history</strong> is the best way to get familiar with Vocaloid.</p>
<!-- The order also matters. It's better to listen them **in the order of release date**. By doing so, you get a feeling of how Vocaloid history goes. -->
<p>Of course, it can&rsquo;t be that easy to get known to Vocaloid history by just listening songs. Hence, when you listen a song, it&rsquo;s also better to search about the background of this song, like the Vocaloid Producer who made that song, the wiki about that song, or any interesting story behind that song. We hope that by searching these information, we can <strong>gather pieces of information and slowly build up the whole picture of Vocaloid history</strong>.</p>
<div class="details admonition tip open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"/></svg></span>Where to search?<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><p>Here are some wiki that might be helpful for you to search any event happened in Vocaloid history, or any information about a particular song:</p>
<ul>
<li><a href="https://vocaloid.fandom.com/wiki/Vocaloid_Wiki" target="_blank" rel="noopener noreferrer">Vocaloid Wiki</a></li>
<li><a href="https://zh.moegirl.org.cn" target="_blank" rel="noopener noreferrer">Moegirl (Chinese)</a></li>
<li><a href="https://dic.nicovideo.jp" target="_blank" rel="noopener noreferrer">ニコニコ大百科 (Japanese)</a></li>
</ul>
<p>Here are some posts about the summary of Vocaloid history, written by other people. Unfortunately, these posts are in Chinese only 😪, and these are old posts, but they are still helpful if you can use a translator like <a href="https://www.deepl.com/en/chrome-extension" target="_blank" rel="noopener noreferrer">DeepL</a>:</p>
<ul>
<li><a href="https://zhuanlan.zhihu.com/p/53643387" target="_blank" rel="noopener noreferrer">VOCALOID圈的故事</a></li>
<li><a href="https://www.zhihu.com/question/47488103/answer/119044265" target="_blank" rel="noopener noreferrer">Vocaloid诞生以来意义重大的创作者有哪些？</a></li>
</ul>
</div></div></div>
<p>Ok, so we get the main idea, but where can we find these famous Vocaloid songs? Well, there are 2 ways.</p>
<h2 id="way-1---the-hall-of-legend-song-list" class="headerLink">
    <a href="#way-1---the-hall-of-legend-song-list" class="header-mark"></a>3. Way 1 - The Hall of Legend song list</h2><p>Talking about a list of famous Vocaloid songs, <a href="https://dic.nicovideo.jp/a/vocaloid%E4%BC%9D%E8%AA%AC%E5%85%A5%E3%82%8A" target="_blank" rel="noopener noreferrer">Hall of Legend</a> is the best candidate. It is a list of songs with 1,000,000 views on <a href="https://www.nicovideo.jp/" target="_blank" rel="noopener noreferrer">Niconico</a>. Here is the list of Hall of Legend:</p>
<div class="details admonition warning">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg></span>About these lists<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content">Unfortunately, some of these lists are in Chinese only. If you know a better alternative site with Japanese or English, let me know in the comment below</div></div></div>
<ul>
<li><a href="https://dic.nicovideo.jp/a/vocaloid%E4%BC%9D%E8%AA%AC%E5%85%A5%E3%82%8A%E3%81%AE%E4%B8%80%E8%A6%A7" target="_blank" rel="noopener noreferrer">VOCALOID伝説入りの一覧</a></li>
<li><a href="https://dic.nicovideo.jp/a/utau%E4%BC%9D%E8%AA%AC%E5%85%A5%E3%82%8A" target="_blank" rel="noopener noreferrer">UTAU伝説入り</a></li>
<li><a href="https://dic.nicovideo.jp/a/cevio%E4%BC%9D%E8%AA%AC%E5%85%A5%E3%82%8A" target="_blank" rel="noopener noreferrer">CeVIO伝説入り</a></li>
</ul>
<p>Similarly we have a YouTube version, but for ten million views: (because hitting 1 million views in Youtube is too easy)</p>
<ul>
<li><a href="https://zh.moegirl.org.cn/VOCALOID%E7%A5%9E%E8%AF%9D%E6%9B%B2/YouTube%E6%8A%95%E7%A8%BF" target="_blank" rel="noopener noreferrer">YouTube上播放数量超过1000万的VOCALOID歌曲</a></li>
</ul>
<p>Nice, we have the song list, but hold on, there are（by the time of writing this post) 800+ songs in the list 😱. We don&rsquo;t have the effort to listen all of them, don&rsquo;t we? So, we can sort the Hall of Legend song list in a certain order, and then based on your patient level, you (as a Miku fan) decide how many songs do you want to listen.</p>
<h3 id="sorting-the-hall-of-legend-song-list" class="headerLink">
    <a href="#sorting-the-hall-of-legend-song-list" class="header-mark"></a>3.1. Sorting the Hall of Legend song list</h3><p>First, let&rsquo;s draw a table like following:</p>

<div class="table-wrapper">
  <table>
    <thead>
        <tr>
            <th style="text-align: ">time of achieving 1M views / publish year</th>
            <th style="text-align: ">2007</th>
            <th style="text-align: ">2008</th>
            <th style="text-align: ">2009</th>
            <th style="text-align: ">&hellip; more years &hellip;</th>
            <th style="text-align: ">The Year before Last Year</th>
            <th style="text-align: ">Last Year</th>
            <th style="text-align: ">This Year</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="text-align: ">&lt;= 100 days</td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: ">&hellip;</td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
        </tr>
        <tr>
            <td style="text-align: ">&lt;= 365 days</td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: ">&hellip;</td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
        </tr>
        <tr>
            <td style="text-align: ">&lt;= 3 or 4 years (up to u decide)</td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: ">&hellip;</td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
        </tr>
        <tr>
            <td style="text-align: ">the rest</td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: ">&hellip;</td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
            <td style="text-align: "></td>
        </tr>
    </tbody>
  </table>
</div>
<blockquote>
  <p>The same table can be used for the YouTube list, but instead of 1M views, we use 10M views, same applied for all &ldquo;1M views&rdquo; mentioned in the rest of this post</p>
</blockquote><p>Basically, we divide the song list into cells based on release date and the time taken to reach 1M views. Next, we walk the table row by row. In each row, we walk the cell from left to right. In each cell, we find songs that satisfy the condition. For example, the first cell is songs that released in 2007 and hit 1M views within 100 days. Then we listen to these songs before moving on to the next cell.</p>
<p>So what is the point of this table? Well, each row has a significate meaning:</p>
<ul>
<li>
<p>First Row: These songs hit 1M views in the very short time (within 100 days). These songs make <strong>great impact to the Vocaloid history</strong>. Hence we should listen to these songs first. Some examples are <a href="https://www.nicovideo.jp/watch/sm1715919" target="_blank" rel="noopener noreferrer">メルト</a>, <a href="https://www.nicovideo.jp/watch/sm15630734" target="_blank" rel="noopener noreferrer">千本桜</a>, <a href="https://www.nicovideo.jp/watch/sm31606995" target="_blank" rel="noopener noreferrer">砂の惑星</a>, <a href="https://www.nicovideo.jp/watch/sm34470195" target="_blank" rel="noopener noreferrer">乙女解剖</a>, and etc.</p>
</li>
<li>
<p>Second Row: These songs hit 1M views within 365 days. A year of time tbh is still a short period. These songs, although are not as famous as the first row, usually becomes <strong>the symbol in the year</strong>. For example, <a href="https://www.nicovideo.jp/watch/sm6909505" target="_blank" rel="noopener noreferrer">magnet</a> from 2009, <a href="https://www.nicovideo.jp/watch/sm21513190" target="_blank" rel="noopener noreferrer">夕景イエスタデイ</a> from 2013, <a href="https://www.nicovideo.jp/watch/sm30469574" target="_blank" rel="noopener noreferrer">太陽系デスコ</a> from 2017, <a href="https://www.nicovideo.jp/watch/sm40349788" target="_blank" rel="noopener noreferrer">まにまに</a> from 2022, and etc.</p>
<div class="details admonition tip open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"/></svg></span>If you are impatient<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><p>The first two rows together around 100~200 songs should be enough to give you a rough understanding of the Vocaloid history.</p>
<p>For those who are impatient, you can stop by here, but I still highly recommend you keep on going to the third row if you can.</p>
</div></div></div>
</li>
<li>
<p>Third Row: This row contains many songs (probably around 300-500?). These songs took a considerable amount of time to reach 1 million views, but still, they achieved that milestone. In this row, you will experience the <strong>different styles of Vocaloid songs from different eras</strong>, showcasing the <strong>diversity of Vocaloid music styles</strong> that has accumulated over the years. That&rsquo;s why I strongly recommend listening to the Vocaloid songs in this row.</p>
</li>
</ul>
<div class="details admonition warning">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg></span>Please be aware of fake views in Niconico<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><p>Some songs have fake views. In another words, some people use bots to massively increase the view count of a song.</p>
<p>To recognize songs with fake views, you can search the wiki of the song and usually it will tell you if the song has fake views or not. Another way of recognizing is to check the favourite count. You can suspect that <strong>any song with 1M views but less than 1000 favourite count potentially has fake views</strong>.</p>
<p>For example, <a href="https://www.nicovideo.jp/watch/sm37828204" target="_blank" rel="noopener noreferrer">片恋歌</a> has only around 100 favourite count, and <a href="https://www.nicovideo.jp/watch/sm30968350" target="_blank" rel="noopener noreferrer">忘れちゃったよ。</a> has less than 1000 favourite count. These two songs are known to have fake views.</p>
<p>In contrast, <strong>in normal situation, a song that just reach 1M views usually have thousands of favourite count</strong>.</p>
</div></div></div>
<p>Upon here, you should be pretty familiar with Vocaloid and know decent amount of famous Vocaloid songs, and even have some understanding of the Vocaloid history. If you are still interested in listening more, or want further understand more about Vocaloid, you can continue the last row, but it is optional.</p>
<h2 id="way-2---music-game" class="headerLink">
    <a href="#way-2---music-game" class="header-mark"></a>4. Way 2 - Music Game</h2><p>Simply following the Hall of Legend song list one song at a time may still be quite tedious, even though we have sorted the list. So is there a more funnier way to listen Vocaloid songs? Fortunately, yes! Let&rsquo;s play music games 😄!</p>
<p>The idea is like this, <strong>if a song is included in a music game, then such song should be quite popular</strong>. So, by playing music games, you get the fun, and at the same time you get known to some popular Vocaloid songs.</p>
<p>The music game that all Miku fans must play (Yes, must play, I am serious) is:</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Hatsune_Miku:_Project_DIVA" target="_blank" rel="noopener noreferrer">初音ミク -Project DIVA- series</a></li>
</ul>
<p>And choose at least one of the following music games to play:</p>
<ul>
<li>Fan-made Project DIVA simulation like <a href="https://projectdxxx.me/" target="_blank" rel="noopener noreferrer">PPD</a> or <a href="https://ph.eirteam.moe/" target="_blank" rel="noopener noreferrer">Project HeartBeat</a>. Or fan-made song packs added on top of official Project DIVA games.</li>
<li><a href="https://osu.ppy.sh/" target="_blank" rel="noopener noreferrer">OSU</a></li>
<li><a href="https://pjsekai.sega.jp/" target="_blank" rel="noopener noreferrer">Project SEKAI</a></li>
<li>Arcade music games like <a href="https://chunithm.sega.jp/" target="_blank" rel="noopener noreferrer">CHUNITHM</a> series or <a href="https://maimai.sega.jp/" target="_blank" rel="noopener noreferrer">maimai</a> series</li>
</ul>
<p>The <strong>drawback</strong> of using music game to get known to famous Vocaloid songs is that you <strong>can&rsquo;t sort songs by release date</strong>. Fortunately, I have a workaround for you for Project DIVA series.</p>
<p>Anyways, let&rsquo;s talk about how can you get familiar with Vocaloid while having fun with music games.</p>
<div class="details admonition note open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"/></svg></span>About this section<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><p>This section is not focusing on teaching how to play these music games. About the guide to a particular music game, please refer to whatever guide you can find online.</p>
<p>This section is more about how to use these music games to get familiar with famous Vocaloid songs.</p>
</div></div></div>
<h3 id="must-play-project-diva-series" class="headerLink">
    <a href="#must-play-project-diva-series" class="header-mark"></a>4.1. Must play: Project DIVA series</h3><p>The best Vocaloid music game is Project DIVA series with no doubt. Here is the image of the Project DIVA series.</p>
<figure><a class="lightgallery" href="/posts/202305/listen-old-songs/unknown.png" title="" data-thumbnail="/posts/202305/listen-old-songs/unknown.png" data-sub-html="<h2>Brife summary of the Project DIVA series</h2>"><img  loading="lazy" src='/posts/202305/listen-old-songs/unknown.png'    height="2178" width="4022"></a><figcaption class="image-caption">Brife summary of the Project DIVA series</figcaption>
    </figure>
<h4 id="two-options" class="headerLink">
    <a href="#two-options" class="header-mark"></a>4.1.1. Two options</h4><p>Project DIVA series included around 250+ songs.</p>
<p>As I said, playing music game can&rsquo;t help to sort songs based on release date. However, we can sort the Project DIVA series based on release date of the game, as each Project DIVA includes the most popular Vocaloid songs of the time. By doing so, we can listen these 250+ songs in a roughly order of release date:</p>

<div class="table-wrapper">
  <table>
    <thead>
        <tr>
            <th style="text-align: ">Title</th>
            <th style="text-align: ">Release Year</th>
            <th style="text-align: ">Platform</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="text-align: ">Project DIVA</td>
            <td style="text-align: ">2009</td>
            <td style="text-align: ">PSP</td>
        </tr>
        <tr>
            <td style="text-align: ">Project DIVA 2nd</td>
            <td style="text-align: ">2010</td>
            <td style="text-align: ">PSP</td>
        </tr>
        <tr>
            <td style="text-align: ">Project DIVA Extend</td>
            <td style="text-align: ">2011</td>
            <td style="text-align: ">PSP</td>
        </tr>
        <tr>
            <td style="text-align: ">Project DIVA F</td>
            <td style="text-align: ">2012</td>
            <td style="text-align: ">PS3, PSV</td>
        </tr>
        <tr>
            <td style="text-align: ">Project DIVA F 2nd</td>
            <td style="text-align: ">2014</td>
            <td style="text-align: ">PS3, PSV</td>
        </tr>
        <tr>
            <td style="text-align: ">Project DIVA X</td>
            <td style="text-align: ">2016</td>
            <td style="text-align: ">PS4, PSV</td>
        </tr>
    </tbody>
  </table>
</div>
<div class="details admonition tip">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"/></svg></span>About these several titles<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><ol>
<li>Project DIVA X is optional if you have X Song Pack mode for Project DIVA MegaMix+ or AFT</li>
<li>Project DIVA on PSP are also ported on PS3, called Project Diva Dreamy Theater series. This series has way better graphic, but require the saving data from the corresponding PSP version to play (which wouldn&rsquo;t be too much a problem if you play on the emulator)</li>
</ol>
</div></div></div>
<div class="details admonition tip">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"/></svg></span>I don&#39;t have PSP/PV3/PSV what should I do?<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content">For PC gamers with no PS platforms, you can use mature simulators on PC for replacement, you can use <a href="https://www.ppsspp.org/" target="_blank" rel="noopener noreferrer">PPSSPP</a> for PSP, <a href="https://rpcs3.net/" target="_blank" rel="noopener noreferrer">RPCS3</a> for PS3, and <a href="https://vita3k.org/" target="_blank" rel="noopener noreferrer">Vita3K</a> for PSV.</div></div></div>
<p>However, if you don&rsquo;t care about the order (which I really don&rsquo;t recommend to do so), you can play one of following masterpiece that include all 250+ songs:</p>
<ul>
<li><a href="https://store.steampowered.com/app/1761390/_Project_DIVA_MEGA39s/" target="_blank" rel="noopener noreferrer">Project DIVA MegaMix+</a>
<ul>
<li>Make sure you buy the VIP version</li>
</ul>
</li>
<li><a href="https://docs.google.com/document/d/1_2qbofpxz9dB7VgfS5WA1uahwE-jmQny55WEyCYedCQ" target="_blank" rel="noopener noreferrer">Project DIVA AFT (Arcade Future Tone)</a>
<ul>
<li>you would need to install MegaMix song pack to get the missing 10+ songs exists in MegaMix+, checkout the X Song Pack in <a href="https://discord.gg/projectDIVA" target="_blank" rel="noopener noreferrer">Project DIVA Modding 2nd</a> Discord server</li>
</ul>
</li>
</ul>
<div class="details admonition tip">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"/></svg></span>MegaMix&#43; vs AFT which one should I choose?<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content">
<div class="table-wrapper">
  <table>
    <thead>
        <tr>
            <th style="text-align: ">Features</th>
            <th style="text-align: ">Project DIVA MegaMix+</th>
            <th style="text-align: ">Project DIVA AFT</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="text-align: ">Is legal</td>
            <td style="text-align: ">Yes</td>
            <td style="text-align: ">No</td>
        </tr>
        <tr>
            <td style="text-align: ">Is free</td>
            <td style="text-align: ">No</td>
            <td style="text-align: ">Yes</td>
        </tr>
        <tr>
            <td style="text-align: ">AMD GPUs</td>
            <td style="text-align: ">Supported</td>
            <td style="text-align: ">Need patches</td>
        </tr>
        <tr>
            <td style="text-align: ">Advanced controller mapping. E.g. map L1,L2,R1,R2 to up,left,down,right respectively</td>
            <td style="text-align: ">Unsupported</td>
            <td style="text-align: ">Supported</td>
        </tr>
    </tbody>
  </table>
</div>
</div></div></div>
<h4 id="drawbacks-of-listening-vocaloid-songs-by-playing-project-diva-only" class="headerLink">
    <a href="#drawbacks-of-listening-vocaloid-songs-by-playing-project-diva-only" class="header-mark"></a>4.1.2. Drawbacks of listening Vocaloid songs by playing Project DIVA only</h4><p>There are two problems if you just use Project DIVA as the source of knowing Vocaloid songs:</p>
<ol>
<li><strong>Not be able to know new songs</strong>: Unfortunately, Project DIVA is already a dead title. Although MegaMix+ is released in 2022, it is pretty much a refresh of Project DIVA FT back in 2016, with only 10+ additional songs released in between 2017 to 2019 (The MegaMix song pack for AFT I mentioned earlier). Songs released in 2020 and after are not included in Project DIVA series at all.</li>
<li><strong>Exclusive to Crypton Future Media (CFM) Vocaloid characters only</strong>: In another word. Project DIVA only contains songs sang by Miku, Rin, Len, Luka, Kaito, Meiko. Other characters like GUMI, IA, V Flower, Una, Kafu, etc are not included, despite they are also famous in Vocaloid history and have a lots of great songs.</li>
</ol>
<p>That&rsquo;s why playing one music game is not enough. We need a second one to fill these gaps.</p>
<h3 id="option-1-fan-made-project-diva-simulation-or-mods" class="headerLink">
    <a href="#option-1-fan-made-project-diva-simulation-or-mods" class="header-mark"></a>4.2. Option 1: Fan-made Project DIVA simulation or mods</h3><!-- In a very long time, Project DIVA series were only available in PS console but not on PC. At that time, we did't ever have runnable simulators mentioned above. So some people made a -->
<p>If you like the game play in Project DIVA, and you don&rsquo;t want to leave Project DIVA to listen new songs, then you can try the following 3 options:</p>
<ol>
<li><strong>PPD</strong>: The first and oldest community-made simulation of Project DIVA on PC. It simulate the game play of Project Diva and brings it onto PC platform. PPD has its own <strong>rich community</strong> that is constantly creating new charts, which can be download from the <a href="https://projectdxxx.me/score-library" target="_blank" rel="noopener noreferrer">PPD official website</a>. Which charts should I play first? Well, that&rsquo;s totally up to you 😁 because a song that worth to be made as a chart is already a quite popular song. Just be aware that there are also non-Vocaloid songs.</li>
<li><strong>Project Heartbeat</strong>: A.k.a PH, similar to PPD but has more advance customization and features. You can find community-made custom charts from Steam Workshop. PH can even <strong>import charts from PPD and Project DIVA MegaMix+</strong>. Hence I personally prefer PH over PPD.</li>
<li><strong>Project DIVA with mods</strong>: Instead of playing a simulation, you can choose to continue playing Project DIVA MegaMix+or AFT on your PC, but with MOD installed. Just head toward <a href="https://discord.gg/projectDIVA" target="_blank" rel="noopener noreferrer">Project DIVA Modding 2nd</a> Discord server and find the mod you want. The modding community is very active and you can find <strong>a large number of song packs</strong> to enrich your song list in Project DIVA MegaMix+ or AFT.</li>
</ol>
<h3 id="option-2-osu" class="headerLink">
    <a href="#option-2-osu" class="header-mark"></a>4.3. Option 2: OSU</h3><p>OSU is a very popular rhythm game. It&rsquo;s barrier is high, but if you can pass that barrier, you will find it very fun to play. OSU is not a Vocaloid specific music game, but it still has a lot of Vocaloid songs. Just like PPD, OSU has a very rich and active community so you can expect constant release of new charts for Vocaloid songs.</p>
<p>You can start by using <a href="https://deardrops.github.io/osu/" target="_blank" rel="noopener noreferrer">Deardrop&rsquo;s Vocaloid song pack</a> as the starting point, which has a whopping of 570 charts.</p>
<div class="details admonition warning open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg></span>About Deardrop&#39;s Vocaloid Song Pack<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><p>The link provides you a download link from BaiduNetdisk (like Chinese Google Drive). Unfortunately, you need a Baidu account to download this song pack.</p>
<p>If you know any other Vocaloid song pack for OSU, please let me know in the comment below and I can include it here</p>
</div></div></div>
<p>Unfortunately, this is the only Vocaloid song pack I can find, and it has not been updated since 2015. However, you can always <a href="https://osu.ppy.sh/beatmapsets?m=0&amp;q=vocaloid&amp;sort=ranked_desc" target="_blank" rel="noopener noreferrer">search &ldquo;Vocaloid&rdquo; on OSU official chart site</a>, and sort results by chart release date to get newest Vocaloid charts.</p>
<h3 id="option-3-project-sekai" class="headerLink">
    <a href="#option-3-project-sekai" class="header-mark"></a>4.4. Option 3: Project SEKAI</h3><p>I personally would not recommend this game as many people including me have bad impression to Project SEKAI, but it is still worth to mention here.</p>
<p>Project SEKAI is a mobile game made by SEGA and released in 2020. Since then, SEGA proactively organize song commission events. Thanks for these events, the Vocaloid society got motivated and contributed a decent amount of songs. Some of them even reached 1M views and became a song in the Hall of Legend song list. Of course, <a href="https://www.sekaipedia.org/wiki/List_of_songs#Commissioned_songs" target="_blank" rel="noopener noreferrer">qualified songs</a> from these commission events became playable in Project SEKAI. So playing Project SEKAI can help you to get known to newer songs which Project DIVA doesn&rsquo;t have, especially those released in 2020 and after.</p>
<p>Unfortunately, Project SEKAI also only include songs from CFM Vocaloid characters, so it doesn&rsquo;t fully solve the problem of playing Project DIVA only 😪.</p>
<p>Another problem with Project SEKAI is that, initially only a few songs are unlocked. To unlock more songs, you have to spend effort and time to play this game, which sometime can be tedious and time-consuming.</p>
<p>Finally, Project SEKAI is a mobile game. So expect pay-to-win elements and Gacha in this game.</p>
<p>Due to these drawbacks, I would recommend to avoid Project SEKAI if possible, but if you really want to stay in Project SEKAI, I recommend you just to buy a second hand Project SEKAI account that has majority of songs unlocked to save yourself some times on unlocking songs.</p>
<h3 id="option-4-arcade-music-games" class="headerLink">
    <a href="#option-4-arcade-music-games" class="header-mark"></a>4.5. Option 4: Arcade music games</h3><blockquote>
  <p>Credit to Bilibili user <a href="https://t.bilibili.com/806184517024874530#reply250521161" target="_blank" rel="noopener noreferrer">夜轮_Nightwheel</a> for pointing out CHUNITHM and maimai</p>
</blockquote><p>If arcade machines are available near your place, then try <a href="https://chunithm.sega.jp/" target="_blank" rel="noopener noreferrer">CHUNITHM</a> series and <a href="https://maimai.sega.jp/" target="_blank" rel="noopener noreferrer">maimai</a> series.</p>
<p>Both series have 200+ Vocaloid songs each even though they are not Vocaloid specific (just like OSU). Not only that, both series are still proactively maintained (by SEGA. Yes, the same company who made Project DIVA series), and are not limited to Crypton Future Media (CFM) Vocaloid characters only. so you don&rsquo;t need to worry about <a href="#drawbacks-of-listening-vocaloid-songs-by-playing-project-diva-only" rel="">the two problems of Project DIVA</a> mentioned above when playing CHUNITHM series or maimai series.</p>
<p>Obviously, the biggest disadvantage is that you need an arcade machine, which is only available in a few cities in the world unfortunately.</p>
<h2 id="way-3--way-2--way-1" class="headerLink">
    <a href="#way-3--way-2--way-1" class="header-mark"></a>5. Way 3 = Way 2 + Way 1</h2><p>Nothing prevent you from combining <a href="#way-1---the-hall-of-legend-song-list" rel="">Way 1</a> and <a href="#way-2---music-game" rel="">Way 2</a> together. You can start by playing Project DIVA, then you go to <a href="#way-1---the-hall-of-legend-song-list" rel="">Way 1</a> and listen to songs that are not included in Project DIVA. Chance is that Project DIVA can save you a lots of time listening songs released in 2017 and before, so that you can focus on listening songs released after 2017.</p>
<blockquote>
  <p>This is also how I get familiar in Vocaloid 😂</p>
</blockquote><h2 id="summary" class="headerLink">
    <a href="#summary" class="header-mark"></a>6. Summary</h2><p>Basically, you have two ways to find famous Vocaloid songs. You can either listen famous Vocaloid songs one by one in a certain order, or play music games. Of course, you can combine both ways. No matter what way you choose, you can become familiar with Vocaloid and the history.</p>
<p>That&rsquo;s all for this post. I hope you like it and find it helpful. If you have any questions or suggestions, please leave a comment below, or click on the &ldquo;Report issue&rdquo; link below to leave a comment in the GitHub Discussions. Any feedback is welcome.</p>]]></description>
</item><item>
    <title>ようこそ、私のブログへ (Welcome to my blog)</title>
    <link>https://blog.mikufancx.cyou/posts/202207/hello-world/</link>
    <pubDate>Thu, 28 Jul 2022 16:54:05 -0400</pubDate><author>
                        <name>CXwudi</name><uri>https://linktr.ee/CXwudi</uri><email>charleschen0502@gmail.com</email></author><guid>https://blog.mikufancx.cyou/posts/202207/hello-world/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/posts/202207/hello-world/%E3%80%82%CB%9A%E3%80%82%E2%97%8B_tiahszld_201811301255.jpg" referrerpolicy="no-referrer">
            </div><p>Hello world! Welcome to my blog.</p>
<div class="details admonition quote open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"/></svg></span>Featured Image Source<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content"><strong>Artist</strong>: <a href="https://www.pixiv.net/users/1589657" target="_blank" rel="noopener noreferrer">hakusai</a> <!--just to insert a double space behind--><br>
<strong>Source</strong>: <a href="https://twitter.com/i/web/status/715539983071731712" target="_blank" rel="noopener noreferrer">Twitter</a></div></div></div>
<h2 id="intro" class="headerLink">
    <a href="#intro" class="header-mark"></a>1. Intro</h2><p>Today I am very happy to announce that my blog is publicly available. 🎉</p>
<p>All contents and the site configuration are available at the <a href="https://github.com/CXwudi/personal-blog-source" target="_blank" rel="noopener noreferrer">GitHub repository</a> too.</p>
<p>The blog has:</p>
<ul>
<li>Dark theme</li>
<li>i18n</li>
<li>Comment system</li>
<li>RSS supports with full content</li>
</ul>
<p>The blog is generated by <a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a> using this beautiful Hugo theme, <a href="https://github.com/HEIGE-PCloud/DoIt" target="_blank" rel="noopener noreferrer">DoIt</a> (Sincerely thanks for <a href="https://github.com/HEIGE-PCloud" target="_blank" rel="noopener noreferrer">HEIGE-PCloud</a> for maintaining this Hugo theme). In fact, the way I setup my blog is very similar to the way how <a href="https://github.com/HEIGE-PCloud/DoIt/tree/main/exampleSite" target="_blank" rel="noopener noreferrer">DoIt&rsquo;s official demo</a> setups. The blog is hosted on Vercel, which is visible from China&rsquo;s mainland. So in theory, friends from China mainland should be able to visit my blog without VPNs or proxies.</p>
<h2 id="why-do-i-need-a-blog" class="headerLink">
    <a href="#why-do-i-need-a-blog" class="header-mark"></a>2. Why do I need a blog?</h2><div class="details admonition note open">
    <div class="details-summary admonition-title">
        <span class="icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"/></svg></span>About links in this section<span class="details-icon"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg></span>
    </div>
    <div class="details-content">
        <div class="admonition-content">Unfortunately, all links in this section are in Chinese. While feeling sorry for non-Chinses speakers, you may want to use the browser&rsquo;s built-in translation feature to translate the contents.</div></div></div>
<p>I write posts, but only friends in WeChat Moments can see them. I really hope there exists a platform where all friends of mine from overall the world can see my posts. In another word, A WeChat Moments but globalized.
Not only that, I&rsquo;d like to write in different languages so friends from both China and Canada can read my post easily. That&rsquo;s why building a blog with i18n support becomes the best solution.
The only downside is the privacy concern. Since the blog is publicly available on the internet, you can’t share something sensitive or too emotional on the blog. Fortunately, I am not the type of person who likes to share too much.</p>
<p>Well, talking about post writing, maybe some people would recommend: why not WordPress? Bilibili posts? Or Medium? Or Zhihu? Or whatever platform?</p>
<p>So here comes the second reason why I need to build my own blog, instead of using the existing platform. The harsh reality is that <strong>Internet has no memory</strong>. Please take a look at the first section of <a href="https://mp.weixin.qq.com/s/733a3gDW2F8B65joRrypMw" target="_blank" rel="noopener noreferrer">this article</a>. Posts you published just mean money and view count for those service providers. Once the value is gone, they delete your posts for their convenience.
What&rsquo;s even worse is that <a href="https://mp.weixin.qq.com/s/oY2ITkqebpKeLS3QEYviVg" target="_blank" rel="noopener noreferrer">this article</a> and <a href="https://zhuanlan.zhihu.com/p/367880098" target="_blank" rel="noopener noreferrer">this sue case</a> have pointed out: <strong>You never owned your accounts!</strong> Service providers like Google, Baidu have the absolute right of managing your accounts, and they can ban or delete your account whenever they want without notification (Now, I somehow understand why people are promoting Web3.0).</p>
<p>So how to gain back the true ownership of your contents? The answer is building your own blog. How to make your post stays longer on internet? The answer is hosting the blog yourself. Can we avoid building a blog from scratch using Angular, React, Vue or whatever frontend frameworks? Fortunately, yes! We have static site generators, like Hexo, Hugo, etc.
The static site generator handles the generation of the source code of your blog so that you can focus on content creation without worrying about the code. (Well, you still need to spend the effort to choose and setup the theme to prettify your blog, but trust me, it is worth the time as there are many great themes with rich features you can choose from to fulfill your needs.)</p>
<p>With the static site generator, I am able to manage everything about my blog on my PC locally, but I still need to host the blog on the internet. For this, I chose GitHub and Vercel. Although I should worry about being banned on GitHub just like <a href="https://v2ex.com/t/836086" target="_blank" rel="noopener noreferrer">this post</a> and <a href="https://yuukoamamiya.github.io/p/%E5%85%B3%E4%BA%8E%E6%88%91%E8%A2%ABgithub%E5%B0%81%E5%8F%B7%E8%BF%99%E4%BB%B6%E4%BA%8B/" target="_blank" rel="noopener noreferrer">this post</a>,
there are many great alternatives to GitHub and Vercel I can choose from. In the worst-case scenario, I can self-hosted my blog from my own home lab.
Now don’t get me wrong, I am not promoting sharing illegal contents or anything violating the law, but who knows if one day your GitHub account would get banned for no reason and without any warning.</p>
<h2 id="so-what-contents-am-i-going-to-post-in-the-future" class="headerLink">
    <a href="#so-what-contents-am-i-going-to-post-in-the-future" class="header-mark"></a>3. So what contents am I going to post in the future?</h2><p>I got this covered😉. Simply take a look at the <a href="/about/#about-this-blog" rel="">About page</a> of this blog.</p>
<p>Although I can’t guarantee the frequency of writings, feel free to follow my blog, and hopefully we&rsquo;ll meet again.</p>]]></description>
</item></channel>
</rss>
