内容简介:A flex gradle plugin for publish your library to maven repository become easy.for Gradle version >= 2.1:for Gradle version < 2.1 or where dynamic configuration is required:
A flex gradle plugin for publish your library to maven repository become easy.
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 dokka
- 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 inGradle plugins
"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
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- 一起来了解下这些webpack常用插件
- 升级到AndroidX?你可以先了解一下这款插件
- 国外大神整理了一份 kubectl 插件列表,大家可以了解一下
- tesseract-OCR 图像识别插件 node-tesr 了解一下?
- 你了解HTTPS,但你可能不了解X.509
- 你真的了解Mybatis的${}和#{}吗?是否了解应用场景?
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
C++设计新思维
(美)Andrei Alexandrescu / 侯捷、於春景 / 华中科技大学出版社 / 2003-03 / 59.8
本书从根本上展示了generic patterns(泛型模式)或pattern templates(模式模板),并将它们视之为“在C++中创造可扩充设计”的一种功能强大的新方法。这种方法结合了template和patterns,你可能未曾想过,但的确存在。为C++打开了全新视野,而且不仅仅在编程方面,还在于软件设计本身;对软件分析和软件体系结构来说,它也具有丰富的内涵。一起来看看 《C++设计新思维》 这本书的介绍吧!