Class GithubPackagesPlugin

java.lang.Object
io.github.duckasteroid.gradle.githubpackages.GithubPackagesPlugin
All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>

public class GithubPackagesPlugin extends Object implements org.gradle.api.Plugin<org.gradle.api.Project>
Gradle project plugin that configures an authenticated GitHub Packages Maven repository.

Apply it to a project and configure the extension:


 plugins {
     id 'io.github.duckasteroid.github-packages'
 }

 githubPackages {
     owner      = 'my-org'
     repository = 'my-repo'
 }
 

The plugin will:

  • Add the GitHub Packages Maven URL to repositories (for dependency resolution).
  • If the maven-publish plugin is present, add the same URL to publishing.repositories.
  • Constructor Details

    • GithubPackagesPlugin

      public GithubPackagesPlugin()
  • Method Details

    • apply

      public void apply(org.gradle.api.Project project)
      Specified by:
      apply in interface org.gradle.api.Plugin<org.gradle.api.Project>