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