Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iv-cores/gradle-publish
A gradle plugin for publishing artifacts to maven
https://github.com/iv-cores/gradle-publish
Last synced: 9 days ago
JSON representation
A gradle plugin for publishing artifacts to maven
- Host: GitHub
- URL: https://github.com/iv-cores/gradle-publish
- Owner: iv-cores
- License: apache-2.0
- Created: 2024-07-31T05:42:47.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-05T06:38:35.000Z (6 months ago)
- Last Synced: 2024-11-12T18:06:51.401Z (2 months ago)
- Language: Kotlin
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gradle-publish
A gradle plugin for publishing artifacts to maven. This plugin wraps `maven-publish`, configuring it so that
environmental variables can be used to publish artifacts## Apply
`build.gradle.kts`
```kotlin
plugins {
id ("org.ivcode.gradle.publish") version "1.0"
}
```## Supported Plugins
The plugin will identify the following plugins and configure the `maven-publish` plugin accordingly.
- `java`
- `java-library`
- `java-gradle-plugin`
- `org.springframework.boot`## Configuration
The extension can be used to configure the plugin. Typically, you wouldn't specify the `url`, `username`, or `password`.
This could be configured using environment variables. And if the defaults are to be used for the `groupId`,
`artifactId`, and `version`, then you wouldn't need to define the extension at all.### Extension
`build.gradle.kts`
```kotlin
publish {
url = "https://my-mvn.com" // Repo URL | Required for non-local publishing
username = "my-username" // Repo Username | Optional (default = none)
password = "my-password" // Repo Password | Optional (default = none)
isAllowInsecure = true // Allow Insecure | Optional (default = false)groupId = "com.my-group-id" // Mvn Group Id | Optional (default = ${project.group})
artifactId = "my-project-name" // Mvn Artifact Id | Optional (default = ${project.name})
version = "my-version" // Mvn Version | Optional (default = ${project.version})
}
```### Environment Variables
The repository can be defined using environmental variables. If defined, they overwrite whatever is defined in the
extension.| Variable | Description |
|-----------------|---------------|
| `MVN_URL` | Repo Url |
| `MVN_USERNAME` | Repo Username |
| `MVN_PASSWORD` | Repo Password |