Skip to content

Commit f77b3e6

Browse files
committed
v1.3.0 - Reduced icon size from 512px to 256px for much smaller APK
1 parent 74354e4 commit f77b3e6

38 files changed

+34
-82
lines changed

.kotlin/sessions/kotlin-compiler-8005262243944857030.salive

Whitespace-only changes.

app/build.gradle.kts

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// build.gradle.kts
12
plugins {
23
id("com.android.application")
34
id("org.jetbrains.kotlin.android")
@@ -11,18 +12,16 @@ android {
1112
applicationId = "com.matthew.googleweathericonsv4"
1213
minSdk = 21
1314
targetSdk = 34
14-
versionCode = 2
15-
versionName = "1.1.0"
16-
15+
versionCode = 4
16+
versionName = "1.3.0"
1717
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1818
}
1919

2020
buildTypes {
2121
release {
22-
isMinifyEnabled = false
22+
isMinifyEnabled = true
23+
isShrinkResources = false
2324
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
24-
25-
// Sign with debug key for now - you can add proper signing later
2625
signingConfig = signingConfigs.getByName("debug")
2726
}
2827
}
@@ -35,20 +34,15 @@ android {
3534
kotlinOptions {
3635
jvmTarget = "11"
3736
}
38-
39-
buildFeatures {
40-
viewBinding = true
41-
}
4237
}
4338

4439
dependencies {
40+
// A minimal icon pack might not even need these if the MainActivity is completely empty.
41+
// However, keeping core-ktx is a good practice for compatibility.
42+
// All other dependencies are likely safe to remove.
4543
implementation("androidx.core:core-ktx:1.12.0")
46-
implementation("androidx.appcompat:appcompat:1.6.1")
47-
implementation("com.google.android.material:material:1.11.0")
48-
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
49-
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
5044

51-
// Testing dependencies
45+
// Test dependencies can also be stripped down if not being used.
5246
testImplementation("junit:junit:4.13.2")
5347
androidTestImplementation("androidx.test.ext:junit:1.1.5")
5448
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
499 KB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": 3,
3+
"artifactType": {
4+
"type": "APK",
5+
"kind": "Directory"
6+
},
7+
"applicationId": "com.matthew.googleweathericonsv4",
8+
"variantName": "release",
9+
"elements": [
10+
{
11+
"type": "SINGLE",
12+
"filters": [],
13+
"attributes": [],
14+
"versionCode": 4,
15+
"versionName": "1.3.0",
16+
"outputFile": "app-release.apk"
17+
}
18+
],
19+
"elementType": "File",
20+
"minSdkVersionForDexing": 21
21+
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
android:label="@string/app_name"
1111
android:roundIcon="@drawable/ic_launcher"
1212
android:supportsRtl="true"
13-
android:theme="@style/Theme.GoogleWeatherIconsV4"
13+
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
1414
tools:targetApi="31">
1515

1616
<!-- Main activity for Breezy Weather integration -->

app/src/main/java/com/matthew/googleweathericonsv4/MainActivity.kt

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,17 @@
11
package com.matthew.googleweathericonsv4
22

3+
import android.app.Activity
34
import android.content.Intent
4-
import android.net.Uri
55
import android.os.Bundle
6-
import android.widget.Button
7-
import android.widget.TextView
8-
import androidx.appcompat.app.AppCompatActivity
96

10-
class MainActivity : AppCompatActivity() {
7+
class MainActivity : Activity() {
118

129
override fun onCreate(savedInstanceState: Bundle?) {
1310
super.onCreate(savedInstanceState)
14-
15-
// Handle Breezy Weather icon provider intent
16-
if (intent?.action == "org.breezyweather.ICON_PROVIDER") {
17-
handleIconProviderRequest()
18-
return
19-
}
20-
21-
setContentView(R.layout.activity_main)
22-
23-
// Initialize UI elements
24-
val titleText: TextView = findViewById(R.id.title_text)
25-
val descriptionText: TextView = findViewById(R.id.description_text)
26-
val openBreezyWeatherButton: Button = findViewById(R.id.open_breezy_weather_button)
27-
val githubButton: Button = findViewById(R.id.github_button)
28-
29-
titleText.text = getString(R.string.app_name)
30-
descriptionText.text = getString(R.string.app_description)
31-
32-
// Button to open Breezy Weather
33-
openBreezyWeatherButton.setOnClickListener {
34-
try {
35-
val intent = packageManager.getLaunchIntentForPackage("org.breezyweather")
36-
if (intent != null) {
37-
startActivity(intent)
38-
} else {
39-
val browserIntent = Intent(Intent.ACTION_VIEW,
40-
Uri.parse("https://github.com/breezy-weather/breezy-weather/releases"))
41-
startActivity(browserIntent)
42-
}
43-
} catch (e: Exception) {
44-
e.printStackTrace()
45-
}
46-
}
47-
48-
// Button to open Google Weather Icons GitHub repository
49-
githubButton.setOnClickListener {
50-
val browserIntent = Intent(Intent.ACTION_VIEW,
51-
Uri.parse("https://github.com/mrdarrengriffin/google-weather-icons"))
52-
startActivity(browserIntent)
53-
}
11+
handleIconProviderRequest()
5412
}
5513

5614
private fun handleIconProviderRequest() {
57-
// Return info about this icon pack to Breezy Weather
5815
val resultIntent = Intent()
5916
resultIntent.putExtra("name", getString(R.string.provider_name))
6017
resultIntent.putExtra("package", packageName)
-7.68 KB
Loading
-7.68 KB
Loading
-4.84 KB
Loading
-7.45 KB
Loading

0 commit comments

Comments
 (0)