Skip to content

Commit c030dbc

Browse files
author
LeanBitLab
committed
feat: bump version to 2.4, target Android 16 (API 36) & update release pipeline
1 parent 1158097 commit c030dbc

6 files changed

Lines changed: 39 additions & 118 deletions

File tree

.github/scripts/generate_release_notes.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,18 @@ jobs:
5656
- name: Build Release APK
5757
run: ./gradlew assembleRelease
5858

59-
- name: Generate Release Notes
59+
- name: Prepare Release Notes
6060
env:
6161
TAG_NAME: ${{ github.event.inputs.tag_name || github.ref_name }}
62-
run: python3 .github/scripts/generate_release_notes.py
62+
run: |
63+
SHORT_TAG="${TAG_NAME%.*}"
64+
if [ -f "docs/release-notes/${TAG_NAME}.md" ]; then
65+
cp "docs/release-notes/${TAG_NAME}.md" release_notes.md
66+
elif [ -f "docs/release-notes/${SHORT_TAG}.md" ]; then
67+
cp "docs/release-notes/${SHORT_TAG}.md" release_notes.md
68+
else
69+
echo "Release notes for ${TAG_NAME} not found." > release_notes.md
70+
fi
6371
6472
- name: Create GitHub Release and Upload APK
6573
uses: softprops/action-gh-release@v2

app/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ plugins {
99

1010
android {
1111
namespace = "com.leanbitlab.lwidget"
12-
compileSdk = 35
12+
compileSdk = 36
1313

1414
defaultConfig {
1515
applicationId = "com.leanbitlab.lwidget"
1616
minSdk = 26
17-
targetSdk = 35
18-
versionCode = 18
19-
versionName = "2.3"
17+
targetSdk = 36
18+
versionCode = 19
19+
versionName = "2.4"
2020
}
2121

2222
testOptions {

app/src/main/java/com/leanbitlab/lwidget/MainActivity.kt

Lines changed: 12 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class MainActivity : AppCompatActivity() {
234234
val previewContainer = findViewById<android.widget.FrameLayout>(R.id.preview_container)
235235
try {
236236
val remoteViews = AwidgetProvider.Companion.buildAppWidgetRemoteViews(this, currentWidgetId, UpdateMode.FULL)
237-
val view = remoteViews.apply(this, previewContainer)
237+
val view = remoteViews.apply(applicationContext, previewContainer)
238238
previewContainer.removeAllViews()
239239
previewContainer.addView(view)
240240
} catch (e: Exception) {
@@ -1591,13 +1591,6 @@ class MainActivity : AppCompatActivity() {
15911591
val presets = listOf(
15921592
// Minimal: just time+date, white text, fully transparent, thin font
15931593
Preset("minimal", "Minimal", mapOf(
1594-
"show_time" to true, "size_time" to 58f,
1595-
"show_date" to true, "size_date" to 16f,
1596-
"show_battery" to false, "show_temp" to false,
1597-
"show_storage" to false, "show_ram" to false, "show_data_usage" to false,
1598-
"show_steps" to false, "show_screen_time" to false,
1599-
"show_next_alarm" to false, "show_world_clock" to false,
1600-
"show_events" to false, "show_tasks" to false,
16011594
"show_outline" to false, "bg_opacity" to 0f,
16021595
"font_style" to 9, // Thin
16031596
"use_dynamic_colors" to false,
@@ -1608,106 +1601,62 @@ class MainActivity : AppCompatActivity() {
16081601
)),
16091602
// Neon: cyan time, magenta date, dark bg, bold condensed font
16101603
Preset("neon", "Neon", mapOf(
1611-
"show_time" to true, "size_time" to 64f,
1612-
"show_date" to true, "size_date" to 14f,
1613-
"show_battery" to true, "size_battery" to 28f, "bold_battery" to true,
1614-
"show_temp" to true, "size_temp" to 18f, "bold_temp" to true,
1615-
"show_storage" to false, "show_ram" to false, "show_data_usage" to false,
1616-
"show_steps" to false, "show_screen_time" to false,
1617-
"show_next_alarm" to true, "size_next_alarm" to 12f,
1618-
"show_world_clock" to false,
1619-
"show_events" to false, "show_tasks" to false,
1604+
"bold_battery" to true, "bold_temp" to true,
16201605
"show_outline" to true, "bg_opacity" to 95f,
16211606
"font_style" to 4, // Condensed
16221607
"use_dynamic_colors" to false,
16231608
"text_color_primary_idx" to 2, "text_color_primary_r" to 0, "text_color_primary_g" to 255, "text_color_primary_b" to 255,
16241609
"text_color_secondary_idx" to 2, "text_color_secondary_r" to 0, "text_color_secondary_g" to 200, "text_color_secondary_b" to 200,
16251610
"date_color_idx" to 2, "date_color_r" to 255, "date_color_g" to 0, "date_color_b" to 180,
16261611
"outline_color_idx" to 2, "outline_color_r" to 0, "outline_color_g" to 200, "outline_color_b" to 255,
1627-
"bg_color_idx" to 2, "bg_color_r" to 10, "bg_color_g" to 10, "bg_color_b" to 20,
1628-
"widget_right_column_order" to "show_battery,show_temp,show_weather_condition,show_data_usage,show_storage,show_ram,show_steps,show_screen_time"
1612+
"bg_color_idx" to 2, "bg_color_r" to 10, "bg_color_g" to 10, "bg_color_b" to 20
16291613
)),
16301614
// Cockpit: green on dark, monospace, info-heavy, terminal look
16311615
Preset("cockpit", "Cockpit", mapOf(
1632-
"show_time" to true, "size_time" to 42f,
1633-
"show_date" to true, "size_date" to 14f,
1634-
"show_battery" to true, "size_battery" to 18f, "bold_battery" to false,
1635-
"show_temp" to true, "size_temp" to 16f, "bold_temp" to false,
1636-
"show_storage" to true, "size_storage" to 14f, "bold_storage" to false, "show_ram" to false, "size_ram" to 14f, "bold_ram" to false,
1637-
"show_data_usage" to true, "size_data" to 14f, "bold_data_usage" to false,
1638-
"show_steps" to false, "show_screen_time" to false,
1639-
"show_next_alarm" to true, "size_next_alarm" to 14f,
1640-
"show_world_clock" to false,
1641-
"show_events" to false, "show_tasks" to false,
1616+
"bold_battery" to false, "bold_temp" to false,
1617+
"bold_storage" to false, "bold_ram" to false, "bold_data_usage" to false,
16421618
"show_outline" to true, "bg_opacity" to 90f,
16431619
"font_style" to 2, // Monospace
16441620
"use_dynamic_colors" to false,
16451621
"text_color_primary_idx" to 2, "text_color_primary_r" to 0, "text_color_primary_g" to 255, "text_color_primary_b" to 65,
16461622
"text_color_secondary_idx" to 2, "text_color_secondary_r" to 0, "text_color_secondary_g" to 180, "text_color_secondary_b" to 50,
16471623
"date_color_idx" to 2, "date_color_r" to 0, "date_color_g" to 200, "date_color_b" to 80,
16481624
"outline_color_idx" to 2, "outline_color_r" to 0, "outline_color_g" to 120, "outline_color_b" to 40,
1649-
"bg_color_idx" to 2, "bg_color_r" to 5, "bg_color_g" to 15, "bg_color_b" to 5,
1650-
"widget_right_column_order" to "show_battery,show_storage,show_ram,show_data_usage,show_temp,show_weather_condition,show_steps,show_screen_time"
1625+
"bg_color_idx" to 2, "bg_color_r" to 5, "bg_color_g" to 15, "bg_color_b" to 5
16511626
)),
16521627
// Sunset: warm oranges/gold, serif font, elegant minimal
16531628
Preset("sunset", "Sunset", mapOf(
1654-
"show_time" to true, "size_time" to 54f,
1655-
"show_date" to true, "size_date" to 18f,
1656-
"show_battery" to true, "size_battery" to 24f, "bold_battery" to true,
1657-
"show_temp" to false, "show_storage" to false, "show_ram" to false,
1658-
"show_data_usage" to false, "show_steps" to false,
1659-
"show_screen_time" to false,
1660-
"show_next_alarm" to true, "size_next_alarm" to 14f,
1661-
"show_world_clock" to false,
1662-
"show_events" to false, "show_tasks" to false,
1629+
"bold_battery" to true,
16631630
"show_outline" to false, "bg_opacity" to 70f,
16641631
"font_style" to 1, // Serif
16651632
"use_dynamic_colors" to false,
16661633
"text_color_primary_idx" to 2, "text_color_primary_r" to 255, "text_color_primary_g" to 180, "text_color_primary_b" to 50,
16671634
"text_color_secondary_idx" to 2, "text_color_secondary_r" to 230, "text_color_secondary_g" to 140, "text_color_secondary_b" to 60,
16681635
"date_color_idx" to 2, "date_color_r" to 255, "date_color_g" to 120, "date_color_b" to 50,
1669-
"bg_color_idx" to 2, "bg_color_r" to 30, "bg_color_g" to 15, "bg_color_b" to 8,
1670-
"widget_right_column_order" to "show_battery,show_temp,show_weather_condition,show_data_usage,show_storage,show_ram,show_steps,show_screen_time"
1636+
"bg_color_idx" to 2, "bg_color_r" to 30, "bg_color_g" to 15, "bg_color_b" to 8
16711637
)),
16721638
// Monochrome: white outline, all white text, medium font, classic layout
16731639
Preset("monochrome", "Monochrome", mapOf(
1674-
"show_time" to true, "size_time" to 48f,
1675-
"show_date" to true, "size_date" to 14f,
1676-
"show_battery" to true, "size_battery" to 22f, "bold_battery" to false,
1677-
"show_temp" to false, "show_storage" to true, "size_storage" to 14f, "show_ram" to false, "size_ram" to 14f,
1678-
"show_data_usage" to false, "show_steps" to false,
1679-
"show_screen_time" to false,
1680-
"show_next_alarm" to true, "size_next_alarm" to 14f,
1681-
"show_world_clock" to false,
1682-
"show_events" to false, "show_tasks" to false,
1640+
"bold_battery" to false,
16831641
"show_outline" to true, "bg_opacity" to 50f,
16841642
"font_style" to 7, // Medium
16851643
"use_dynamic_colors" to false,
16861644
"text_color_primary_idx" to 2, "text_color_primary_r" to 240, "text_color_primary_g" to 240, "text_color_primary_b" to 240,
16871645
"text_color_secondary_idx" to 2, "text_color_secondary_r" to 170, "text_color_secondary_g" to 170, "text_color_secondary_b" to 170,
16881646
"date_color_idx" to 2, "date_color_r" to 200, "date_color_g" to 200, "date_color_b" to 200,
16891647
"outline_color_idx" to 2, "outline_color_r" to 100, "outline_color_g" to 100, "outline_color_b" to 100,
1690-
"bg_color_idx" to 2, "bg_color_r" to 25, "bg_color_g" to 25, "bg_color_b" to 25,
1691-
"widget_right_column_order" to "show_battery,show_storage,show_ram,show_temp,show_weather_condition,show_data_usage,show_steps,show_screen_time"
1648+
"bg_color_idx" to 2, "bg_color_r" to 25, "bg_color_g" to 25, "bg_color_b" to 25
16921649
)),
16931650
// Snowfall: icy blues, light font, airy feel
16941651
Preset("snowfall", "Snowfall", mapOf(
1695-
"show_time" to true, "size_time" to 60f,
1696-
"show_date" to true, "size_date" to 16f,
1697-
"show_battery" to false, "show_temp" to true, "size_temp" to 20f, "bold_temp" to false,
1698-
"show_storage" to false, "show_ram" to false, "show_data_usage" to false,
1699-
"show_steps" to false, "show_screen_time" to false,
1700-
"show_next_alarm" to false,
1701-
"show_world_clock" to false,
1702-
"show_events" to false, "show_tasks" to false,
1652+
"bold_temp" to false,
17031653
"show_outline" to false, "bg_opacity" to 60f,
17041654
"font_style" to 6, // Light
17051655
"use_dynamic_colors" to false,
17061656
"text_color_primary_idx" to 2, "text_color_primary_r" to 180, "text_color_primary_g" to 220, "text_color_primary_b" to 255,
17071657
"text_color_secondary_idx" to 2, "text_color_secondary_r" to 130, "text_color_secondary_g" to 180, "text_color_secondary_b" to 230,
17081658
"date_color_idx" to 2, "date_color_r" to 100, "date_color_g" to 170, "date_color_b" to 255,
1709-
"bg_color_idx" to 2, "bg_color_r" to 10, "bg_color_g" to 20, "bg_color_b" to 40,
1710-
"widget_right_column_order" to "show_temp,show_battery,show_weather_condition,show_data_usage,show_storage,show_ram,show_steps,show_screen_time"
1659+
"bg_color_idx" to 2, "bg_color_r" to 10, "bg_color_g" to 20, "bg_color_b" to 40
17111660
))
17121661
)
17131662

docs/release-notes/v2.4.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### 💖 Support Our Work
2+
* We are committed to making our apps as powerful and polished as possible. As an entirely community-funded project, we rely on your support to keep going, please consider becoming a [sponsor](https://github.com/sponsors/LeanBitLab). A huge thank you to all our current supporters!
3+
4+
## 🚀 What's New
5+
6+
### 🎨 Customization & Appearance
7+
- **Updated**: Presets now adjust styling (colors, fonts, opacity, outline) without overriding widget layout or item visibility.
8+
9+
### ⚙️ System & Technical
10+
- **Updated**: Updated target API level to Android 16 (API level 36).
11+
- **Fixed**: Fixed foreground service start exceptions.
12+
- **Fixed**: Fixed RemoteViews live preview crash when applying layout inflation in app preview.

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
android.useAndroidX=true
22
android.enableJetifier=true
3+
android.suppressUnsupportedCompileSdk=36

0 commit comments

Comments
 (0)