diff --git a/README.md b/README.md index 2cf3c714..e416bb91 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ tasks.register("describe") { ## More Performant Usage in Gradle -Apply the `org.ajoberstar.grgit-service` plugin instead of `org.ajoberstar.grgit` to avoid eagerly resolving the `Grgit` instance. This works best with custom tasks that accept a `Property`. +Apply the `org.ajoberstar.grgit.service` plugin instead of `org.ajoberstar.grgit` to avoid eagerly resolving the `Grgit` instance. This works best with custom tasks that accept a `Property`. This approach ensures you only open a `Grgit` instance when a task is run that uses it. @@ -79,7 +79,7 @@ This approach ensures you only open a `Grgit` instance when a task is run that u import org.ajoberstar.grgit.gradle.GrgitService plugins { - id 'org.ajoberstar.grgit-service' version '' + id 'org.ajoberstar.grgit.service' version '' } tasks.register("describe", DescribeTask) { @@ -106,7 +106,7 @@ class DescribeTask extends DefaultTask { If you are writing a custom Gradle plugin, you'll want to use one or both of the following approaches: -- If you need a `Grgit` instance representing the repository the project is in, use `org.ajoberstar.grgit-service` and use the `GrgitServiceExtension` to access the shared `GrgitService`. Wire this into any tasks or whatever needs to use the service via `Property` for full lazy evaluation benefits. +- If you need a `Grgit` instance representing the repository the project is in, use `org.ajoberstar.grgit.service` and use the `GrgitServiceExtension` to access the shared `GrgitService`. Wire this into any tasks or whatever needs to use the service via `Property` for full lazy evaluation benefits. - If you need a `Grgit` instance that's separate from the project's repository, declare your own `GrgitService` naming it something _not_ prefixed with `grgit*`. ``` diff --git a/grgit-core/build.gradle.kts b/grgit-core/build.gradle.kts index 4e5e29be..c5ffab4a 100644 --- a/grgit-core/build.gradle.kts +++ b/grgit-core/build.gradle.kts @@ -7,6 +7,13 @@ plugins { group = "org.ajoberstar.grgit" description = "The Groovy way to use Git" +mavenCentral { + developerName.set("Andrew Oberstar") + developerEmail.set("ajoberstar@gmail.com") + githubOwner.set("ajoberstar") + githubRepository.set("grgit") +} + java { toolchain { languageVersion.set(JavaLanguageVersion.of(11)) diff --git a/grgit-gradle/build.gradle.kts b/grgit-gradle/build.gradle.kts index fa6a0b40..41252701 100644 --- a/grgit-gradle/build.gradle.kts +++ b/grgit-gradle/build.gradle.kts @@ -8,6 +8,13 @@ plugins { group = "org.ajoberstar.grgit" description = "The Groovy way to use Git" +mavenCentral { + developerName.set("Andrew Oberstar") + developerEmail.set("ajoberstar@gmail.com") + githubOwner.set("ajoberstar") + githubRepository.set("grgit") +} + java { toolchain { languageVersion.set(JavaLanguageVersion.of(11)) @@ -65,7 +72,7 @@ gradlePlugin { implementationClass = "org.ajoberstar.grgit.gradle.GrgitPlugin" } create("grgitServicePlugin") { - id = "org.ajoberstar.grgit-service" + id = "org.ajoberstar.grgit.service" displayName = "The Groovy way to use Git (BuildService edition)" description = "The Groovy way to use Git (BuildService edition)" implementationClass = "org.ajoberstar.grgit.gradle.GrgitServicePlugin" diff --git a/grgit-gradle/src/compatTest/groovy/org/ajoberstar/grgit/gradle/GrgitServicePluginCompatTest.groovy b/grgit-gradle/src/compatTest/groovy/org/ajoberstar/grgit/gradle/GrgitServicePluginCompatTest.groovy index b776dc0c..b3206041 100644 --- a/grgit-gradle/src/compatTest/groovy/org/ajoberstar/grgit/gradle/GrgitServicePluginCompatTest.groovy +++ b/grgit-gradle/src/compatTest/groovy/org/ajoberstar/grgit/gradle/GrgitServicePluginCompatTest.groovy @@ -20,7 +20,7 @@ class GrgitServicePluginCompatTest extends Specification { import org.ajoberstar.grgit.gradle.GrgitService plugins { - id 'org.ajoberstar.grgit-service' + id 'org.ajoberstar.grgit.service' } tasks.register("doStuff", DoStuffTask.class) { diff --git a/grgit-gradle/src/main/java/org/ajoberstar/grgit/gradle/GrgitPlugin.java b/grgit-gradle/src/main/java/org/ajoberstar/grgit/gradle/GrgitPlugin.java index bafe5b40..2d77162f 100644 --- a/grgit-gradle/src/main/java/org/ajoberstar/grgit/gradle/GrgitPlugin.java +++ b/grgit-gradle/src/main/java/org/ajoberstar/grgit/gradle/GrgitPlugin.java @@ -8,7 +8,7 @@ /** * Plugin adding a {@code grgit} property to all projects that searches for a Git repo from the * project's directory. - * + * * @since 2.0.0 */ public class GrgitPlugin implements Plugin { @@ -17,7 +17,7 @@ public void apply(Project project) { project.getPluginManager().apply(GrgitServicePlugin.class); var serviceExtension = project.getExtensions().getByType(GrgitServiceExtension.class); try { - project.getLogger().info("The org.ajoberstar.grgit plugin eagerly opens a Grgit instance. Use org.ajoberstar.grgit-service for better performance."); + project.getLogger().info("The org.ajoberstar.grgit plugin eagerly opens a Grgit instance. Use org.ajoberstar.grgit.service for better performance."); project.getExtensions().add(Grgit.class, "grgit", serviceExtension.getService().get().getGrgit()); } catch (Exception e) { project.getLogger().debug("Failed to open Grgit instance", e);