11// to publish run ./gradlew clean bintrayUpload
22
33apply plugin : ' com.android.library'
4- apply plugin : ' com.github.dcendents.android-maven'
54apply plugin : ' com.jfrog.bintray'
65
76project. ext {
@@ -28,7 +27,7 @@ android {
2827 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
2928 }
3029 testOptions {
31- unitTests. returnDefaultValues = false ;
30+ unitTests. returnDefaultValues = false
3231 }
3332 buildTypes {
3433 release {
@@ -50,96 +49,9 @@ dependencies {
5049 androidTestCompile ' junit:junit:4.12'
5150 compile(group : ' com.android.support' , name : ' appcompat-v7' , version : supportLibVersion)
5251 compile(group : ' com.android.support' , name : ' recyclerview-v7' , version : supportLibVersion)
53- androidTestCompile ' com.android.support:support-annotations:23.3 .0'
54- androidTestCompile ' com.android.support.test:runner:0.5 '
52+ androidTestCompile ' com.android.support:support-annotations:26.1 .0'
53+ androidTestCompile ' com.android.support.test:runner:1.0.1 '
5554}
5655
5756Properties properties = new Properties ()
5857properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
59-
60- install {
61- repositories. mavenInstaller {
62- // This generates POM.xml with proper parameters
63- pom {
64- project {
65- packaging ' aar'
66-
67- // Add your description here
68- name ' FlowLayoutManager for android RecyclerView'
69- url siteUrl
70-
71- // Set your license
72- licenses {
73- license {
74- name ' GPL-v3.0'
75- url ' http://www.gnu.org/licenses/gpl-3.0.en.html'
76- }
77- }
78- developers {
79- developer {
80- id ' xiaofeng-han'
81- name ' Xiaofeng Han'
82- email ' hhhanxf@gmail.com'
83- }
84- }
85- scm {
86- connection gitUrl
87- developerConnection gitUrl
88- url gitUrl
89-
90- }
91- }
92- }
93- }
94- }
95-
96- task sourcesJar (type : Jar ) {
97- from android. sourceSets. main. java. srcDirs
98- classifier = ' sources'
99- }
100-
101- task javadoc (type : Javadoc ) {
102- source = android. sourceSets. main. java. srcDirs
103- classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
104- }
105-
106- task javadocJar (type : Jar , dependsOn : javadoc) {
107- classifier = ' javadoc'
108- from javadoc. destinationDir
109- }
110-
111-
112- artifacts {
113- archives sourcesJar
114- archives javadocJar
115- }
116-
117- bintray {
118- user = properties. getProperty(' bintray.user' )
119- key = properties. getProperty(' bintray.apikey' )
120- configurations = [' archives' ]
121- pkg {
122- repo = ' maven'
123- name = ' FlowLayoutManager'
124- userOrg = ' hhhanxf'
125- licenses = [' GPL-3.0' ]
126- vcsUrl = gitUrl
127- githubRepo = ' xiaofeng-han/AndroidLibs'
128- githubReleaseNotesFile = ' README.md'
129- publish = true
130- version {
131- name = libVersion
132- desc = ' FLowLayoutManager'
133- released = new Date ()
134- vcsTag = libVersion
135- gpg {
136- sign = true
137- passphrase = properties. getProperty(' bintray.gpg.password' )
138- }
139- }
140- }
141- }
142-
143- task wrapper (type : Wrapper ) {
144- gradleVersion = ' 2.10'
145- }
0 commit comments