forked from thegrizzlylabs/sardine-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (89 loc) · 2.86 KB
/
build.gradle
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
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
}
}
repositories {
jcenter()
google()
}
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 15
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'proguard-rules.pro'
}
}
dependencies {
api 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation ('org.simpleframework:simple-xml:2.7.1') {
exclude module: 'stax'
exclude module: 'stax-api'
exclude module: 'xpp3'
}
testImplementation 'junit:junit:4.12'
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
publishing {
publications {
MyPublication(MavenPublication) {
if (project.hasProperty('gitVersion')) {
version "$gitVersion"
}
groupId 'com.thegrizzlylabs.sardine-android'
artifactId 'sardine-android'
artifact bundleReleaseAar
artifact sourcesJar
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
// Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
// Ensure dependencies such as fileTree are not included.
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
bintray {
// Get Bintray credential from environment variable
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
dryRun = false
override = false
publish = true
pkg {
repo = 'maven'
name = 'sardine-android'
userOrg = user
licenses = ['Apache-2.0']
desc = 'A WebDAV library for Android'
vcsUrl = 'https://github.com/thegrizzlylabs/sardine-android.git'
version {
if (project.hasProperty('gitVersion')) {
name = "$gitVersion" //Bintray logical version name
vcsTag = "v$gitVersion"
}
}
}
publications = ['MyPublication']
}