{"id":18419489,"url":"https://github.com/liftric/code-artifact-repository-plugin","last_synced_at":"2025-04-07T13:31:35.637Z","repository":{"id":43185401,"uuid":"510383944","full_name":"Liftric/code-artifact-repository-plugin","owner":"Liftric","description":"Gradle plugin to apply AWS CodeArtifact repositories","archived":false,"fork":false,"pushed_at":"2024-08-09T11:18:49.000Z","size":99,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T03:30:00.245Z","etag":null,"topics":["aws","codeartifact","gradle","maven","plugin","repository"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Liftric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-04T14:07:04.000Z","updated_at":"2024-08-09T09:03:26.000Z","dependencies_parsed_at":"2024-04-09T14:02:51.333Z","dependency_job_id":"1e47a6b6-e689-45af-a8a6-65cfa95c3e1b","html_url":"https://github.com/Liftric/code-artifact-repository-plugin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Fcode-artifact-repository-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Fcode-artifact-repository-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Fcode-artifact-repository-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Fcode-artifact-repository-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Liftric","download_url":"https://codeload.github.com/Liftric/code-artifact-repository-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247661748,"owners_count":20975110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","codeartifact","gradle","maven","plugin","repository"],"created_at":"2024-11-06T04:17:12.689Z","updated_at":"2025-04-07T13:31:35.240Z","avatar_url":"https://github.com/Liftric.png","language":"Kotlin","readme":"# Code Artifact Repository Plugin\n\nConvenience plugin to apply AWS CodeArtifact repositories to your Gradle project.\n\nConfigure the plugin extension either in the settings.gradle.kts or build.gradle.kts and then apply your repositories.\n\n```kotlin\nplugins {\n    id(\"com.liftric.code-artifact-repository-plugin\") version \"\u003clatest\u003e\"\n}\n\ncodeArtifactRepository {\n    region.set(Region.EU_CENTRAL_1)\n    // use profile credentials provider, otherwise the default credentials chain of aws will be used\n    profile.set(\"liftric\")\n    // Determines how long the generated authentication token is valid in seconds\n    tokenExpiresIn.set(1_800)\n}\n\ndependencyResolutionManagement {\n    repositories {\n        codeArtifact(\"my_domain\", \"my_repository\")\n        codeArtifact(\"my_other_domain\", \"my_other_repository\")\n    }\n}\n```\n\nYou can also use multiple CodeArtifact endpoints:\n```kotlin\nplugins {\n    id(\"com.liftric.code-artifact-repository-plugin\") version \"\u003clatest\u003e\"\n}\n\ncodeArtifactRepository {\n    region.set(Region.EU_CENTRAL_1)\n    profile.set(\"liftric\")\n    additional(\"customer1\") {\n        profile.set(\"customer1\")\n        // reuses properties of the default extension if not explicitly specified\n    }\n    additional(\"customer2\") {\n        // if a profile is not available you can also provide the credentials directly\n        accessKeyId.set(System.getenv(\"CUSTOMER2_AWS_ACCESS_KEY_ID\"))\n        secretAccessKey.set(System.getenv(\"CUSTOMER2_AWS_SECRET_ACCESS_KEY\"))\n        // reuses properties of the default extension if not explicitly specified\n    }\n}\n\ndependencyResolutionManagement {\n    repositories {\n        // uses the default extension (liftric profile)\n        codeArtifact(domain = \"my_domain\", repository = \"my_repository\")\n        // uses the customer1 extension (customer1 profile)\n        codeArtifact(additionalName = \"customer1\", domain = \"my_other_domain\", repository = \"my_other_repository\")\n    }\n}\n```\n\nYou can also just get the token and endpoint, if you wan't to configure something different, like https://npm-publish.petuska.dev/:\n\n```kotlin\nval token = codeArtifactToken(domain = \"my_domain\")\nval uri = codeArtifactUri(domain = \"my_domain\", repository = \"my_repository\")\n```\n\n## Use from gradle init script\nThe plugin can also be used during gradle init time.\n\nThe example (the `init.gradle.kts` file) configures a custom plugin repository, in our case used for a custom and private fargate plugin which is hosted\nin a private code artifact repository.\n\n**Note:** We have to use a gradle init script, no other way to apply the CodeArtifactRepositoryPlugin before the pluginManagement block inside a `settings.gradle.kts` file.\n\n```\nimport com.liftric.code.artifact.repository.codeArtifact\nimport com.liftric.code.artifact.repository.codeArtifactRepository\nimport software.amazon.awssdk.regions.Region.*\n\ninitscript {\n    repositories {\n        maven {\n            url = uri(\"https://plugins.gradle.org/m2/\")\n        }\n    }\n    dependencies {\n        classpath(\"com.liftric.code.artifact.repository:code-artifact-repository-plugin:\u003clatest\u003e\")\n    }\n}\napply\u003ccom.liftric.code.artifact.repository.CodeArtifactRepositoryPlugin\u003e()\ncodeArtifactRepository {\n    region.set(EU_CENTRAL_1)\n    // use profile credentials provider, otherwise the default credentials chain of aws will be used\n    if (System.getenv(\"CI\") == null) {\n        profile.set(\"liftric\")\n    }\n    // Determines how long the generated authentication token is valid in seconds\n    tokenExpiresIn.set(1_800)\n}\nsettingsEvaluated {\n    pluginManagement {\n        repositories {\n            codeArtifact(\"\u003cprivate-domain\u003e\", \"fargate-gradle-plugin\")\n            google()\n            mavenCentral()\n            gradlePluginPortal()\n        }\n    }\n}\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliftric%2Fcode-artifact-repository-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliftric%2Fcode-artifact-repository-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliftric%2Fcode-artifact-repository-plugin/lists"}