Fix polling interval settings and add release build signing
- Fix polling interval not reflecting saved value (use SharingStarted.Eagerly) - Add release build signing configuration with keystore - Add key.properties to .gitignore for security - Add ProGuard rules for JSpecify annotations
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -19,6 +19,9 @@ captures/
|
||||
*.jks
|
||||
*.keystore
|
||||
|
||||
# Key properties (contains sensitive signing info)
|
||||
app/key.properties
|
||||
|
||||
# External native build folder generated in Android Studio 2.2 and later
|
||||
.externalNativeBuild
|
||||
.cxx/
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
import java.util.Properties
|
||||
import java.io.FileInputStream
|
||||
|
||||
// Load keystore properties
|
||||
val keystorePropertiesFile = rootProject.file("app/key.properties")
|
||||
val keystoreProperties = Properties()
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
@@ -22,6 +33,15 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String?
|
||||
keyPassword = keystoreProperties["keyPassword"] as String?
|
||||
storeFile = keystoreProperties["storeFile"]?.let { file("$it") }
|
||||
storePassword = keystoreProperties["storePassword"] as String?
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
@@ -30,6 +50,7 @@ android {
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
debug {
|
||||
isMinifyEnabled = false
|
||||
|
||||
4
app/proguard-rules.pro
vendored
4
app/proguard-rules.pro
vendored
@@ -16,3 +16,7 @@
|
||||
# Kotlin Coroutines
|
||||
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
|
||||
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
|
||||
|
||||
# JSpecify annotations (for Jsoup compatibility)
|
||||
-dontwarn org.jspecify.annotations.**
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ class MainViewModel @Inject constructor(
|
||||
private val _uiState = MutableStateFlow<MainUiState>(MainUiState.Loading)
|
||||
val uiState: StateFlow<MainUiState> = _uiState.asStateFlow()
|
||||
|
||||
// 폴<EFBFBD> 주기
|
||||
// 폴링 주기 (저장된 값 즉시 반영)
|
||||
val pollingInterval: StateFlow<Int> = appSettings.pollingInterval
|
||||
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), 2)
|
||||
.stateIn(viewModelScope, SharingStarted.Eagerly, 2)
|
||||
|
||||
init {
|
||||
initializeApp()
|
||||
|
||||
Reference in New Issue
Block a user