|
1 | 1 | apply plugin: 'com.android.library' |
| 2 | +apply plugin: 'com.github.dcendents.android-maven' |
| 3 | +apply plugin: 'com.jfrog.bintray' |
2 | 4 |
|
3 | 5 | android { |
4 | 6 | compileSdkVersion 19 |
@@ -28,8 +30,84 @@ android { |
28 | 30 | } |
29 | 31 | } |
30 | 32 |
|
| 33 | +ext.siteUrl = 'https://github.com/navasmdc/MaterialDesignLibrary' |
| 34 | +ext.issueUrl = 'https://github.com/navasmdc/MaterialDesignLibrary/issues' |
| 35 | +ext.gitUrl = 'https://github.com/navasmdc/MaterialDesignLibrary.git' |
| 36 | + |
| 37 | +bintray { |
| 38 | + user = hasProperty('BINTRAY_USER') ? BINTRAY_USER : "_" |
| 39 | + key = hasProperty('BINTRAY_KEY') ? BINTRAY_PASSWORD : "_" |
| 40 | + |
| 41 | + configurations = ["archives"] |
| 42 | + pkg { |
| 43 | + repo = 'maven' |
| 44 | + name = 'MaterialDesignLibrary' |
| 45 | + desc = 'This is a library with components of Android L to you use in android 2.2' |
| 46 | + websiteUrl = siteUrl |
| 47 | + issueTrackerUrl = issueUrl |
| 48 | + vcsUrl = gitUrl |
| 49 | + licenses = ['Apache-2.0'] |
| 50 | + labels = [] |
| 51 | + publicDownloadNumbers = true |
| 52 | + } |
| 53 | +} |
| 54 | + |
31 | 55 | dependencies { |
32 | 56 | compile 'com.nineoldandroids:library:2.4.+' |
33 | 57 | compile 'com.android.support:support-v4:21.+' |
34 | 58 | } |
35 | 59 |
|
| 60 | +install { |
| 61 | + repositories.mavenInstaller { |
| 62 | + pom { |
| 63 | + project { |
| 64 | + packaging 'aar' |
| 65 | + name 'MaterialDesignLibrary' |
| 66 | + url siteUrl |
| 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 'navasmdc' |
| 76 | + name 'Iván Navas' |
| 77 | + email 'i.navas.mdc@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 | + |
| 105 | +artifacts { |
| 106 | + archives javadocJar |
| 107 | + archives sourcesJar |
| 108 | +} |
| 109 | + |
| 110 | +task findConventions << { |
| 111 | + println project.getConvention() |
| 112 | +} |
| 113 | + |
0 commit comments