forked from solana-mobile/mobile-wallet-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (105 loc) · 3.81 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
/*
* Copyright (c) 2022 Solana Mobile Inc.
*/
plugins {
id 'com.android.library'
id 'maven-publish'
id 'signing'
}
android {
namespace = "com.solana.mobilewalletadapter.walletlib"
compileSdk 33
defaultConfig {
minSdk 23
targetSdk 33
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
}
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
publishing {
publications {
release(MavenPublication) {
groupId = 'com.solanamobile'
artifactId = 'mobile-wallet-adapter-walletlib'
pom {
name = 'Mobile Wallet Adapter - Wallet library'
description = 'Wallet library for Mobile Wallet Adapter. It implements the wallet endpoint role of the Mobile Wallet Adapter protocol specification.'
url = 'https://github.com/solana-mobile/mobile-wallet-adapter'
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/mobile-wallet-adapter.git'
developerConnection = 'scm:git:ssh://github.com/solana-mobile/mobile-wallet-adapter.git'
url = 'https://github.com/solana-mobile/mobile-wallet-adapter/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.5.0'
implementation 'org.java-websocket:Java-WebSocket:1.5.3'
implementation 'org.slf4j:slf4j-android:1.7.36' // SLF4J logging facility for Java-WebSocket
api project(path: ':common')
}