-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
135 lines (122 loc) · 4.37 KB
/
build.gradle
File metadata and controls
135 lines (122 loc) · 4.37 KB
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
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'org.jetbrains.kotlin.android'
id 'maven-publish'
id 'signing'
}
android {
namespace 'io.openremote.orlib'
defaultConfig {
minSdkVersion 25
compileSdk 35
targetSdkVersion 35
versionCode 1
versionName version
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
dev {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
staging {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
lint {
disable 'ProtectedPermissions'
}
publishing {
singleVariant('release') {
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.16.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation "com.google.android.gms:play-services-location:21.3.0"
implementation 'com.google.android.gms:play-services-vision:20.1.3'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1"
implementation platform('com.google.firebase:firebase-bom:33.12.0')
implementation 'com.google.firebase:firebase-messaging-ktx'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier = 'sources'
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
artifact sourcesJar
group = "io.openremote"
artifactId = "orlib"
pom {
name = 'OpenRemote Android Library'
description = 'Provides the Android OpenRemote Library'
url = 'https://github.com/openremote/console-android'
licenses {
license {
name = 'GNU Affero General Public License v3.0'
url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
}
}
developers {
developer {
id = 'developers'
name = 'Developers'
email = 'developers@openremote.io'
organization = 'OpenRemote'
organizationUrl = 'https://openremote.io'
}
}
scm {
connection = 'scm:git:git://github.com/openremote/console-android.git'
developerConnection = 'scm:git:ssh://github.com:openremote/console-android.git'
url = 'https://github.com/openremote/console-android/tree/main'
}
}
}
}
repositories {
maven {
if (!version.endsWith('-LOCAL')) {
credentials {
username findProperty("publishUsername")
password findProperty("publishPassword")
}
}
url = version.endsWith('-LOCAL') ? layout.buildDirectory.dir('repo') : version.endsWith('-SNAPSHOT') ? findProperty("snapshotsRepoUrl") : findProperty("releasesRepoUrl")
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
if (signingKey && signingPassword) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}
}
}