Skip to content

Commit 0a215b6

Browse files
committed
增加EventBusTask
1 parent 628ff27 commit 0a215b6

File tree

1 file changed

+78
-1
lines changed

1 file changed

+78
-1
lines changed

SEventBus/build.gradle

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: 'com.jfrog.bintray'
24

35
android {
46
compileSdkVersion 22
57
buildToolsVersion "22.0.1"
68

79
defaultConfig {
8-
minSdkVersion 16
10+
minSdkVersion 10
911
targetSdkVersion 22
1012
versionCode 1
1113
versionName "1.0"
@@ -22,3 +24,78 @@ dependencies {
2224
compile fileTree(dir: 'libs', include: ['*.jar'])
2325
compile 'com.android.support:appcompat-v7:22.2.0'
2426
}
27+
28+
29+
version = "1.0.1"
30+
def siteUrl = 'https://github.com/BeanSprouts/SimpleEventBus'
31+
def gitUrl = 'https://github.com/BeanSprouts/SimpleEventBus.git'
32+
group="org.sx.framework"
33+
34+
35+
install {
36+
repositories.mavenInstaller {
37+
// This generates POM.xml with proper parameters
38+
pom {
39+
project {
40+
packaging 'aar'
41+
name 'Simple EventBus For Android' // #CONFIG# // project title
42+
url siteUrl
43+
// Set your license
44+
licenses {
45+
license {
46+
name 'The Apache Software License, Version 2.0'
47+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
48+
}
49+
}
50+
developers {
51+
developer {
52+
id 'beansprouts' // #CONFIG# // your user id (you can write your nickname)
53+
name 'shenxin' // #CONFIG# // your user name
54+
email 'shenxin@outlook.com' // #CONFIG# // your email
55+
}
56+
}
57+
scm {
58+
connection gitUrl
59+
developerConnection gitUrl
60+
url siteUrl
61+
}
62+
}
63+
}
64+
}
65+
}
66+
67+
task sourcesJar(type: Jar) {
68+
from android.sourceSets.main.java.srcDirs
69+
classifier = 'sources'
70+
}
71+
72+
task javadoc(type: Javadoc) {
73+
source = android.sourceSets.main.java.srcDirs
74+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
75+
}
76+
77+
task javadocJar(type: Jar, dependsOn: javadoc) {
78+
classifier = 'javadoc'
79+
from javadoc.destinationDir
80+
}
81+
82+
artifacts {
83+
archives javadocJar
84+
archives sourcesJar
85+
}
86+
87+
Properties properties = new Properties()
88+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
89+
bintray {
90+
user = properties.getProperty("bintray.user")
91+
key = properties.getProperty("bintray.apikey")
92+
configurations = ['archives']
93+
pkg {
94+
repo = "maven"
95+
name = "SEventBus" // #CONFIG# project name in jcenter
96+
websiteUrl = siteUrl
97+
vcsUrl = gitUrl
98+
licenses = ["Apache-2.0"]
99+
publish = true
100+
}
101+
}

0 commit comments

Comments
 (0)