Skip to content

Commit c624297

Browse files
authored
chore: add firemarkers to lint (#2326)
* chore: add firemarkers to link * chore: build and lint config * chore: build and lint config * chore: add firemarker to lint
1 parent 06dfd71 commit c624297

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
fi
5252
done
5353
54+
5455
build-WearOS:
5556
runs-on: ubuntu-latest
5657
timeout-minutes: 45
@@ -67,6 +68,22 @@ jobs:
6768
- name: Build and check
6869
run: cd WearOS && ./gradlew build
6970

71+
build-FireMarkers:
72+
runs-on: ubuntu-latest
73+
timeout-minutes: 45
74+
75+
steps:
76+
- uses: actions/checkout@v2
77+
78+
- name: set up Java 21
79+
uses: actions/setup-java@v2
80+
with:
81+
distribution: 'adopt'
82+
java-version: '21'
83+
84+
- name: Build and check
85+
run: cd FireMarkers && ./gradlew build
86+
7087
build-Snippets:
7188
runs-on: ubuntu-latest
7289
timeout-minutes: 45
@@ -119,5 +136,6 @@ jobs:
119136
- build-WearOS
120137
- build-Snippets
121138
- build-tutorials
139+
- build-FireMarkers
122140
steps:
123141
- run: echo "Fail if all other steps are not successful"

.github/workflows/lint.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,14 @@ jobs:
141141
uses: github/codeql-action/upload-sarif@v3
142142
with:
143143
sarif_file: WearOS/Wearable/build/reports/lint-results-debug.sarif
144-
category: WearOS-Wearable
144+
category: WearOS-Wearable
145+
146+
- name: Run Android Lint for FireMarkers/app
147+
run: ./gradlew :app:lintDebug
148+
working-directory: FireMarkers
149+
150+
- name: Upload SARIF for FireMarkers/app
151+
uses: github/codeql-action/upload-sarif@v3
152+
with:
153+
sarif_file: FireMarkers/app/build/reports/lint-results-debug.sarif
154+
category: FireMarkers-app

FireMarkers/app/build.gradle.kts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ plugins {
4343
// ---------------------------------------------------------------------------------------------
4444
alias(libs.plugins.secrets.gradle.plugin) // Manages secrets and API keys.
4545
alias(libs.plugins.kotlin.serialization) // Provides Kotlin serialization capabilities.
46-
id("com.google.gms.google-services") // Integrates Google services, like Firebase.
46+
}
47+
48+
gradle.projectsEvaluated {
49+
if (rootProject.file("app/google-services.json").exists()) {
50+
project(":app").pluginManager.apply("com.google.gms.google-services")
51+
println("Applied Google Services plugin.")
52+
} else {
53+
println("google-services.json not found — skipping plugin application")
54+
}
4755
}
4856

4957
android {
@@ -82,6 +90,10 @@ android {
8290
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11)
8391
}
8492
}
93+
94+
lint {
95+
sarifOutput = layout.buildDirectory.file("reports/lint-results-debug.sarif").get().asFile
96+
}
8597
}
8698

8799
dependencies {

FireMarkers/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
1212
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13-
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
13+
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
1414

1515
# When configured, Gradle will run in incubating parallel mode.
1616
# This option should only be used with decoupled projects. More details, visit

0 commit comments

Comments
 (0)