Creating a binary clock widget for Android home launcher#1
Open
Copilot wants to merge 21 commits into
Open
Conversation
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/f2b62f11-eba1-4569-ada4-298ba940be3b Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/f2b62f11-eba1-4569-ada4-298ba940be3b Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/f2b62f11-eba1-4569-ada4-298ba940be3b Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/f2b62f11-eba1-4569-ada4-298ba940be3b Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/f2b62f11-eba1-4569-ada4-298ba940be3b Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/ad899af4-ada9-4314-88b2-5d7be065470a Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/40be9336-0196-42b5-91d7-d15c1df278f3 Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/40be9336-0196-42b5-91d7-d15c1df278f3 Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/40be9336-0196-42b5-91d7-d15c1df278f3 Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/40be9336-0196-42b5-91d7-d15c1df278f3 Co-authored-by: anod <171704+anod@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new binaryclock Android library module to this framework repository, centered on a Jetpack Glance home-screen widget and shared binary-digit formatting helpers. The PR also expands repository documentation and introduces a GitHub Actions workflow for building and publishing a signed APK.
Changes:
- add the new
binaryclockmodule with common digit/bit conversion logic, Android widget UI, manifest/resources, and unit tests - document the binary clock widget module and add usage/build notes in the repository README
- add a GitHub Actions workflow for building a signed release APK and optionally publishing it to a GitHub Release
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
binaryclock/src/commonTest/kotlin/info/anodsplace/binaryclock/BinaryClockDigitsTest.kt |
Adds unit tests for digit-to-bit mapping, time digit formatting, and input validation. |
binaryclock/src/commonMain/kotlin/info/anodsplace/binaryclock/BinaryClockDigits.kt |
Introduces shared helpers for converting decimal time values into binary-clock digits/bits. |
binaryclock/src/androidMain/res/xml/binary_clock_widget_info.xml |
Defines app widget metadata such as layout, sizing, resize behavior, and update cadence. |
binaryclock/src/androidMain/res/values/strings.xml |
Adds the widget description string resource. |
binaryclock/src/androidMain/kotlin/info/anodsplace/binaryclock/BinaryClockGlanceWidget.kt |
Implements the Glance widget, receiver, and binary clock UI composition. |
binaryclock/src/androidMain/AndroidManifest.xml |
Registers the app widget receiver and provider metadata for Android manifest merging. |
binaryclock/build.gradle.kts |
Creates the new Android/KMP module and configures its test and Android dependencies. |
README.md |
Documents the binary clock widget module and the new APK build/publish workflow. |
.github/workflows/build-publish-apk.yml |
Adds CI automation for signed APK building, artifact upload, and optional release publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+72
to
+74
| set -euo pipefail | ||
| if [ ! -x ./gradlew ]; then | ||
| if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then |
Comment on lines
+1
to
+4
| name: Build and publish APK | ||
|
|
||
| on: | ||
| pull_request: |
| implementation(kotlin("test")) | ||
| } | ||
| androidMain.dependencies { | ||
| implementation("androidx.glance:glance-appwidget:1.1.1") |
Comment on lines
+35
to
+37
| outputs: | ||
| apk_name: ${{ steps.metadata.outputs.apk_name }} | ||
| build_apk: ${{ steps.metadata.outputs.build_apk }} |
| @@ -0,0 +1,24 @@ | |||
| plugins { | |||
| alias(libs.plugins.kotlin.multiplatform) | |||
| alias(libs.plugins.kotlin.multiplatform.android.library) | |||
| android:resizeMode="horizontal|vertical" | ||
| android:targetCellWidth="4" | ||
| android:targetCellHeight="2" | ||
| android:updatePeriodMillis="1800000" |
Comment on lines
+49
to
+54
| val isCompactMode = LocalSize.current.width < 180.dp | ||
| Column( | ||
| modifier = GlanceModifier | ||
| .fillMaxSize() | ||
| .background(ColorProvider(Color(0xFF101010))) | ||
| .padding(horizontal = 14.dp, vertical = 12.dp), |
Comment on lines
+20
to
+22
| push: | ||
| tags: | ||
| - 'v*' |
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/40be9336-0196-42b5-91d7-d15c1df278f3 Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
Agent-Logs-Url: https://github.com/anod/android-framework-lib/sessions/e881dd84-5e8e-48e9-a8ae-202342cbc1cb Co-authored-by: anod <171704+anod@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.