2019-05-10 00:05:49 +02:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2019-07-12 20:38:15 +02:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2019-05-10 00:05:49 +02:00
|
|
|
|
|
|
|
package org.mozilla.fenix
|
|
|
|
|
|
|
|
enum class ReleaseChannel {
|
2019-06-03 16:32:38 +02:00
|
|
|
Debug, Nightly, Beta, Production;
|
2019-05-10 00:05:49 +02:00
|
|
|
|
|
|
|
val isReleased: Boolean
|
|
|
|
get() = when (this) {
|
2019-06-03 16:32:38 +02:00
|
|
|
Debug -> false
|
|
|
|
else -> true
|
2019-05-10 00:05:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
object Config {
|
|
|
|
val channel = when (BuildConfig.BUILD_TYPE) {
|
2019-06-03 16:32:38 +02:00
|
|
|
"production" -> ReleaseChannel.Production
|
2019-05-10 00:05:49 +02:00
|
|
|
"beta" -> ReleaseChannel.Beta
|
|
|
|
"nightly" -> ReleaseChannel.Nightly
|
2019-06-03 16:32:38 +02:00
|
|
|
"debug" -> ReleaseChannel.Debug
|
|
|
|
else -> ReleaseChannel.Production // Performance-test builds should test production behaviour
|
2019-05-10 00:05:49 +02:00
|
|
|
}
|
|
|
|
}
|