了解一下:一款好用的 Maven Library 发布插件

栏目: Java · 发布时间: 5年前

内容简介: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.

了解一下:一款好用的 Maven Library 发布插件

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


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

组成论

组成论

张学文 / 中国科学技术大学出版社 / 2003-12 / 35.00元

很多事物中都存在组成(成分、构成)问题。作者创立的组成论为此提供统一的认识模型、分析工具、计算方法和原理。它通过广义集合、分布函数和复杂程度三个概念分析事物组成,并揭示了有随机性的事物都遵守最复杂原理。组成论与系统科学、复杂性研究、信息论和热力学第二定律关系密切。本书介绍了它在自然和社会科学中的许多应用,还提出了信息不可增殖、不同形态的复杂程度的互相转化(复杂度定律)等重要论点。自然科学、社会科学......一起来看看 《组成论》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

html转js在线工具
html转js在线工具

html转js在线工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具