1
1
apply plugin : ' com.android.library'
2
2
apply plugin : ' kotlin-android'
3
- apply plugin : ' com.github.dcendents.android-maven'
4
3
apply plugin : ' com.jfrog.bintray'
5
4
apply plugin : ' com.github.ben-manes.versions'
6
5
7
- // start - do not modify this if your project is on github
8
- def siteUrl = " https://github.com/${ github_username} /${ github_repository_name} "
9
- def gitUrl = siteUrl + ' .git'
10
- def bugTrackerUrl = siteUrl + ' /issues/'
11
- def projectName = " recycler-adapter-extensions"
12
- // end - do not modify this if your project is on github
6
+ Properties properties = new Properties ()
7
+ if (project. rootProject. file(" local.properties" ). exists()) {
8
+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
9
+ }
13
10
14
11
// start - module specific overrides of default values written in manifest.gradle
12
+ def bintray_project_name = " recycler-adapter-extensions"
15
13
def library_description = " RecyclerAdapter Extensions"
16
14
def library_keywords = [' android' , ' recycler' , ' recyclerview' , ' adapter' , ' extensions' , ' fast' , ' easy' ]
17
15
// end - module specific overrides
18
16
17
+ // start - do not modify this if your project is on github
18
+ project. ext {
19
+ mavDevelopers = [(properties. getProperty(" bintray.user" )):(maintainer)]
20
+ mavSiteUrl = " https://github.com/${ github_username} /${ github_repository_name} "
21
+ mavGitUrl = mavSiteUrl + ' .git'
22
+ bugTrackerUrl = mavSiteUrl + ' /issues/'
23
+ mavProjectName = bintray_project_name
24
+ mavLibraryLicenses = [" Apache-2.0" : ' http://www.apache.org/licenses/LICENSE-2.0.txt' ]
25
+ mavLibraryDescription = library_description
26
+ mavVersion = library_version
27
+ }
28
+ // end - do not modify this if your project is on github
29
+
19
30
group = library_project_group
20
31
version = library_version
21
32
@@ -73,60 +84,16 @@ dependencies {
73
84
74
85
}
75
86
76
- // add the following information to the file: local.properties situated in the parent directory of
77
- // where this file is:
78
- //
79
- // bintray.user=gotev
80
- // bintray.apikey=api key got from the bintray profile
81
- //
82
- // be sure to add local.properties to the .gitignore!
83
-
84
- Properties properties = new Properties ()
85
- if (project. rootProject. file(" local.properties" ). exists()) {
86
- properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
87
- }
88
-
89
- install {
90
- repositories. mavenInstaller {
91
- pom. project {
92
- name projectName
93
- description library_description
94
- packaging ' aar'
95
- groupId library_project_group
96
- version version
97
- url siteUrl
98
- licenses {
99
- license {
100
- name library_licenses[0 ]
101
- url library_licenses_url
102
- }
103
- }
104
- developers {
105
- developer {
106
- id properties. getProperty(" bintray.user" )
107
- name maintainer
108
- }
109
- }
110
- scm {
111
- connection gitUrl
112
- developerConnection gitUrl
113
- url siteUrl
114
-
115
- }
116
- }
117
- }
118
- }
119
-
120
87
bintray {
121
88
user = properties. getProperty(" bintray.user" )
122
89
key = properties. getProperty(" bintray.apikey" )
123
90
configurations = [' archives' ]
124
91
pkg {
125
92
repo = " maven"
126
- name = projectName
93
+ name = mavProjectName
127
94
desc = library_description
128
- websiteUrl = siteUrl
129
- vcsUrl = gitUrl
95
+ websiteUrl = mavSiteUrl
96
+ vcsUrl = mavGitUrl
130
97
issueTrackerUrl = bugTrackerUrl
131
98
licenses = library_licenses
132
99
labels = library_keywords
@@ -135,37 +102,4 @@ bintray {
135
102
}
136
103
}
137
104
138
- task sourcesJar (type : Jar ) {
139
- from android. sourceSets. main. java. srcDirs
140
- classifier = ' sources'
141
- }
142
-
143
- task javadoc (type : Javadoc ) {
144
- excludes = [' **/*.kt' ] // < ---- Exclude all kotlin files from javadoc file.
145
-
146
- title = " $projectName $project . version API"
147
- description " Generates Javadoc"
148
- source = android. sourceSets. main. java. srcDirs
149
- classpath + = files(android. bootClasspath)
150
- exclude ' **/BuildConfig.java' , ' **/R.java'
151
- options {
152
- windowTitle(" $projectName $project . version Reference" )
153
- locale = ' en_US'
154
- encoding = ' UTF-8'
155
- charSet = ' UTF-8'
156
- links(" http://docs.oracle.com/javase/7/docs/api/" );
157
- linksOffline(" http://d.android.com/reference" , " ${ android.sdkDirectory} /docs/reference" );
158
- setMemberLevel(JavadocMemberLevel . PUBLIC )
159
- addStringOption(' Xdoclint:none' , ' -quiet' )
160
- }
161
- }
162
-
163
- task javadocJar (type : Jar , dependsOn : javadoc) {
164
- classifier = ' javadoc'
165
- from javadoc. destinationDir
166
- }
167
-
168
- artifacts {
169
- archives javadocJar
170
- archives sourcesJar
171
- }
105
+ apply from : ' https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/gradle-mavenizer.gradle'
0 commit comments