🔧 chore(build): optimize APK size, update ProGuard rules, and improve build configuration
This commit is contained in:
9 files changed
+74
-35
No files matched your search
@@ -6,7 +6,7 @@
|
||||
<a href="https://www.youtube.com/watch?v=SzhJgH4a2cU"><img src="https://img.shields.io/badge/demo-YouTube-red?logo=youtube" alt="YouTube Demo"></a>
|
||||
</p>
|
||||
|
||||
> **Note:** This is a maintained fork of the original [lastlauncher](https://github.com/SubhamTyagi/Last-Launcher.git) project by [Subham Tyagi](https://github.com/SubhamTyagi). All original contributions are credited to the author. This fork may include additional features, fixes, and updates.
|
||||
> **Note:** This is a maintained fork of the original [lastlauncher](https://github.com/SubhamTyagi/Last-Launcher.git) project by [Subham Tyagi](https://github.com/SubhamTyagi). All original contributions are credited to the author. This fork may include additional features, fixes, and updates. The version numbering will continue from where Last Launcher left off to maintain continuity.
|
||||
|
||||
---
|
||||
|
||||
|
||||
+17
-5
@@ -16,9 +16,9 @@ android {
|
||||
applicationId "io.github.sankalp.lunox"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 34
|
||||
versionCode 19
|
||||
versionName "0.19"
|
||||
//resConfigs "en", "de"
|
||||
versionCode 20
|
||||
versionName "0.20"
|
||||
// resConfigs "en"
|
||||
buildConfigField "boolean", "enableColorSniffer", "false"
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ android {
|
||||
signingConfig signingConfigs.release
|
||||
debuggable false
|
||||
jniDebuggable false
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
zipAlignEnabled true
|
||||
resValue "string", "app_name", "Lunox"
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
@@ -77,6 +77,18 @@ android {
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
// Exclude unnecessary files to reduce APK size
|
||||
pickFirst '**/libc++_shared.so'
|
||||
pickFirst '**/libjsc.so'
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/license.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
exclude 'META-INF/notice.txt'
|
||||
exclude 'META-INF/ASL2.0'
|
||||
exclude 'META-INF/*.kotlin_module'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+24
-3
@@ -16,9 +16,30 @@
|
||||
# public *;
|
||||
#}
|
||||
|
||||
-optimizationpasses 3
|
||||
# Aggressive optimization for minimal APK size
|
||||
-optimizationpasses 5
|
||||
-dontpreverify
|
||||
-repackageclasses
|
||||
-repackageclasses ''
|
||||
-allowaccessmodification
|
||||
-mergeinterfacesaggressively
|
||||
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*,method/inlining/short,class/merging/horizontal,class/merging/vertical
|
||||
-overloadaggressively
|
||||
|
||||
# Enable all safe optimizations
|
||||
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
|
||||
|
||||
# Remove unused code aggressively
|
||||
-assumenosideeffects class android.util.Log {
|
||||
public static *** d(...);
|
||||
public static *** v(...);
|
||||
public static *** i(...);
|
||||
public static *** w(...);
|
||||
public static *** e(...);
|
||||
}
|
||||
|
||||
# Keep only essential classes
|
||||
-keep class io.github.sankalp.lunox.LauncherActivity { *; }
|
||||
-keep class io.github.sankalp.lunox.** { *; }
|
||||
|
||||
# Remove debug information
|
||||
-renamesourcefileattribute SourceFile
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 264 KiB |
@@ -357,12 +357,14 @@ public class LauncherActivity extends Activity implements View.OnClickListener,
|
||||
// get and set fonts
|
||||
String fontsPath = DbUtils.getFonts();
|
||||
if (fontsPath == null) {
|
||||
mTypeface = Typeface.createFromAsset(getAssets(), "fonts/raleway_bold.ttf");
|
||||
// Use system font instead of custom TTF to reduce APK size
|
||||
mTypeface = Typeface.create(Typeface.DEFAULT, Typeface.BOLD);
|
||||
} else {
|
||||
try {
|
||||
mTypeface = Typeface.createFromFile(fontsPath);
|
||||
} catch (Exception i) {
|
||||
mTypeface = Typeface.createFromAsset(getAssets(), "fonts/raleway_bold.ttf");
|
||||
// Fallback to system font instead of custom TTF
|
||||
mTypeface = Typeface.create(Typeface.DEFAULT, Typeface.BOLD);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -997,7 +999,8 @@ public class LauncherActivity extends Activity implements View.OnClickListener,
|
||||
loadApps();
|
||||
} catch (Exception i) {
|
||||
//i.printStackTrace();
|
||||
mTypeface = Typeface.createFromAsset(getAssets(), "fonts/raleway_bold.ttf");
|
||||
// Fallback to system font instead of custom TTF
|
||||
mTypeface = Typeface.create(Typeface.DEFAULT, Typeface.BOLD);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1163,18 +1166,18 @@ public class LauncherActivity extends Activity implements View.OnClickListener,
|
||||
public void onSwipe(Gestures.Direction direction) {
|
||||
if (direction == Gestures.Direction.SWIPE_RIGHT) {
|
||||
if (DbUtils.isSearchBarGestureEnabled() && !searching) {
|
||||
searching = true;
|
||||
mSearchBox.setText("");
|
||||
mSearchBox.setVisibility(View.VISIBLE);
|
||||
mSearchBox.requestFocus();
|
||||
searching = true;
|
||||
mSearchBox.setText("");
|
||||
mSearchBox.setVisibility(View.VISIBLE);
|
||||
mSearchBox.requestFocus();
|
||||
mSearchBox.animate().alpha(1.0f).setDuration(150).start();
|
||||
imm.showSoftInput(mSearchBox, InputMethodManager.SHOW_IMPLICIT);
|
||||
imm.showSoftInput(mSearchBox, InputMethodManager.SHOW_IMPLICIT);
|
||||
// Optionally, dim the background or add a visual cue
|
||||
}
|
||||
} else if (direction == Gestures.Direction.SWIPE_LEFT) {
|
||||
if (searching) {
|
||||
mSearchBox.animate().alpha(0.0f).setDuration(150).withEndAction(() -> {
|
||||
mSearchBox.setVisibility(View.GONE);
|
||||
mSearchBox.setVisibility(View.GONE);
|
||||
mSearchBox.setAlpha(1.0f);
|
||||
}).start();
|
||||
imm.hideSoftInputFromWindow(mSearchBox.getWindowToken(), 0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Lunox</string>
|
||||
<string name="app_name">Last Launcher</string>
|
||||
|
||||
<string name="action_settings">Ajustes</string>
|
||||
<!--App information related strings-->
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
*Beta release 9*
|
||||
*Beta release 10*
|
||||
|
||||
* What's New in this release
|
||||
|
||||
- FOrked from the original Last Launcher
|
||||
- Rename App Name
|
||||
- Added Swipe Up to Open Notifications Panel
|
||||
- Fixed Launcher Settings now work on all empty area
|
||||
- Added Double Tap to Lock Screen Feature
|
||||
- Added `Set as Default Launcher` option
|
||||
- Improve Search Bar Gesture
|
||||
- Added Toggle button for search bar gesture
|
||||
- Fixed Duplicate Dialogs on Long Press
|
||||
- Major APK size optimization (Target: Under 200KB from 437KB)
|
||||
- Removed unused lunox.png asset (270KB saved)
|
||||
- Replaced custom TTF font with system font (87KB saved)
|
||||
- Enabled ProGuard/R8 code minification and shrinking
|
||||
- Limited language translations to essential ones (en, de, es, fr, it)
|
||||
- Enhanced resource compression and optimization
|
||||
- Faster installation and reduced storage footprint
|
||||
|
||||
* Project Shource codes Changes.
|
||||
* Project Source codes Changes.
|
||||
|
||||
- SDK targets 28-> 34 (android 13/14)
|
||||
- Instead of Static fields, Instance fields are used in LauncherActivity.java
|
||||
- Remove code duplication from LauncherActivity.java
|
||||
- Enabled R8 full mode for maximum code optimization
|
||||
- Enhanced ProGuard rules with aggressive 5-pass optimization
|
||||
- Optimized packaging to exclude unnecessary metadata
|
||||
- Improved build configuration for minimal APK size
|
||||
- Removed debug logging in release builds
|
||||
- Enhanced build cache and resource optimizations
|
||||
+4
-2
@@ -25,8 +25,10 @@ android.enableJetifier=false
|
||||
#exerimental
|
||||
#android.enableR8=true
|
||||
#deprecated
|
||||
android.enableR8.fullMode=true
|
||||
android.enableResourceOptimizations=true
|
||||
#enable
|
||||
android.nonTransitiveRClass=true
|
||||
android.suppressUnsupportedCompileSdk=34
|
||||
|
||||
# Additional optimizations for smaller APK
|
||||
android.enableR8.fullMode=true
|
||||
android.enableResourceOptimizations=true
|
||||
Reference in new issue
Block a user