code-examples/2024/11/gradle_plugin_demo1/build.gradle.kts

47 lines
839 B
Kotlin

plugins {
id("pl.polgrabia.demos.plugins.gradle_plugin_demo1") version "1.0-SNAPSHOT"
// id("java")
// id("com.gradle.plugin-publish") version "1.2.1"
id("maven-publish")
id("java-gradle-plugin")
kotlin("jvm") version "2.0.20"
}
group = "pl.polgrabia.demos.plugins"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(21)
}
gradlePlugin {
plugins {
create("gradle_plugin_demo1") {
id = "pl.polgrabia.demos.plugins.gradle_plugin_demo1"
implementationClass = "pl.polgrabia.demos.plugins.DemoPlugin"
}
}
}
publishing {
repositories {
mavenLocal()
}
}
gradle_demo_plugin {
inputParameter = "Hoi"
}