Skip to content

Commit 384f750

Browse files
LennoardLennoard
authored andcommitted
release: [3.0.0] versionCode 17
Signed-off-by: Lennoard <lennoardrai@gmail.com>
1 parent f3ae909 commit 384f750

File tree

13 files changed

+137
-58
lines changed

13 files changed

+137
-58
lines changed

README.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,43 @@ A GUI application for Android <code>sysctl</code> to edit kernel variables
2323
## Features
2424
- Browse filesystem for specific kernel parameters
2525
- Select parameters from a searchable list
26-
- Information about known parameters
26+
- Show documentation for known parameters
2727
- Load parameters from a configuration file
2828
- Reapply parameters at startup
2929
- Mark parameters as favorite for easy access
3030

3131
## Technologies
3232

33-
- MVI / MVVM for user params
34-
- [Jetpack Compose](https://developer.android.com/jetpack/compose) Material 3 UI
35-
- [Jetpack Data Binding](https://developer.android.com/topic/libraries/data-binding)
36-
- [Jetpack View Binding](https://developer.android.com/topic/libraries/view-binding)
37-
- Lifecycle-aware Kotlin Coroutines
38-
- Kotlin Flows
39-
- Dependency injection with [Koin](https://insert-koin.io/)
33+
This project utilizes a modern Android development stack, leveraging a comprehensive suite of libraries and tools:
34+
35+
- **Core & Architecture:**
36+
- Architectural Patterns: MVI, reactive and maintainable.
37+
- [Kotlin](https://kotlinlang.org/): For modern, concise, and safe programming.
38+
- Android Jetpack:
39+
- [Lifecycle](https://developer.android.com/jetpack/androidx/releases/lifecycle)
40+
- [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel)
41+
- [Navigation Component](https://developer.android.com/guide/navigation)
42+
- [Room](https://developer.android.com/training/data-storage/room): For local data persistence.
43+
- [WorkManager](https://developer.android.com/topic/libraries/architecture/workmanager): For deferrable, asynchronous tasks.
44+
- **UI Development:**
45+
- [Jetpack Compose](https://developer.android.com/jetpack/compose): For building native UIs with a declarative approach.
46+
- Compose Material 3 & Material Components
47+
- [Jetpack Glance](https://developer.android.com/develop/ui/compose/glance): For creating App Widgets with Jetpack Compose.
48+
- **Asynchronous Programming:**
49+
- [Kotlin Coroutines](https://kotlinlang.org/docs/coroutines-overview.html) & [Flows](https://kotlinlang.org/docs/flow.html): For efficient and structured background tasks and reactive data streams.
50+
- **Utilities:**
51+
- [Koin](https://insert-koin.io/): Dependency injection framework for Kotlin.
52+
- [Ktor Client](https://ktor.io/docs/client-reference.html): For making HTTP requests (used for parameter documentation).
53+
- [Libsu](https://github.com/topjohnwu/libsu): For interacting with root services.
54+
- [Jsoup](https://jsoup.org/): For parsing HTML (used for parameter documentation).
55+
- [Kotlinx Serialization](https://github.com/Kotlin/kotlinx.serialization): For JSON serialization/deserialization.
56+
57+
## Contributing
58+
59+
We welcome contributions to SysctlGUI!
60+
61+
### Translations
62+
If you'd like to help translate the app into other languages, please see the [translation guide](TRANSLATING.md) for instructions on how to get started. Your contributions will help make SysctlGUI accessible to a wider audience.
4063

4164
## Download
4265

@@ -47,7 +70,7 @@ A GUI application for Android <code>sysctl</code> to edit kernel variables
4770

4871
This project is licensed under the terms of the MIT license.
4972

50-
> Copyright (c) 2019-2024 Lennoard.
73+
> Copyright (c) 2019-2025 Lennoard.
5174
>
5275
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5376
>

TRANSLATING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Translating SysctlGUI
2+
3+
Thank you for your interest in translating SysctlGUI! Your contributions help make the app accessible to a wider audience.
4+
5+
## How to Contribute
6+
7+
1. **Fork the Repository:** Start by forking the [SysctlGUI repository](https://github.com/your-github-username/SysctlGUI) (replace `your-github-username/SysctlGUI` with the actual repository URL) to your own GitHub account.
8+
2. **Clone Your Fork:** Clone your forked repository to your local machine.
9+
```bash
10+
git clone https://github.com/YOUR_USERNAME/SysctlGUI.git
11+
cd SysctlGUI
12+
```
13+
3. **Create a New Branch:** Create a new branch for your translation.
14+
```bash
15+
git checkout -b translate-yourlanguage
16+
```
17+
4. **Translate the Files:**
18+
* **String Resources:** These are the primary files for translation.
19+
* `app/src/main/res/values/strings.xml`
20+
* `app/src/main/res/values/params_info.xml`
21+
* `data/src/main/res/values/strings.xml`
22+
23+
To translate these files, create a new `values-xx` directory in the same `res` folder, where `xx` is the ISO 639-1 code for the language you are translating to (e.g., `values-es` for Spanish, `values-de` for German). Then, copy the original `strings.xml` or `params_info.xml` into this new directory and translate the string values within the XML tags.
24+
25+
**Example (strings.xml for Spanish):**
26+
Create `app/src/main/res/values-es/strings.xml` and translate the content, preserving special format tags (%s, %1$s, etc)
27+
```xml
28+
<resources>
29+
<string name="app_name">SysctlGUI</string>
30+
<!-- Translate this -->
31+
<string name="undo">Undo</string>
32+
<string name="selected_file_format">Selected file: %s</string>
33+
<!-- To this -->
34+
<string name="undo">Deshacer</string>
35+
<string name="selected_file_format">Archivo seleccionado: %s</string>
36+
</resources>
37+
```
38+
39+
* **Raw Text Files (Optional):** If you feel brave, you can also translate the `.txt` files located in `data/src/main/res/raw/`.
40+
* When translating these files, it is **crucial** to respect their original format. These files often have a specific structure that the app relies on.
41+
* Translate the text content, but leave any special characters, newlines, or formatting intact.
42+
* Place the translated `.txt` files in a new `raw-xx` directory within `data/src/main/res/` (e.g., `data/src/main/res/raw-es/` for Spanish).
43+
44+
5. **Commit Your Changes:** Commit your translated files with a clear commit message.
45+
```bash
46+
git add .
47+
git commit -m "Add translation to [Your Language]"
48+
```
49+
6. **Push to Your Fork:** Push your changes to your forked repository.
50+
```bash
51+
git push origin translate-yourlanguage
52+
```
53+
7. **Create a Pull Request:** Go to the original SysctlGUI repository on GitHub and create a new Pull Request from your forked branch. Provide a clear description of your changes.
54+
55+
## Important Notes
56+
57+
* Ensure your translations are accurate and natural-sounding in the target language.
58+
* Do not translate resource names (e.g., `app_name` in `<string name="app_name">`). Only translate the text content between the XML tags.
59+
* For `.txt` files, preserving the exact original formatting is critical for the app to function correctly with the translated content.
60+
* If you are unsure about any part of the translation process, feel free to open an issue on the main repository to ask for clarification.
61+
62+
Thank you for your contribution!

app/build.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ android {
1717
applicationId = AppConfig.appId
1818
minSdk = AppConfig.minSdkVersion
1919
targetSdk = AppConfig.targetSdkVersion
20-
versionCode = 16
21-
versionName = "2.2.2"
20+
versionCode = 17
21+
versionName = "3.0.0"
2222
vectorDrawables.useSupportLibrary = true
2323
androidResources {
2424
localeFilters += listOf("en", "de", "pt-rBR", "tr")
@@ -31,6 +31,7 @@ android {
3131
)
3232
}
3333
}
34+
multiDexEnabled = true
3435
}
3536

3637
signingConfigs {
@@ -58,8 +59,7 @@ android {
5859
signingConfig = signingConfigs.getByName("release")
5960
proguardFiles(
6061
getDefaultProguardFile("proguard-android-optimize.txt"),
61-
"proguard-rules.pro",
62-
"proguard-kt.pro"
62+
"proguard-rules.pro"
6363
)
6464
}
6565
}
@@ -117,6 +117,7 @@ dependencies {
117117
implementation(libs.androidx.navigation.compose)
118118
implementation(libs.androidx.window)
119119
implementation(libs.androidx.work.runtime.ktx)
120+
implementation(libs.androidx.multidex)
120121

121122
// Lifecycle
122123
implementation(libs.androidx.lifecycle.runtime.ktx)
@@ -130,4 +131,4 @@ dependencies {
130131
implementation(libs.koin)
131132
implementation(libs.koin.compose)
132133
implementation(libs.bundles.libsu)
133-
}
134+
}

app/proguard-kt.pro

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

app/proguard-rules.pro

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,20 @@
2020
# hide the original source file name.
2121
#-renamesourcefileattribute SourceFile
2222

23-
-keep class android.support.v7.widget.SearchView { *; }
24-
-keep class androidx.appcompat.widget.SearchView { *; }
25-
-keep class android.widget.SearchView { *; }
26-
27-
-keepclassmembers enum * { *; }
28-
29-
# GSON config
30-
-keep public class com.google.gson.**
31-
-keep public class com.google.gson.** {public private protected *;}
32-
-keepattributes *Annotation*,Signature
33-
34-
# Gson specific classes
35-
-keep class sun.misc.Unsafe { *; }
36-
37-
# Application classes that will be serialized/deserialized over Gson
38-
-keep class com.androidvip.sysctlgui.data.models.KernelParam { *; }
39-
-keep class com.androidvip.sysctlgui.data.models.RoomKernelParam { *; }
40-
-keep class com.androidvip.sysctlgui.domain.models.DomainKernelParam { *; }
23+
-keepnames class androidx.lifecycle.ViewModel
24+
-keepclassmembers class * extends androidx.lifecycle.ViewModel { <init>(...); }
25+
-keepclassmembers class * implements androidx.lifecycle.LifecycleObserver { <init>(...); }
26+
-keepclassmembers class * implements androidx.lifecycle.LifecycleOwner { <init>(...); }
27+
-keepclassmembers class androidx.lifecycle.Lifecycle$State { *; }
28+
-keepclassmembers class androidx.lifecycle.Lifecycle$Event { *; }
29+
-keep class * implements androidx.lifecycle.LifecycleOwner { public <init>(...); }
30+
-keep class * implements androidx.lifecycle.LifecycleObserver { public <init>(...); }
31+
32+
-keepclassmembers class com.androidvip.sysctlgui.ui.main.MainViewModel {
33+
static void <clinit>();
34+
}
35+
36+
-keep class org.koin.core.instance.InstanceFactory { *; }
37+
-keep class * extends org.koin.core.module.Module
38+
-keep class org.koin.core.registry.ScopeRegistry { *; }
39+
-keep class org.koin.android.scope.AndroidScopeComponent

app/src/main/kotlin/com/androidvip/sysctlgui/SysctlGuiApp.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.androidvip.sysctlgui
22

3-
import android.app.Application
3+
import androidx.multidex.MultiDexApplication
44
import com.androidvip.sysctlgui.data.di.dataModules
55
import com.androidvip.sysctlgui.di.presentationModule
66
import com.androidvip.sysctlgui.domain.di.domainModule
@@ -10,7 +10,7 @@ import org.koin.android.ext.android.get
1010
import org.koin.android.ext.koin.androidContext
1111
import org.koin.core.context.startKoin
1212

13-
class SysctlGuiApp : Application() {
13+
class SysctlGuiApp : MultiDexApplication() {
1414

1515
override fun onCreate() {
1616
super.onCreate()

common/design/proguard-rules.pro

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile
22+
23+
-keep class com.androidvip.sysctlgui.design.theme.ColorKt { *; }
24+
-keep class com.androidvip.sysctlgui.design.theme.ThemeKt { *; }
25+
-keep class com.androidvip.sysctlgui.design.theme.TypeKt { *; }
26+
-keep class com.androidvip.sysctlgui.design.utils.UiUtilsKt { *; }

common/utils/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ android {
1515
}
1616

1717
buildTypes {
18-
release {
18+
getByName("release") {
1919
isMinifyEnabled = !AppConfig.devCycle
2020
proguardFiles(
2121
getDefaultProguardFile("proguard-android-optimize.txt"),

common/utils/proguard-rules.pro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile
22+
23+
-keep class com.androidvip.sysctlgui.utils.BaseViewModel { *; }
24+
-keep class com.androidvip.sysctlgui.utils.ContextUtilsKt { *; }
25+
-keep class com.androidvip.sysctlgui.utils.MiscKt { *; }

data/consumer-rules.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-keep class com.androidvip.sysctlgui.data.models.KernelParamDTO { *; }

0 commit comments

Comments
 (0)