Skip to content

Commit 287692c

Browse files
committed
Apply Spotless
1 parent 7caba80 commit 287692c

106 files changed

Lines changed: 7523 additions & 6989 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci_cd.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
# Push on main and release tags
55
push:
66
branches:
7-
- 'main'
7+
- "main"
88
tags:
9-
- '[0-9]+.[0-9]+.[0-9]+'
9+
- "[0-9]+.[0-9]+.[0-9]+"
1010

1111
# PR
1212
pull_request:
1313
branches:
14-
- 'main'
14+
- "main"
1515

1616
# Manual trigger
1717
workflow_dispatch:
@@ -21,7 +21,6 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
jobs:
24-
2524
build:
2625
name: CI/CD
2726
runs-on: ubuntu-latest
@@ -34,9 +33,9 @@ jobs:
3433
id: java
3534
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
3635
with:
37-
distribution: 'temurin'
38-
java-version: '17'
39-
cache: 'gradle'
36+
distribution: "temurin"
37+
java-version: "17"
38+
cache: "gradle"
4039

4140
- name: Check if main repo
4241
id: is_main_repo

.github/workflows/release.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
VERSION_INCREMENT:
8-
description: 'The version number part to increment (major.minor.patch)'
8+
description: "The version number part to increment (major.minor.patch)"
99
default: Minor
1010
type: choice
1111
options:
@@ -14,32 +14,29 @@ on:
1414
- Patch
1515
required: false
1616
VERSION_OVERRIDE:
17-
description: 'Version override (when not incrementing the previous version)'
17+
description: "Version override (when not incrementing the previous version)"
1818
type: string
1919
required: false
2020

21-
2221
permissions:
2322
actions: write
2423
contents: write
2524

2625
jobs:
27-
2826
build:
2927
name: Release
3028
runs-on: ubuntu-latest
3129

3230
steps:
33-
3431
- name: Checkout
3532
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3633

3734
- name: Set up JDK 17 and gradle cache
3835
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
3936
with:
40-
distribution: 'temurin'
41-
java-version: '17'
42-
cache: 'gradle'
37+
distribution: "temurin"
38+
java-version: "17"
39+
cache: "gradle"
4340

4441
- name: Run release
4542
id: release

GenericApp/app/build.gradle

Lines changed: 121 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,155 @@
11
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22

33
plugins {
4-
alias(libs.plugins.android.application)
5-
alias(libs.plugins.google.services)
6-
id 'maven-publish'
7-
id 'signing'
4+
alias(libs.plugins.android.application)
5+
alias(libs.plugins.google.services)
6+
id 'maven-publish'
7+
id 'signing'
88
}
99

1010
android {
11-
defaultConfig {
12-
applicationId = "io.openremote.app"
13-
minSdk = 25
14-
compileSdk = 37
15-
targetSdk = 37
16-
versionCode = 47
17-
versionName = version
18-
19-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
20-
21-
resValue "string", "NOTIFICATION_CHANNEL_ID", applicationId + ".ORAppMessage"
22-
}
23-
24-
if (project.hasProperty("keystoreFile")) {
25-
signingConfigs {
26-
release {
27-
keyAlias keystoreKeyAlias
28-
keyPassword keystoreKeyPassword
29-
storeFile file(keystoreFile)
30-
storePassword keystorePassword
31-
}
32-
}
11+
defaultConfig {
12+
applicationId = "io.openremote.app"
13+
minSdk = 25
14+
compileSdk = 37
15+
targetSdk = 37
16+
versionCode = 47
17+
versionName = version
18+
19+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
20+
21+
resValue "string", "NOTIFICATION_CHANNEL_ID", applicationId + ".ORAppMessage"
22+
}
23+
24+
if (project.hasProperty("keystoreFile")) {
25+
signingConfigs {
26+
release {
27+
keyAlias keystoreKeyAlias
28+
keyPassword keystoreKeyPassword
29+
storeFile file(keystoreFile)
30+
storePassword keystorePassword
31+
}
3332
}
34-
35-
buildTypes {
36-
release {
37-
minifyEnabled false
38-
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
39-
if (project.hasProperty("keystoreFile")) {
40-
signingConfig signingConfigs.release
41-
}
42-
}
33+
}
34+
35+
buildTypes {
36+
release {
37+
minifyEnabled false
38+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
39+
if (project.hasProperty("keystoreFile")) {
40+
signingConfig signingConfigs.release
41+
}
4342
}
43+
}
4444

45-
buildFeatures {
46-
viewBinding = true
47-
resValues = true
48-
}
45+
buildFeatures {
46+
viewBinding = true
47+
resValues = true
48+
}
4949

50-
compileOptions {
51-
sourceCompatibility = JavaVersion.VERSION_17
52-
targetCompatibility = JavaVersion.VERSION_17
53-
}
50+
compileOptions {
51+
sourceCompatibility = JavaVersion.VERSION_17
52+
targetCompatibility = JavaVersion.VERSION_17
53+
}
5454

55-
namespace = 'io.openremote.app'
55+
namespace = 'io.openremote.app'
5656

57-
publishing {
58-
singleVariant('release') {
59-
}
57+
publishing {
58+
singleVariant('release') {
6059
}
60+
}
6161
}
6262

6363
kotlin {
64-
compilerOptions {
65-
jvmTarget.set(JvmTarget.JVM_17)
66-
}
64+
compilerOptions {
65+
jvmTarget.set(JvmTarget.JVM_17)
66+
}
6767
}
6868

6969
dependencies {
70-
implementation fileTree(dir: "libs", include: ["*.jar"])
71-
implementation libs.androidx.core.ktx
72-
implementation libs.androidx.appcompat
73-
implementation libs.androidx.constraintlayout
74-
implementation libs.androidx.preference.ktx
75-
implementation libs.play.services.location
76-
implementation libs.jackson.module.kotlin
77-
implementation platform(libs.firebase.bom)
78-
implementation libs.firebase.messaging
79-
implementation libs.material
80-
implementation project(':ORLib')
81-
82-
// Unit testing framework
83-
testImplementation libs.junit
70+
implementation fileTree(dir: "libs", include: ["*.jar"])
71+
implementation libs.androidx.core.ktx
72+
implementation libs.androidx.appcompat
73+
implementation libs.androidx.constraintlayout
74+
implementation libs.androidx.preference.ktx
75+
implementation libs.play.services.location
76+
implementation libs.jackson.module.kotlin
77+
implementation platform(libs.firebase.bom)
78+
implementation libs.firebase.messaging
79+
implementation libs.material
80+
implementation project(':ORLib')
81+
82+
// Unit testing framework
83+
testImplementation libs.junit
8484
}
8585

8686
tasks.register('sourcesJar', Jar) {
87-
from android.sourceSets.main.java.srcDirs
88-
archiveClassifier = 'sources'
87+
from android.sourceSets.main.java.srcDirs
88+
archiveClassifier = 'sources'
8989
}
9090

9191
afterEvaluate {
92-
publishing {
93-
publications {
94-
release(MavenPublication) {
95-
from components.release
96-
97-
artifact source: file('build/outputs/apk/release/app-release.apk')
98-
artifact sourcesJar
99-
100-
group = "io.openremote"
101-
artifactId = "app"
102-
103-
pom {
104-
name = 'OpenRemote Android Console'
105-
description = 'Provides the Android OpenRemote Console Application'
106-
url = 'https://github.com/openremote/console-android'
107-
licenses {
108-
license {
109-
name = 'GNU Affero General Public License v3.0'
110-
url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
111-
}
112-
}
113-
developers {
114-
developer {
115-
id = 'developers'
116-
name = 'Developers'
117-
email = 'developers@openremote.io'
118-
organization = 'OpenRemote'
119-
organizationUrl = 'https://openremote.io'
120-
}
121-
}
122-
scm {
123-
connection = 'scm:git:git://github.com/openremote/console-android.git'
124-
developerConnection = 'scm:git:ssh://github.com:openremote/console-android.git'
125-
url = 'https://github.com/openremote/console-android/tree/main'
126-
}
127-
}
92+
publishing {
93+
publications {
94+
release(MavenPublication) {
95+
from components.release
96+
97+
artifact source: file('build/outputs/apk/release/app-release.apk')
98+
artifact sourcesJar
99+
100+
group = "io.openremote"
101+
artifactId = "app"
102+
103+
pom {
104+
name = 'OpenRemote Android Console'
105+
description = 'Provides the Android OpenRemote Console Application'
106+
url = 'https://github.com/openremote/console-android'
107+
licenses {
108+
license {
109+
name = 'GNU Affero General Public License v3.0'
110+
url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
128111
}
129-
}
130-
131-
repositories {
132-
maven {
133-
if (!version.endsWith('-LOCAL')) {
134-
credentials {
135-
username = findProperty("publishUsername")
136-
password = findProperty("publishPassword")
137-
}
138-
}
139-
url = version.endsWith('-LOCAL') ? layout.buildDirectory.dir('repo') : version.endsWith('-SNAPSHOT') ? findProperty("snapshotsRepoUrl") : findProperty("releasesRepoUrl")
112+
}
113+
developers {
114+
developer {
115+
id = 'developers'
116+
name = 'Developers'
117+
email = 'developers@openremote.io'
118+
organization = 'OpenRemote'
119+
organizationUrl = 'https://openremote.io'
140120
}
121+
}
122+
scm {
123+
connection = 'scm:git:git://github.com/openremote/console-android.git'
124+
developerConnection = 'scm:git:ssh://github.com:openremote/console-android.git'
125+
url = 'https://github.com/openremote/console-android/tree/main'
126+
}
141127
}
128+
}
142129
}
143130

144-
signing {
145-
def signingKey = findProperty("signingKey")
146-
def signingPassword = findProperty("signingPassword")
147-
if (signingKey && signingPassword) {
148-
useInMemoryPgpKeys(signingKey, signingPassword)
149-
sign publishing.publications
150-
signReleasePublication.dependsOn(packageRelease)
131+
repositories {
132+
maven {
133+
if (!version.endsWith('-LOCAL')) {
134+
credentials {
135+
username = findProperty("publishUsername")
136+
password = findProperty("publishPassword")
137+
}
151138
}
139+
url = version.endsWith('-LOCAL') ? layout.buildDirectory.dir('repo') : version.endsWith('-SNAPSHOT') ? findProperty("snapshotsRepoUrl") : findProperty("releasesRepoUrl")
140+
}
141+
}
142+
}
143+
144+
signing {
145+
def signingKey = findProperty("signingKey")
146+
def signingPassword = findProperty("signingPassword")
147+
if (signingKey && signingPassword) {
148+
useInMemoryPgpKeys(signingKey, signingPassword)
149+
sign publishing.publications
150+
signReleasePublication.dependsOn(packageRelease)
152151
}
152+
}
153153

154-
publishReleasePublicationToMavenLocal.dependsOn(packageRelease)
154+
publishReleasePublicationToMavenLocal.dependsOn(packageRelease)
155155
}

GenericApp/app/google-services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
}
2828
],
2929
"configuration_version": "1"
30-
}
30+
}

GenericApp/app/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile

0 commit comments

Comments
 (0)