All Projects → sky-uk → Gradle Maven Plugin

sky-uk / Gradle Maven Plugin

Licence: bsd-3-clause
Gradle 5.x Maven Publish Plugin to deploy artifacts

Projects that are alternatives of or similar to Gradle Maven Plugin

Java Markdown Generator
Java library to generate markdown
Stars: ✭ 159 (+28.23%)
Mutual labels:  gradle, library, maven
Xseries
Library for cross-version Minecraft Bukkit support and various efficient API methods.
Stars: ✭ 109 (-12.1%)
Mutual labels:  library, plugin, maven
Notes
📝 Migrated to(迁移至) https://github.com/Kuangcp/Note 当前仓库已经废弃, 对应的博客网站:
Stars: ✭ 33 (-73.39%)
Mutual labels:  gradle, maven
Hellojpro
Stars: ✭ 46 (-62.9%)
Mutual labels:  gradle, maven
Hidden Secrets Gradle Plugin
🔒 Deeply hide secrets on Android
Stars: ✭ 79 (-36.29%)
Mutual labels:  gradle, plugin
Ok Gradle
IntelliJ/Android Studio plugin for searching artifacts ids of popular Java libraries.
Stars: ✭ 664 (+435.48%)
Mutual labels:  gradle, maven
Android Cookbook Examples
Contributed code examples from O'Reilly Android Cookbook. See #user-content-table README below!
Stars: ✭ 935 (+654.03%)
Mutual labels:  gradle, maven
Okta Blog Archive
Okta Developer Blog
Stars: ✭ 74 (-40.32%)
Mutual labels:  gradle, maven
Ms Backend Boilerplates
Boilerplate for Your Server Side(Backend) Application, Java | Spring(Boot, Cloud) | Node.js(Express, Koa, Egg) | Go | Python | DevOps 💫 服务端项目模板
Stars: ✭ 394 (+217.74%)
Mutual labels:  gradle, maven
Kotlin Mpp Standard
A standard setup for Kotlin multiplatform projects.
Stars: ✭ 92 (-25.81%)
Mutual labels:  gradle, maven
Gradle Util Plugins
Fix for windows gradle long classpath issue. Fixes JavaExec tasks that error out with message "CreateProcess error=206, The filename or extension is too long"
Stars: ✭ 87 (-29.84%)
Mutual labels:  gradle, plugin
Android Gradle Localization Plugin
Gradle plugin for generating localized string resources
Stars: ✭ 100 (-19.35%)
Mutual labels:  gradle, plugin
Spock Example
Spock example specifications along with ready-to-go Gradle and Maven builds
Stars: ✭ 595 (+379.84%)
Mutual labels:  gradle, maven
Let
Annotation based simple API flavored with AOP to handle new Android runtime permission model
Stars: ✭ 532 (+329.03%)
Mutual labels:  gradle, library
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-87.9%)
Mutual labels:  gradle, library
Jmh Gradle Plugin
Integrates the JMH benchmarking framework with Gradle
Stars: ✭ 441 (+255.65%)
Mutual labels:  gradle, plugin
Android Camera2 Library
Library to use Android Camera2 api easily.
Stars: ✭ 66 (-46.77%)
Mutual labels:  gradle, library
Samples
JavaFX samples to run with different options and build tools
Stars: ✭ 352 (+183.87%)
Mutual labels:  gradle, maven
Gradle Maven Publish Plugin
Gradle plugin that configures an uploadArchives task to automatically upload all of your Java, Kotlin or Android libraries to any Maven instance.
Stars: ✭ 392 (+216.13%)
Mutual labels:  gradle, maven
Circleci Orbs
The source code for some of the orbs published by CircleCI
Stars: ✭ 82 (-33.87%)
Mutual labels:  gradle, maven

Gradle Maven Plugin

This is a small "plugin" to simplify the use of maven-publish Gradle plugin. You can use this plugin for Java Library and Android Library.

Index

Usage

In order to use GradleMavenizer you have to add the line

apply from: 'https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/gradle-mavenizer.gradle'

at the very bottom of the build.gradle file. Alternatively, to use a specific release version, add this property to the project (see Releases at the top of the Github page for released versions):

mavPluginVersion = '1.0.3'

and add this line to the very bottom of the build.gradle file:

apply from: "https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/${project.mavPluginVersion}/gradle-mavenizer.gradle"`

Customization

GradleMavenizer is highly customizable.

You can customize it adding some properties to the root project build.gradle or to the module build.gradle file.

Attention: If you add the same property to the root project file and to the module file, in order of priority, the module file property will override the root project property.

1. Generic Project Info (included in POM)

  • mavProjectName -> String property -> Identify the project name (can be different from the artifactId)
  • mavLibraryDescription -> String property -> A simple description for the library
  • mavDevelopers -> Map property -> A map with the ids and the developer name of the library
  • mavLibraryLicenses -> Map property -> A map with the name and the urls of the library licenses
  • mavSiteUrl -> String property -> Identify the url of the project website
  • mavGitUrl -> String property ->Identify the url of the project github page

2. Repositories

  • Remote repository:

    • mavPublishToRemoteRepo -> Boolean property -> Allow the script to load your library to a remote repo
    • mavRemoteRepoUser -> String property -> Username to grant access to the remote repo
    • mavRemoteRepoPassword -> String property -> Password to grant access to the remote repo
    • mavRepoRemoteUrl -> String property -> Identify the url of the remote repo
  • Internal repository:

    • mavPublishToInternalRepo -> Boolean property -> Allow the script to load your library to an internal repo
    • mavRepoInternalUrl -> String property -> Identify the url of the internal repo
  • MavenLocal repository:

    • mavPublishToMavenLocal -> Boolean property -> Allow the script to load your library to MavenLocal folder

Attention: If you won't set any repository automatically the script will use MavenLocal as default repo

Example of per-module build.gradle costumization

project.ext {
    mavDevelopers = ["Fe":"Federico"]
    mavSiteUrl = "https://github.com/sky-uk/gradle-maven-plugin"
    mavGitUrl = mavSiteUrl + '.git'
    mavProjectName = 'GradleMavenizer'
    mavPublishToInternalRepo = true
    mavRepoInternalUrl = "path/to/internal/repo"
    mavLibraryLicenses = ["Apache-2.0":'http://www.apache.org/licenses/LICENSE-2.0.txt']
    mavLibraryDescription = "A simple description of the project"
}

Library Publish

To finally publish you library you can use the command ./gradlew publish directly from your project root folder.

You can also pass some properties directly from command line using the command -P (every property must have -P before), for example: ./gradlew publish -PmavPublishToMavenLocal=true

Generate POM file

If you want to generate the POM file without publish your library you can use the command ./gradlew generatePomFileForMavenPublishPublication directly from your project root folder.

To generate the POM file only for one module of your library you can use the command ./gradlew your-module-name:generatePomFileForMavenPublishPublication where you have to replace your-module-name with the name you chose for your module.

Note: POM file will be saved in build/publications/mavenPublish/ as pom-default.xml

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].