-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
151 lines (131 loc) · 4.82 KB
/
build.gradle
File metadata and controls
151 lines (131 loc) · 4.82 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'com.google.gms.google-services'
id 'maven-publish'
id 'signing'
}
android {
defaultConfig {
applicationId "io.openremote.app"
minSdkVersion 25
compileSdk 35
targetSdkVersion 35
versionCode 44
versionName version
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resValue "string", "NOTIFICATION_CHANNEL_ID", applicationId + ".ORAppMessage"
}
if (project.hasProperty("keystoreFile")) {
signingConfigs {
release {
keyAlias keystoreKeyAlias
keyPassword keystoreKeyPassword
storeFile file(keystoreFile)
storePassword keystorePassword
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (project.hasProperty("keystoreFile")) {
signingConfig signingConfigs.release
}
}
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
namespace 'io.openremote.app'
publishing {
singleVariant('release') {
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.core:core-ktx:1.16.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation "com.google.android.gms:play-services-location:21.3.0"
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 'com.google.android.material:material:1.12.0'
implementation project(':ORLib')
// Unit testing framework
testImplementation 'junit:junit:4.13.2'
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier = 'sources'
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
artifact source: file('build/outputs/apk/release/app-release.apk')
artifact sourcesJar
group = "io.openremote"
artifactId = "app"
pom {
name = 'OpenRemote Android Console'
description = 'Provides the Android OpenRemote Console Application'
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
signReleasePublication.dependsOn(packageRelease)
}
}
publishReleasePublicationToMavenLocal.dependsOn(packageRelease)
}