To publish to MavenLocal:
./gradlew publish
In the calling project,
Apply the gradle plugin in gradle.build.kts
:
plugins {
id("com.irenedea.template") version "0.1.0-SNAPSHOT"
// ... other plugins
}
// ... the rest of the build file
Make sure MavenLocal is listed as one of the gradle plugin repositories in settings.gradle.kts
:
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
}
}
// ... the rest of the settings file
To build IDE plugin zip:
./gradlew buildPlugin
The plugin zip should be in ide-plugin/build/distributions
.
Note: Occasionally this will error, but running it ./gradlew clean buildPlugin
again seems to work. 🤷🏻♀️
In the calling project,
In IntelliJ, Go to IntelliJ IDEA > Preferences... > Plugins > (Settings Logo in top bar) > Install Plugin from Disk...
,
select the plugin zip, and restart IntelliJ to enable the plugin.
Here are some resources for developing compiler plugins:
- Brian Norman's Kotlin IR Plugin Template and his compiler plugin blog series.
- Kotlin Lang Slack
- Google Compose compiler plugin and IDE plugin
- Kotlin Serialization Plugin
- IntelliJ Platform Plugin Template