-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathbuild.gradle
119 lines (105 loc) · 3.74 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
/*
* Copyright (c) 2022 Solana Mobile Inc.
*/
plugins {
id 'com.android.library'
id 'maven-publish'
id 'signing'
}
android {
namespace = 'com.solanamobile.seedvault'
compileSdk 34
defaultConfig {
// Note: 'minSdk 17' ensures that the library can be used with apps targeting much older
// Android versions. It's only useful on devices which expose the Seed Vault API.
minSdk 17
targetSdk 34
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
publishing {
publications {
release(MavenPublication) {
groupId = group
artifactId = 'seedvault-wallet-sdk'
pom {
name = 'Seed Vault - Wallet SDK'
description = 'Android programming interfaces for the Solana Mobile Stack Seed Vault'
url = 'https://github.com/solana-mobile/seed-vault-sdk'
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/seed-vault-sdk.git'
developerConnection = 'scm:git:ssh://github.com/solana-mobile/seed-vault-sdk.git'
url = 'https://github.com/solana-mobile/seed-vault-sdk/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.8.0'
}