Skip to content

Commit

Permalink
Drop feature: Mojo DSL (#279)
Browse files Browse the repository at this point in the history
Resolves #209
  • Loading branch information
britter committed Jan 3, 2025
1 parent a72c1d8 commit 88af094
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 503 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Lower versions of Gradle might be supported but are not tested.
* [Fixed] [#212](https://github.com/britter/maven-plugin-development/issues/212) Drop feature: Finding mojos in project dependencies.
The plugin no longer searches for mojo implementations in dependent projects since this is not the way of modelling aggregation of build results in Gradle.
Users who rely on this use case should instead apply this plugin to all projects with mojo implementations, set up a variant that exposes the descriptor, and then merge all exposed descriptor variants in an aggregator project.
* [Fixed] [209](https://github.com/britter/maven-plugin-development/issues/209) Drop feature: Mojo DSL.
This feature was dropped without replacement.
Annotate mojos using annotations defined in `org.apache.maven.plugin-tools:maven-plugin-annotations` instead of declaring them in your build script.

## Version 0.4.3

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@

package de.benediktritter.maven.plugin.development

import org.gradle.api.Action
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.artifacts.Configuration
import org.gradle.api.provider.Property
import org.gradle.api.tasks.SourceSet

interface MavenPluginDevelopmentExtension {

Expand Down Expand Up @@ -48,10 +45,6 @@ interface MavenPluginDevelopmentExtension {

val helpMojoPackage: Property<String>

val mojos: NamedDomainObjectContainer<out MavenMojo>

fun mojos(action: Action<in NamedDomainObjectContainer<out MavenMojo>>)

/**
* The set of dependencies to add to the plugin descriptor.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class MavenPluginDevelopmentPlugin : Plugin<Project> {
extension.goalPrefix.orNull
)
})
additionalMojos.set(extension.mojos)
runtimeDependencies.set(extension.dependencies)

dependsOn(main.output, generateHelpMojoTask)
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@

package de.benediktritter.maven.plugin.development.internal

import de.benediktritter.maven.plugin.development.MavenMojo
import de.benediktritter.maven.plugin.development.MavenPluginDevelopmentExtension
import org.gradle.api.Action
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.provider.Property
import org.gradle.api.tasks.SourceSet
import org.gradle.api.tasks.SourceSetContainer
import org.gradle.kotlin.dsl.*
import javax.inject.Inject

Expand Down Expand Up @@ -52,10 +49,6 @@ open class DefaultMavenPluginDevelopmentExtension @Inject constructor(project: P

override val helpMojoPackage: Property<String> = project.objects.property()

override val mojos: NamedDomainObjectContainer<DefaultMavenMojo> = project.objects.domainObjectContainer(DefaultMavenMojo::class.java)

override fun mojos(action: Action<in NamedDomainObjectContainer<out MavenMojo>>) = action.execute(mojos)

override val dependencies: Property<Configuration> = project.objects.property<Configuration>()
.convention(project.provider { project.configurations["runtimeClasspath"] })
}
Expand Down
Loading

0 comments on commit 88af094

Please # to comment.