11apply plugin : ' com.android.library'
22apply plugin : ' com.github.dcendents.android-maven'
3- group= ' com.github.Brioal'
3+ apply plugin : ' com.jfrog.bintray'
4+ group = ' com.brioal'
5+ version = ' 1.0'
46android {
57 compileSdkVersion 24
68 buildToolsVersion " 24.0.1"
@@ -10,8 +12,6 @@ android {
1012 targetSdkVersion 24
1113 versionCode 1
1214 versionName " 1.0"
13- renderscriptTargetApi 21
14- renderscriptSupportModeEnabled true
1515
1616 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
1717
@@ -28,3 +28,82 @@ dependencies {
2828 compile ' com.android.support:appcompat-v7:24.1.1'
2929}
3030
31+ def siteUrl = ' https://github.com/Brioal/SwipeMenuDemo' // 项目的主页 这个是说明,可随便填
32+ def gitUrl = ' https://github.com/Brioal/SwipeMenuDemo.git' // Git仓库的url 这个是说明,可随便填
33+ group = " com.brioal" // 这里是groupId ,必须填写 一般填你唯一的包名
34+
35+ install {
36+ repositories. mavenInstaller {
37+ // This generates POM.xml with proper parameters
38+ pom {
39+ project {
40+ packaging ' aar'
41+ // Add your description here
42+ name ' Android BounceProgressBar Widget' // 项目描述
43+ url siteUrl
44+ // Set your license
45+ licenses {
46+ license {
47+ name ' The Apache Software License, Version 2.0'
48+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
49+ }
50+ }
51+ developers {
52+ developer {
53+ id ' brioal' // 填写开发者的一些基本信息
54+ name ' JunHuang' // 填写开发者的一些基本信息
55+ email ' brioal@foxmail.com' // 填写开发者的一些基本信息
56+ }
57+ }
58+ scm {
59+ connection gitUrl
60+ developerConnection gitUrl
61+ url siteUrl
62+ }
63+ }
64+ }
65+ }
66+ }
67+
68+ task sourcesJar (type : Jar ) {
69+ from android. sourceSets. main. java. srcDirs
70+ classifier = ' sources'
71+ }
72+ task javadoc (type : Javadoc ) {
73+ source = android. sourceSets. main. java. srcDirs
74+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
75+ }
76+ task javadocJar (type : Jar , dependsOn : javadoc) {
77+ classifier = ' javadoc'
78+ from javadoc. destinationDir
79+ }
80+ artifacts {
81+ archives javadocJar
82+ archives sourcesJar
83+ }
84+
85+ Properties properties = new Properties ()
86+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
87+ bintray {
88+ user = properties. getProperty(" bintray.user" ) // 读取 local.properties 文件里面的 bintray.user
89+ key = properties. getProperty(" bintray.apikey" ) // 读取 local.properties 文件里面的 bintray.apikey
90+ configurations = [' archives' ]
91+ pkg {
92+ repo = " maven"
93+ name = " SwipeMenu" // 发布到JCenter上的项目名字,必须填写
94+ websiteUrl = siteUrl
95+ vcsUrl = gitUrl
96+ licenses = [" Apache-2.0" ]
97+ publish = true
98+ }
99+ }
100+
101+ javadoc {
102+ options{
103+ encoding " UTF-8"
104+ charSet ' UTF-8'
105+ author true
106+ version true
107+ links " http://docs.oracle.com/javase/7/docs/api"
108+ }
109+ }
0 commit comments