generates META-INF/gradle-plugins/<pulgin-name>.properties
files for classes annotated with GradlePlugin
TransformPlugin.kt:
package com.satori.libs.gradle.transform
import com.satori.libs.gradle.plugin.annotations.*
import org.gradle.api.*
@GradlePlugin(TransformPlugin.name)
open class TransformPlugin : Plugin<Project> {
override fun apply(project: Project) {
val conv = TransformPluginConvention(project)
project.convention.plugins[name] = conv
}
companion object {
const val name = "com.satori.transform"
}
}
build.gradle:
apply plugin: "kotlin-kapt"
kapt {
generateStubs = true
correctErrorTypes = true
}
dependencies {
compileOnly "com.satori:satori-libs-gradle-plugin-annotations:0.5.82-SNAPSHOT"
kapt "com.satori:satori-libs-gradle-plugin-processor:0.5.82-SNAPSHOT"
}
<repository>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<dependency>
<groupId>com.satori</groupId>
<artifactId>satori-libs-gradle-plugin-processor</artifactId>
<version>0.5.82-SNAPSHOT</version>
</dependency>