https://github.com/ooftf/ooftf-maven
简化上传mavenCentral配置
https://github.com/ooftf/ooftf-maven
Last synced: 5 months ago
JSON representation
简化上传mavenCentral配置
- Host: GitHub
- URL: https://github.com/ooftf/ooftf-maven
- Owner: ooftf
- Created: 2021-05-06T09:09:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-10T03:33:32.000Z (about 5 years ago)
- Last Synced: 2023-07-26T22:02:39.918Z (almost 3 years ago)
- Language: Groovy
- Homepage:
- Size: 160 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ooftf-maven
[](https://maven-badges.herokuapp.com/maven-central/com.github.ooftf/ooftf-maven)
## 描述
简化上传到mavenCentral的配置
## 使用
project.gradle
```groovy
classpath "com.github.ooftf:ooftf-maven:1.0.4"
```
library.gradle
```groovy
apply plugin: 'ooftf-maven'
publish{
version = '1.0.0'
groupId = 'com.github.ooftf'
}
```
local.properties
```
maven.username=ooftf
maven.password=*******
signing.keyId=xxxxxxxx
signing.password=xxxxxxxx
```
签名文件放到 C:\Users\signing.gpg
## publish 可配置参数有
* String groupId 默认 com.github.ooftf
* String artifactId 默认 project.name
* String version
* String username 默认 ooftf
* String password
* String url 默认 maven
* String signingKeyId
* String signingPassword
* String signingSecretKeyRingFile 默认 C:\Users\signing.gpg
## 在local.properties可配置参数
* maven.username
* maven.password
* signing.keyId
* signing.password
* signing.file
## 可以添加 C:\Users\local.properties 文件作为全局配置
## be careful
* publish 配置优先于 local.properties
* 如果 version 是以 SNAPSHOT 结尾上传到 snapshot仓库,否则上传到release仓库
* SNAPSHOT 不签名
### snapshot仓库
maven {
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
#### release仓库
mavenCentral()
### 上传maven参考文档
[Android库发布到Maven Central全攻略](https://xiaozhuanlan.com/topic/6174835029) 导出签名文件,应该选择Backup secret key