11apply plugin : ' com.android.library'
2- // add plugin
3- apply plugin : ' com.github.dcendents.android-maven'
4- apply plugin : ' com.jfrog.bintray'
5-
6- version = ' 1.0.0'
72
83android {
94 compileSdkVersion 23
@@ -29,93 +24,4 @@ dependencies {
2924 compile ' com.android.support:appcompat-v7:23.1.1'
3025}
3126
32- task sourcesJar (type : Jar ) {
33- from android. sourceSets. main. java. srcDirs
34- classifier = ' sources'
35- }
36-
37- /* task javadoc(type: Javadoc) {
38- source = android.sourceSets.main.java.srcDirs
39- classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
40- }
41-
42- task javadocJar(type: Jar, dependsOn: javadoc) {
43- classifier = 'javadoc'
44- from javadoc.destinationDir
45- }*/
46- artifacts {
47- // archives javadocJar
48- archives sourcesJar
49- }
50-
51- group = ' net.cpacm.simpleslider'
52- install {
53- repositories. mavenInstaller {
54- pom. project {
55- packaging ' aar'
56- groupId ' net.cpacm.simpleslider'
57- artifactId ' library'
58-
59- name ' simpleslider'
60- description ' A simple slider allows you to easily use.'
61- url ' https://github.com/cpacm/SimpleSlider'
62- inceptionYear ' 2016'
63-
64- licenses {
65- license {
66- name ' The Apache Software License, Version 2.0'
67- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
68- distribution ' repo'
69- }
70- }
71- scm {
72- connection ' https://github.com/cpacm/SimpleSlider.git'
73- url ' https://github.com/cpacm/SimpleSlider'
74-
75- }
76- developers {
77- developer {
78- name ' cpacm'
79- 80- }
81- }
82- }
83-
84- }
85- }
86-
87- // Bintray
88- Properties properties = new Properties ()
89- properties. load(project. rootProject. file(' local.properties' ). newDataInputStream()) // 获取local.propertes的信息
90-
91- bintray {
92- user = properties. getProperty(" bintray.user" )
93- key = properties. getProperty(" bintray.apikey" )
94- publish = true
95- configurations = [' archives' ]
96- pkg {
97- // 填入 bintray
98- repo = ' maven'
99- name = ' SimpleSlider'
100- vcsUrl = ' https://github.com/cpacm/SimpleSlider.git'
101- websiteUrl = ' https://github.com/cpacm/SimpleSlider'
102- licenses = [' Apache-2.0' ]
103- issueTrackerUrl = ' https://github.com/cpacm/SimpleSlider/issues'
104- publicDownloadNumbers = true
105- version {
106- name = ' 1.0.0'
107- desc = ' simple slider release'
108- vcsTag = ' 1.0.0'
109- attributes = [' gradle-plugin' : ' com.use.less:com.use.less.gradle:gradle-useless-plugin' ]
110- }
111- }
112- }
113-
114- tasks. withType(JavaCompile ) {
115- options. encoding = " UTF-8"
116- }
117-
118- task findConventions << {
119- println project. getConvention()
120- }
12127
0 commit comments