博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
了解一下:一款好用的 Maven Library 发布插件
阅读量:6279 次
发布时间:2019-06-22

本文共 2066 字,大约阅读时间需要 6 分钟。

GitHub:

Gradle Publish Plugin

A flex gradle plugin for publish your library to maven repository become easy.

gradle-publish-plugin.png

Feature

  • support publish multi-library, such as Java、Android、Kotlin
  • support for api / implementation dependencies in new Gradle
  • supports also @aar and transitive: false.
  • generate Kotlin doc with
  • support upload sources Jar (configurable, default true)
  • sign a library including sources, Javadoc, and a customized POM (configurable, default false, and require Gradle Version >= 4.8)

Usage

for Gradle version >= 2.1:

plugins {      id "com.whl.gradle-publish-plugin" version "0.1.16-SNAPSHOT"    }

for Gradle version < 2.1 or where dynamic configuration is required:

buildscript {      repositories {        maven {          url "https://plugins.gradle.org/m2/"        }      }      dependencies {        classpath "com.whl:gradle-publish-plugin:0.1.16-SNAPSHOT"      }    }    apply plugin: "com.whl.gradle-publish-plugin"

Also see it in

"com.whl.gradle-publish-plugin" should be after apply "java-library" or "com.android.library"

then, configuration in your build.gradle,such as:

simple example:

group 'com.example'    version '1.0-SNAPSHOT'    gradlePublish {        releaseRepository {            url = "http://your repository.com/nexus/content/repositories/releases"            userName = "your release account"            password = "your release account"        }    }

complete example:

group 'com.example'    version '1.0-SNAPSHOT'    gradlePublish {        sourceJarEnabled = true        javaDocEnabled = true        signEnabled = false        releaseRepository {            url = "http://your repository.com/nexus/content/repositories/releases"            userName = "your release account"            password = "your release account"        }        snapshotRepository {            url = "http://your repository.com/nexus/content/repositories/snapshots"            userName = "your snapshot account"            password = "your snapshot account"        }    }

last, execute ./gradlew publish task to publish your library to specified maven repository

转载地址:http://ixfva.baihongyu.com/

你可能感兴趣的文章
点播转码相关常见问题及排查方式
查看>>
[arm驱动]linux设备地址映射到用户空间
查看>>
弗洛伊德算法
查看>>
【算法之美】求解两个有序数组的中位数 — leetcode 4. Median of Two Sorted Arrays
查看>>
精度 Precision
查看>>
Android——4.2 - 3G移植之路之 APN (五)
查看>>
Linux_DHCP服务搭建
查看>>
[SilverLight]DataGrid实现批量输入(like Excel)(补充)
查看>>
秋式广告杀手:广告拦截原理与杀手组织
查看>>
翻译 | 摆脱浏览器限制的JavaScript
查看>>
闲扯下午引爆乌云社区“盗窃”乌云币事件
查看>>
02@在类的头文件中尽量少引入其他头文件
查看>>
JAVA IO BIO NIO AIO
查看>>
input checkbox 复选框大小修改
查看>>
网吧维护工具
查看>>
BOOT.INI文件参数
查看>>
vmstat详解
查看>>
新年第一镖
查看>>
unbtu使用笔记
查看>>
OEA 中 WPF 树型表格虚拟化设计方案
查看>>