-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
139 lines (114 loc) · 4.24 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
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
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
android {
buildToolsVersion '28.0.3'
compileSdkVersion 28
dataBinding.enabled = true
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionCode = rootProject.ext.versionCode
versionName = rootProject.ext.versionName
consumerProguardFiles 'proguard.pro'
}
lintOptions {
abortOnError false
}
testOptions.unitTests {
all {
jvmArgs '-noverify'
}
returnDefaultValues true
includeAndroidResources true
}
}
dependencies {
implementation 'androidx.annotation:annotation:1.0.1'
implementation 'com.braintreepayments.api:braintree:3.0.0'
implementation(group: 'com.visa.checkout', name: 'visacheckout-android-sdk', version: '6.6.1', ext: 'aar')
testImplementation 'com.google.android.gms:play-services-wallet:16.0.1'
testImplementation 'androidx.test:core:1.1.0'
testImplementation 'androidx.test:runner:1.1.1'
testImplementation 'androidx.test:rules:1.1.1'
testImplementation 'org.powermock:powermock-module-junit4:1.6.6'
testImplementation 'org.powermock:powermock-module-junit4-rule:1.6.6'
testImplementation 'org.powermock:powermock-api-mockito:1.6.6'
testImplementation 'org.powermock:powermock-classloading-xstream:1.6.6'
testImplementation 'org.robolectric:robolectric:4.0'
testImplementation 'org.skyscreamer:jsonassert:1.4.0'
testImplementation 'com.squareup.assertj:assertj-android:1.1.1'
}
/* maven deploy + signing */
task javadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
failOnError false
}
task javadocsJar(type: Jar, dependsOn: javadocs) {
classifier = 'javadoc'
from javadocs.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocsJar
archives sourcesJar
}
signing {
required { !android.defaultConfig.versionName.endsWith("SNAPSHOT") }
sign configurations.archives
}
def sonatypeUsername = System.env['SONATYPE_USERNAME']
def sonatypePassword = System.env['SONATYPE_PASSWORD']
nexusStaging {
packageGroup = "com.braintreepayments"
delayBetweenRetriesInMillis = 10000
username = sonatypeUsername
password = sonatypePassword
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.setArtifactId 'visa-checkout'
pom.project {
name 'visa-checkout'
groupId = 'com.braintreepayments.api'
version = "${android.defaultConfig.versionName}"
packaging 'jar'
description 'Visa Checkout Module for Braintree\'s Android SDK.'
url 'https://github.com/braintree/braintree-android-visa-checkout'
scm {
url 'scm:[email protected]:braintree/braintree-android-visa-checkout.git'
connection 'scm:[email protected]:braintree/braintree-android-visa-checkout.git'
developerConnection 'scm:[email protected]:braintree/braintree-android-visa-checkout.git'
}
developers {
developer {
id 'devs'
name 'Braintree Payments'
}
}
licenses {
license {
name 'MIT'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}
}
pom.whenConfigured {
it.dependencies.removeAll { true }
}
}
}
}