-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
124 lines (110 loc) · 3.8 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
/*
* Copyright (c) 2022 Solana Mobile Inc.
*/
plugins {
id 'com.android.library'
id 'maven-publish'
id 'signing'
}
android {
namespace 'com.solana.pay'
compileSdk 34
defaultConfig {
minSdk 23
targetSdk 34
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
publishing {
publications {
release(MavenPublication) {
groupId = group
artifactId = 'solana-pay-android'
pom {
name = 'Solana Pay - Android'
description = 'Android library for Solana Pay. It provides classes to ease integration of Solana Pay on Android devices.'
url = 'https://github.com/solana-mobile/solana-pay-android-sample'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Solana Mobile Engineering'
email = '[email protected]'
organization = 'Solana Mobile Inc.'
organizationUrl = 'https://solanamobile.com'
}
}
organization {
name = 'Solana Mobile Inc.'
url = 'https://solanamobile.com'
}
scm {
connection = 'scm:git:git://github.com/solana-mobile/solana-pay-android-sample.git'
developerConnection = 'scm:git:ssh://github.com/solana-mobile/solana-pay-android-sample.git'
url = 'https://github.com/solana-mobile/solana-pay-android-sample/tree/main'
}
}
afterEvaluate {
from components.release
}
}
}
}
signing {
// Signing private key and password provided by ORG_GRADLE_PROJECT_signingKey and
// ORG_GRADLE_PROJECT_signingPassword, respectively
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.release
}
// Define JavaDoc build task for all variants
android.libraryVariants.all { variant ->
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
description "Generates Javadoc for $variant.name."
source = variant.javaCompileProvider.get().source
classpath = project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += files(variant.javaCompileProvider.get().classpath)
options.links("https://docs.oracle.com/javase/8/docs/api/");
options.links("https://d.android.com/reference/");
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
}
// Build JavaDoc when making a release build
tasks.whenTaskAdded { task ->
if (task.name == 'assembleRelease') {
task.dependsOn("generateReleaseJavadoc")
}
}
dependencies {
compileOnly 'androidx.annotation:annotation:1.9.1'
testImplementation 'androidx.annotation:annotation:1.9.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.14.1'
}