2 Star 1 Fork 0

bits-chen / NextEvents

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 3.51 KB
一键复制 编辑 原始数据 按行查看 历史
YooJia.Chen 提交于 2016-10-29 08:07 . Fixes
buildscript {
repositories {
jcenter()
}
}
plugins {
id "com.jfrog.bintray" version "1.6"
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
repositories {
jcenter()
mavenCentral()
}
dependencies {
testCompile 'com.google.guava:guava:19.0'
testCompile 'junit:junit:4.11'
}
ext{
projVersion = '2.4.3'
projName = 'NextEvents'
projDesc = 'NextEvents: A Java Event Bus Library'
projURL = "https://github.com/yoojia/NextEvents"
projVCS = "https://github.com/yoojia/NextEvents.git"
}
group 'com.github.yoojia'
version projVersion
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
def pomConfig = {
name projName
url projURL
inceptionYear '2016'
scm { url projVCS }
developers {
developer {
id 'yoojia'
name 'Yoojia Chen'
email 'yoojiachen@gmail.com'
url 'https://yoojia.github.io'
}
}
}
publishing {
publications {
MavenJava(MavenPublication) {
from components.java
groupId 'com.github.yoojia'
artifactId 'next-events'
version projVersion
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().children().last() + pomConfig
asNode().appendNode("description", projDesc)
def licencesNode = asNode().appendNode('licenses')
def licenseNode = licencesNode.appendNode('license')
licenseNode.appendNode('name', 'The Apache Software License, Version 2.0')
licenseNode.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
licenseNode.appendNode('distribution', 'repo')
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
javadoc {
options{
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
links "http://docs.oracle.com/javase/7/docs/api"
title project.name
}
}
artifacts {
archives sourcesJar, javadocJar
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('bintrayUser')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('bintrayApiKey')
publications = ['MavenJava']
dryRun = false
publish = true // 是否自动发布
pkg {
repo = 'maven'
name = projName
userOrg = 'yoojia'
licenses = ['Apache-2.0']
vcsUrl = projVCS
labels = ['Java', 'Event Bus']
publicDownloadNumbers = true
version {
name = projVersion
desc = projDesc
vcsTag = projVersion
attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
gpg {
sign = true
}
mavenCentralSync {
sync = true
user = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
password = project.hasProperty('SONATYPE_PASS') ? project.property('SONATYPE_PASS') : System.getenv('SONATYPE_PASS')
close = '1'
}
}
}
}
Java
1
https://gitee.com/bitschen/NextEvents.git
git@gitee.com:bitschen/NextEvents.git
bitschen
NextEvents
NextEvents
master

搜索帮助