Skip to content

Commit

Permalink
Added list of debug servers
Browse files Browse the repository at this point in the history
  • Loading branch information
sirekanian committed Feb 10, 2024
1 parent cf6ca3f commit d0630ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ android {
isDebuggable = props.getProperty("DEBUGGABLE").toBoolean()
applicationIdSuffix = ".debug"
buildConfigField("boolean", "DEBUG", "true")
listOf("DEBUG_SERVER1", "DEBUG_SERVER2").forEach { key ->
buildConfigField("String", key, props.getProperty(key)?.let { "\"$it\"" } ?: "null")
}
val debugServers = props.getProperty("DEBUG_SERVERS").split('|').map { "\"$it\"" }
buildConfigField("String[]", "DEBUG_SERVERS", debugServers.joinToString(",", "{", "}"))
}
release {
isMinifyEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ class DebugDaoImpl(private val database: OutlineDatabase) : DebugDao {
database.transaction {
keyQueries.truncate()
serverQueries.truncate()
listOfNotNull(
BuildConfig.DEBUG_SERVER1,
BuildConfig.DEBUG_SERVER2,
).forEachIndexed { index, url ->
BuildConfig.DEBUG_SERVERS.forEachIndexed { index, url ->
serverQueries.insert(ServerEntity(url, true, "Server ${index + 1}", null, null))
}
}
Expand Down

0 comments on commit d0630ed

Please sign in to comment.