Commit 8e9ee0dd authored by 王韦's avatar 王韦

[new] 完善readme

parent 387f6ed4
#### 怎么上传maven #### 怎么上传maven
项目的根build.gradle
````
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 { buildscript {
repositories { repositories {
maven { maven {
...@@ -24,36 +15,35 @@ for Gradle version < 2.1 or where dynamic configuration is required: ...@@ -24,36 +15,35 @@ for Gradle version < 2.1 or where dynamic configuration is required:
apply plugin: "com.whl.gradle-publish-plugin" apply plugin: "com.whl.gradle-publish-plugin"
Also see it in [Gradle plugins](https://plugins.gradle.org/plugin/com.whl.gradle-publish-plugin) ````
module 的build.gradle
then, configuration in your build.gradle,such as: ```
complete example: complete example:
apply plugin: "com.whl.gradle-publish-plugin"
group 'com.example' group 'groupdId'
version '1.0-SNAPSHOT' version 'version' // note :以-SNAPSHOT 可以同版本覆盖
gradlePublish { gradlePublish {
sourceJarEnabled = true sourceJarEnabled = true
javaDocEnabled = false javaDocEnabled = false
signEnabled = false signEnabled = false
releaseRepository { releaseRepository {
url = "https://hub.zmcms.cn/repository/maven-public/" url = "https://hub.zmcms.cn/repository/maven-public/"
userName = "wangwei" userName = "wangwei"
password = "caihong520" password = "caihong520"
} }
snapshotRepository { snapshotRepository {
url = "https://hub.zmcms.cn/repository/maven-snapshots/" url = "https://hub.zmcms.cn/repository/maven-snapshots/"
userName = "wangwei" userName = "wangwei"
password = "caihong520" password = "caihong520"
} }
} }
````
last, execute `./gradlew publish` or `./gradlew :library:publish` task to publish your library to specified maven repository last, execute `./gradlew publish` or `./gradlew :library:publish` task to publish your library to specified maven repository
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment