config storing
This commit is contained in:
parent
df53857426
commit
95c34fb431
3 changed files with 7 additions and 8 deletions
|
|
@ -32,15 +32,13 @@ android {
|
|||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["password"] as String
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["password"] as String
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
||||
|
|
@ -54,7 +52,6 @@ android {
|
|||
}
|
||||
}
|
||||
getByName("release") {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(
|
||||
*fileTree(".") { include("**/*.pro") }
|
||||
|
|
@ -62,6 +59,9 @@ android {
|
|||
.toList().toTypedArray()
|
||||
)
|
||||
}
|
||||
getByName("release") {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<!-- AndroidTV support -->
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ impl Default for CoreCFG {
|
|||
pub fn load_config(path: Option<PathBuf>) -> Config {
|
||||
match path {
|
||||
Some(p) => confy::load_path(p).expect("Configuration could not be loaded"),
|
||||
None => confy::load("apographe", Some("config"))
|
||||
None => confy::load("apograph", Some("config"))
|
||||
.ok()
|
||||
.unwrap_or_else(|| {
|
||||
let config: Config = Config::default();
|
||||
let _ = confy::store("aphorme", Some("config"), Config::default());
|
||||
let _ = confy::store("apograph", Some("config"), Config::default());
|
||||
config
|
||||
}),
|
||||
}
|
||||
|
|
@ -68,6 +68,7 @@ pub fn set_basepath(app_handle: tauri::AppHandle, path: String) -> bool {
|
|||
// Lock the mutex to get mutable access:
|
||||
let mut config = config.lock().unwrap();
|
||||
config.core_cfg.home_path = Some(basepath);
|
||||
let _ = confy::store("apograph", Some("config"), config.clone());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue