Skip to content

Commit

Permalink
Change package name and add gradle publish plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mikethebeer committed Oct 14, 2023
1 parent 69f385a commit c7ace8a
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Apply the plugin to your Kustomize project in the `build.gradle.kts` file:

```kotlin
plugins {
id("at.mibe.gradle.kdiff") version "0.1.0"
id("io.github.mikethebeer.gradle.kdiff") version "0.1.0"
}
```

Expand Down
2 changes: 1 addition & 1 deletion cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ dependencies {
}

application {
mainClass = "at.mibe.kdiff.ApplicationKt"
mainClass = "io.github.mikethebeer.kdiff.ApplicationKt"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package at.mibe.kdiff
package io.github.mikethebeer.kdiff

fun main(args: Array<String>) = KDiffCommand().main(args)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package at.mibe.kdiff
package io.github.mikethebeer.kdiff

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.arguments.argument
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package at.mibe.kdiff
package io.github.mikethebeer.kdiff

import com.github.difflib.DiffUtils
import com.github.difflib.patch.Patch
Expand Down
2 changes: 1 addition & 1 deletion example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
base
// Apply the Kotlin JVM plugin to add support for Kotlin.
kotlin("jvm") version "1.9.0"
id("at.mibe.gradle.kdiff")
id("io.github.mikethebeer.gradle.kdiff")
id("com.lovelysystems.gradle") version ("1.12.0")
}

Expand Down
12 changes: 9 additions & 3 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
`java-gradle-plugin`
kotlin("jvm") version "1.9.0"
id("de.undercouch.download") version "5.5.0"
id("com.gradle.plugin-publish") version "1.2.1"
}

repositories {
Expand All @@ -16,12 +17,17 @@ dependencies {
}

gradlePlugin {
website = "https://github.com/mikethebeer/gradle-kdiff"
vcsUrl = "https://github.com/mikethebeer/gradle-kdiff"
// Define the plugin
val kDiff by plugins.creating {
id = "at.mibe.gradle.kdiff"
implementationClass = "at.mibe.gradle.kdiff.GradleKDiffPlugin"
id = "io.github.mikethebeer.gradle.kdiff"
implementationClass = "io.github.mikethebeer.gradle.kdiff.GradleKDiffPlugin"
version = rootProject.version
group = "at.mibe"
group = "io.github.mikethebeer"
displayName = "Gradle KDiff Plugin"
description = "A plugin to download and install KDiff"
tags = listOf("kdiff", "kustomize", "diff", "plugin")
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package at.mibe.gradle.kdiff
package io.github.mikethebeer.gradle.kdiff

import java.io.File
import kotlin.test.assertTrue
Expand All @@ -19,7 +19,7 @@ class GradleKDiffPluginFunctionalTest {
settingsFile.writeText("")
buildFile.writeText("""
plugins {
id("at.mibe.gradle.kdiff")
id("io.github.mikethebeer.gradle.kdiff")
}
""".trimIndent())

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package at.mibe.gradle.kdiff
package io.github.mikethebeer.gradle.kdiff

import de.undercouch.gradle.tasks.download.Download
import org.gradle.api.Plugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package at.mibe.gradle.kdiff
package io.github.mikethebeer.gradle.kdiff

import org.gradle.testfixtures.ProjectBuilder
import kotlin.test.Test
Expand All @@ -8,7 +8,7 @@ class GradleKDiffPluginTest {
@Test fun `plugin registers task`() {
// Create a test project and apply the plugin
val project = ProjectBuilder.builder().build()
project.plugins.apply("at.mibe.gradle.kdiff")
project.plugins.apply("io.github.mikethebeer.gradle.kdiff")

// Verify the result
assertNotNull(project.tasks.findByName("kDiffVersion"))
Expand Down

0 comments on commit c7ace8a

Please sign in to comment.