-
Notifications
You must be signed in to change notification settings - Fork 217
Expand file tree
/
Copy pathbuild.gradle
More file actions
150 lines (137 loc) · 5.12 KB
/
Copy pathbuild.gradle
File metadata and controls
150 lines (137 loc) · 5.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode rootProject.ext.android.versionCode
versionName rootProject.ext.android.versionName
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compileOnly project(':core')
compileOnly rootProject.ext.libs.recyclerview
compileOnly rootProject.ext.libs.dynamicanimation
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier.set('sources')
}
task javadoc(type: Javadoc) {
failOnError false
options.encoding = 'UTF-8'
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
}
// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'SmoothRefreshLayout-DynamicReboundExtension'
groupId rootProject.ext.bintray['groupId']
url rootProject.ext.bintray['siteUrl']
version rootProject.ext.bintray['libVersion']
artifactId 'srl-ext-dynamic-rebound'
description 'Dynamic rebound extension of SmoothRefreshLayout'
licenses {
license {
name rootProject.ext.bintray['licenseName']
url rootProject.ext.bintray['licenseUrl']
}
}
developers {
developer {
id rootProject.ext.bintray['developerId']
name rootProject.ext.bintray['developerName']
email rootProject.ext.bintray['developerEmail']
}
}
scm {
connection rootProject.ext.bintray['gitUrl']
developerConnection rootProject.ext.bintray['gitUrl']
url rootProject.ext.bintray['siteUrl']
}
}
}
}
}
signing {
sign publishing.publications
}
publishing {
publications {
release(MavenPublication) {
groupId rootProject.ext.bintray['groupId']
artifactId 'srl-ext-dynamic-rebound'
version rootProject.ext.bintray['libVersion']
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact sourcesJar
artifact javadocJar
pom {
name = 'srl-ext-dynamic-rebound'
description = 'Dynamic rebound extension of SmoothRefreshLayout'
url = rootProject.ext.bintray['siteUrl']
licenses {
license {
name = rootProject.ext.bintray['licenseName']
url = rootProject.ext.bintray['licenseUrl']
}
}
developers {
developer {
id = rootProject.ext.bintray['developerId']
name = rootProject.ext.bintray['developerName']
email = rootProject.ext.bintray['developerEmail']
}
}
scm {
connection = rootProject.ext.bintray['gitUrl']
developerConnection = rootProject.ext.bintray['gitUrl']
url = rootProject.ext.bintray['siteUrl']
}
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
project.configurations.implementation.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
repositories {
maven {
name = "sonatype"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
username = properties.getProperty("bintray.user")
password = properties.getProperty("bintray.key")
}
}
}
}