Feat: Added the base for the new settings screen (#130)

* Feat: Added the base for the new settings screen

* Fix: Removed junk from Home

* Fix: Cleanup Setting

* Fix: Bit more advanced settings

Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
This commit is contained in:
HᴇCᴏᴅᴇs2ᴍᴜᴄʜ
2024-09-27 20:40:22 +01:00
committed by GitHub
parent 9601afa861
commit 6b72000c60
32 changed files with 2457 additions and 1456 deletions

View File

@@ -78,14 +78,25 @@ android {
manifestPlaceholders["coarseLocationPermission"] =
"android.permission.ACCESS_COARSE_LOCATION"
val weatherFile = project.rootProject.file("weather.properties")
val properties = Properties()
properties.load(weatherFile.inputStream())
val apiKey = properties.getProperty("WEATHER_API_KEY") ?: ""
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"$apiKey\""
)
if (weatherFile.exists()) {
val properties = Properties()
weatherFile.inputStream().use { inputStream ->
properties.load(inputStream)
}
val apiKey = properties.getProperty("WEATHER_API_KEY") ?: ""
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"$apiKey\""
)
} else {
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"REMOVE\""
)
println("weather.properties file not found.")
}
}
create("withoutInternet") {
@@ -105,16 +116,27 @@ android {
applicationIdSuffix = ".nightly"
versionNameSuffix = "-nightly"
manifestPlaceholders["internetPermission"] = "android.permission.INTERNET"
val weatherFile = project.rootProject.file("weather.properties")
val properties = Properties()
properties.load(weatherFile.inputStream())
val apiKey = properties.getProperty("WEATHER_API_KEY") ?: ""
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"$apiKey\""
)
resValue("string", "app_name", "Easy Launcher (Nightly)")
val weatherFile = project.rootProject.file("weather.properties")
if (weatherFile.exists()) {
val properties = Properties()
weatherFile.inputStream().use { inputStream ->
properties.load(inputStream)
}
val apiKey = properties.getProperty("WEATHER_API_KEY") ?: ""
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"$apiKey\""
)
} else {
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"REMOVE\""
)
println("weather.properties file not found.")
}
}
create("withoutInternetNightly") {