1apply plugin: 'com.android.library'
2
3repositories {
4 mavenCentral()
5 google()
6}
7
8dependencies {
9 compile 'com.android.support:support-v4:27.0.2'
10 compile 'com.nineoldandroids:library:2.4.0'
11}
12
13android {
14 compileSdkVersion 26
15 buildToolsVersion "26.0.2"
16
17 defaultConfig {
18 minSdkVersion 14
19 targetSdkVersion 25
20 versionName "0.3.4"
21 versionCode 9
22 }
23
24 lintOptions {
25 abortOnError false
26 }
27}
28
29apply plugin: 'maven'
30apply plugin: 'signing'
31
32version = android.defaultConfig.versionName
33group = "de.timroes.android"
34
35if(project.hasProperty("EnhancedListView.properties") && new File(project.property("EnhancedListView.properties")).exists()) {
36
37 Properties props = new Properties()
38 props.load(new FileInputStream(file(project.property("EnhancedListView.properties"))))
39
40 gradle.taskGraph.whenReady { taskGraph ->
41 if (taskGraph.allTasks.any { it instanceof Sign }) {
42 allprojects { ext."signing.keyId" = props['signing.keyId'] }
43 allprojects { ext."signing.secretKeyRingFile" = props['signing.secretKeyRingFile'] }
44 allprojects { ext."signing.password" = props['signing.password'] }
45 }
46 }
47
48 signing {
49 required { has("release") && gradle.taskGraph.hasTask("uploadArchives") }
50 sign configurations.archives
51 }
52
53 uploadArchives {
54
55 configuration = configurations.archives
56 repositories.mavenDeployer {
57
58 beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
59
60 repository(url: props['sonatypeRepo']) {
61 authentication(userName: props['sonatypeUsername'], password: props['sonatypePassword'])
62 }
63
64 pom.project {
65
66 name 'EnhancedListView'
67 packaging 'aar'
68 description 'ListView with enhanced features for Android'
69 url 'https://github.com/timroes/EnhancedListView'
70
71 scm {
72 url 'scm:git@github.com:timroes/EnhancedListView.git'
73 connection 'scm:git@github.com:timroes/EnhancedListView.git'
74 developerConnection 'scm:git@github.com:timroes/EnhancedListView.git'
75 }
76
77 licenses {
78 license {
79 name 'The Apache Software License, Version 2.0'
80 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
81 distribution 'repo'
82 }
83 }
84
85 developers {
86 developer {
87 id 'timroes'
88 name 'Tim Roes'
89 email 'mail@timroes.de'
90 }
91 }
92
93 }
94
95 }
96 }
97
98}