Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Contributor interface and enable custom contributors in Maven publications #51

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

teogor
Copy link
Owner

@teogor teogor commented Feb 19, 2024

Integrate Contributor interface and enable custom contributors in Maven publications

This pull request introduces the Contributor interface and its implementation ContributorImpl to provide more flexibility and customization for representing contributors in Maven publications compared to the existing MavenPomContributor.

Key improvements:

  • Flexible contributor information: Define contributor details like name, email, URL, organization, roles, timezone, and optional custom properties using key-value pairs.
  • Easier usage: Add contributors directly to the mavenPublish block like addContributor(TeogorContributor()).
  • Kotlin data class: Leverages Kotlin data classes for concise and expressive contributor representation.

Example usage:

winds {
  mavenPublish {
    // Existing configuration...

    // Add a custom contributor (replace with your actual contributor):
    addContributor(TeogorContributor())
  }
}

TeogorContributor implementation:

This example TeogorContributor class demonstrates how to utilize the Contributor interface with pre-defined information:

data class TeogorContributor(
  override val name: String = "Teodor Grigor",
  override val email: String = "[email protected]",
  override val url: String = "[https://teogor.dev](https://teogor.dev)",
  override val roles: List<String> = listOf("Code Owner", "Developer", "Designer", "Maintainer"),
  override val timezone: String = "UTC+2",
  override val organization: String = "Teogor",
  override val organizationUrl: String = "[https://github.com/teogor](https://github.com/teogor)",
  override val properties: Map<String, String> = emptyMap(),
) : Contributor

Changes:

  • This PR introduces the Contributor interface and its implementation ContributorImpl.
  • Existing code using MavenPomContributor needs to be updated to use the new Contributor interface.

We believe this improvement enhances flexibility and maintainability for contributor management in Maven publications.

@teogor teogor added @priority-medium @feature New feature or request labels Feb 19, 2024
@teogor teogor added this to the 1.0.0-beta02 milestone Feb 19, 2024
@teogor teogor self-assigned this Feb 19, 2024
@teogor teogor merged commit 0bca447 into main Feb 19, 2024
4 checks passed
@zeobot zeobot bot deleted the feature/maven-contributor branch February 19, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@feature New feature or request @priority-medium
Projects
Development

Successfully merging this pull request may close these issues.

1 participant