11apply plugin : ' com.android.library'
2+ apply plugin : ' com.github.dcendents.android-maven'
3+ apply plugin : ' com.jfrog.bintray'
24
35android {
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