Skip to content

Commit

Permalink
rename hello plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
countableSet committed Apr 22, 2022
1 parent 64ffd82 commit b1f7d2e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
14 changes: 6 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,22 @@ plugins {
`java-gradle-plugin`
// id("org.gradle.kotlin.kotlin-dsl") version "2.3.3"
kotlin("jvm") version "1.6.21"
// id("dev.poolside.gradle.semantic-version") version "0.1.0"
}

//apply<HelloWorldPlugin>()

//group = "dev.poolside.gradle.semantic-version"
//version = "0.1.0"

repositories {
mavenCentral()
}

dependencies {
testImplementation(kotlin("test"))
testImplementation(platform("org.junit:junit-bom:5.8.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
}

gradlePlugin {
plugins {
create("semanticVersionPlugin") {
id = "dev.poolside.gradle.semantic-version"
implementationClass = "dev.poolside.gradle.semanticversion.HelloWorldPlugin"
implementationClass = "dev.poolside.gradle.semanticversion.SemanticVersionPlugin"
version = "0.1.0"
}
}
Expand All @@ -31,6 +26,9 @@ gradlePlugin {
tasks {
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package dev.poolside.gradle.semanticversion
import org.gradle.api.Plugin
import org.gradle.api.Project

class HelloWorldPlugin : Plugin<Project> {
class SemanticVersionPlugin : Plugin<Project> {
override fun apply(project: Project) {
project.task("hello") {
project.tasks.create("semanticVersion") {
println("Hello from the GreetingPlugin")
// doLast {
// println("Hello from the GreetingPlugin")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.junit.jupiter.api.Test
import org.junit.jupiter.api.io.TempDir
import java.io.File

class HelloWorldPluginTest {
class SemanticVersionPluginTest {

@TempDir
lateinit var testProjectDir: File
Expand All @@ -23,7 +23,7 @@ class HelloWorldPluginTest {
val result = GradleRunner.create()
.withPluginClasspath()
.withProjectDir(testProjectDir)
.withArguments("hello")
.withArguments("semanticVersion")
.build()
println(result.output)
}
Expand Down

0 comments on commit b1f7d2e

Please sign in to comment.