Skip to content

android: add basic kotlin lint/format tooling#30726

Merged
obviyus merged 7 commits intomainfrom
chore/android-lint-fmt-tooling
Mar 1, 2026
Merged

android: add basic kotlin lint/format tooling#30726
obviyus merged 7 commits intomainfrom
chore/android-lint-fmt-tooling

Conversation

@obviyus
Copy link
Copy Markdown
Contributor

@obviyus obviyus commented Mar 1, 2026

Summary

  • add ktlint for apps/android (app + benchmark) and expose android:lint / android:format
  • format Gradle Kotlin scripts with ktlintFormat
  • remove deprecated AGP gradle.properties flags; add explicit notification permission guard for Android lint

Verification

  • pnpm android:lint
  • cd apps/android && ./gradlew assemble

@aisle-research-bot
Copy link
Copy Markdown

aisle-research-bot bot commented Mar 1, 2026

🔒 Aisle Security Analysis

✅ We scanned this PR and did not find any security vulnerabilities.

Aisle supplements but does not replace security review.


Analyzed PR: #30726 at commit d64a5fd

@openclaw-barnacle openclaw-barnacle bot added app: android App: android size: M maintainer Maintainer-authored PR labels Mar 1, 2026
@obviyus obviyus self-assigned this Mar 1, 2026
@openclaw-barnacle openclaw-barnacle bot added the app: macos App: macos label Mar 1, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 734d2d9a60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 1, 2026

Greptile Summary

This PR adds ktlint linting and formatting tooling to the Android app and benchmark modules, reformats all Gradle Kotlin scripts to 4-space indentation, removes deprecated AGP gradle.properties flags, and adds an explicit notification permission guard to satisfy Android lint. The changes are largely housekeeping, with one functional change in SystemHandler.kt that deserves attention.

Key observations:

  • SystemHandler.kt permission guard: The new POST_NOTIFICATIONS check in post() silently returns without posting or signalling an error. This causes handleSystemNotify() to return ok(null) (success) even if the notification was dropped due to a missing/revoked permission — a regression from the previous behaviour where a SecurityException would be caught and surfaced as a NOTIFICATION_FAILED error.
  • android.dependency.useConstraints flipped to false: Previously true, this flag controls AGP's automatic dependency version alignment across configurations. Worth confirming it has no effect in AGP 9.x before landing.
  • ktlint setup: Correctly declared at the root with apply false and applied per-module with matching configuration. The new android:lint, android:format, and android:lint:android scripts in package.json are clean and well-named.
  • README checklist: Several previously open items are now checked off, reflecting real feature completions landing alongside this tooling PR.

Confidence Score: 3/5

  • Safe to merge with the caveat that the silent-return permission guard in SystemHandler.kt causes false-success responses when a notification is silently dropped.
  • The ktlint tooling setup and Gradle reformatting are mechanical and low-risk. The gradle.properties flag removals are plausible deprecation cleanups but android.dependency.useConstraints toggling to false needs confirmation. The main concern is the SystemHandler.kt permission guard that silently swallows a notification failure and returns success to the caller, which is a functional regression in error reporting even if the race condition is rare.
  • apps/android/app/src/main/java/ai/openclaw/android/node/SystemHandler.kt — the silent return inside post() needs to be revised to avoid masking failures. apps/android/gradle.properties — confirm android.dependency.useConstraints=false is safe in AGP 9.x.

Last reviewed commit: 6e60604

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@aisle-research-bot
Copy link
Copy Markdown

aisle-research-bot bot commented Mar 1, 2026

🔒 Aisle Security Analysis

✅ We scanned this PR and did not find any security vulnerabilities.

Aisle supplements but does not replace security review.


Analyzed PR: #30726 at commit 89c705a

@obviyus obviyus force-pushed the chore/android-lint-fmt-tooling branch from 89c705a to d64a5fd Compare March 1, 2026 15:02
@obviyus obviyus merged commit 08f98ac into main Mar 1, 2026
@obviyus obviyus deleted the chore/android-lint-fmt-tooling branch March 1, 2026 15:02
@obviyus
Copy link
Copy Markdown
Contributor Author

obviyus commented Mar 1, 2026

Landed via temp rebase onto main.

  • Gate: pnpm android:lint && cd apps/android && ./gradlew :app:testDebugUnitTest --tests ai.openclaw.android.node.SystemHandlerTest && ./gradlew assemble
  • Land commit: d64a5fd
  • Merge commit: 08f98ac

hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 3, 2026
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Mateljan1 pushed a commit to Mateljan1/openclaw that referenced this pull request Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: macos App: macos maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant