|
1 | 1 | apply plugin: 'com.android.library'
|
| 2 | +apply plugin: 'com.github.dcendents.android-maven' |
2 | 3 |
|
3 | 4 | android {
|
4 | 5 | compileSdkVersion 25
|
5 | 6 | buildToolsVersion "25.0.2"
|
6 | 7 |
|
| 8 | + lintOptions { |
| 9 | + abortOnError false |
| 10 | + } |
| 11 | + |
7 | 12 | defaultConfig {
|
8 | 13 | minSdkVersion 14
|
9 | 14 | targetSdkVersion 25
|
@@ -34,3 +39,97 @@ dependencies {
|
34 | 39 |
|
35 | 40 | compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
|
36 | 41 | }
|
| 42 | + |
| 43 | +//#################################### Bintray ####################################// |
| 44 | +if (project.rootProject.file('local.properties').exists()) { |
| 45 | + apply plugin: 'com.jfrog.bintray' |
| 46 | + |
| 47 | + version = "1.0" // This is the library version used when deploying the artifact |
| 48 | + |
| 49 | + def siteUrl = 'https://github.com/kevalpatel2106/Open-Weather-API-Wrapper' // Homepage URL of the library |
| 50 | + def gitUrl = 'https://github.com/kevalpatel2106/Open-Weather-API-Wrapper.git' // Git repository URL |
| 51 | + |
| 52 | + group = "com.kevalpatel2106" |
| 53 | + |
| 54 | + install { |
| 55 | + repositories.mavenInstaller { |
| 56 | + // This generates POM.xml with proper parameters |
| 57 | + pom { |
| 58 | + project { |
| 59 | + packaging 'aar' |
| 60 | + |
| 61 | + // Add your description here |
| 62 | + name 'Open-Weather-API-Wrapper' |
| 63 | + description = 'An Android wrapper for the APIs of https://openweathermap.org.' |
| 64 | + url siteUrl |
| 65 | + |
| 66 | + // Set your license |
| 67 | + licenses { |
| 68 | + license { |
| 69 | + name 'The Apache Software License, Version 2.0' |
| 70 | + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 71 | + } |
| 72 | + } |
| 73 | + developers { |
| 74 | + developer { |
| 75 | + id 'kevalpatel2106' |
| 76 | + name 'Keval Patel' |
| 77 | + email 'kevalpatel2106@gmail.com' |
| 78 | + } |
| 79 | + } |
| 80 | + scm { |
| 81 | + connection gitUrl |
| 82 | + developerConnection gitUrl |
| 83 | + url siteUrl |
| 84 | + } |
| 85 | + } |
| 86 | + } |
| 87 | + } |
| 88 | + } |
| 89 | + |
| 90 | + task sourcesJar(type: Jar) { |
| 91 | + from android.sourceSets.main.java.srcDirs |
| 92 | + classifier = 'sources' |
| 93 | + } |
| 94 | + |
| 95 | + task javadoc(type: Javadoc) { |
| 96 | + source = android.sourceSets.main.java.srcDirs |
| 97 | + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) |
| 98 | + } |
| 99 | + |
| 100 | + task javadocJar(type: Jar, dependsOn: javadoc) { |
| 101 | + classifier = 'javadoc' |
| 102 | + from javadoc.destinationDir |
| 103 | + } |
| 104 | + artifacts { |
| 105 | + // archives javadocJar |
| 106 | + archives sourcesJar |
| 107 | + } |
| 108 | + |
| 109 | + Properties properties = new Properties() |
| 110 | + properties.load(project.rootProject.file('local.properties').newDataInputStream()) |
| 111 | + |
| 112 | + // https://github.com/bintray/gradle-bintray-plugin |
| 113 | + bintray { |
| 114 | + user = properties.getProperty("bintray.user") |
| 115 | + key = properties.getProperty("bintray.apikey") |
| 116 | + |
| 117 | + configurations = ['archives'] |
| 118 | + pkg { |
| 119 | + repo = "maven" |
| 120 | + // it is the name that appears in bintray when logged |
| 121 | + name = "Open-Weather-API-Wrapper" |
| 122 | + websiteUrl = siteUrl |
| 123 | + vcsUrl = gitUrl |
| 124 | + licenses = ["Apache-2.0"] |
| 125 | + publish = true |
| 126 | + version { |
| 127 | + gpg { |
| 128 | + sign = false //Determines whether to GPG sign the files. The default is false |
| 129 | + // passphrase = properties.getProperty("bintray.gpg.password") //Optional. The passphrase for GPG signing' |
| 130 | + } |
| 131 | + } |
| 132 | + } |
| 133 | + } |
| 134 | +} |
| 135 | + |
0 commit comments