moving build flavor information to the build meta

This commit is contained in:
Adam Brown 2022-07-08 16:53:08 +01:00
parent 18943e3453
commit cceac66504
6 changed files with 10 additions and 6 deletions

View file

@ -221,6 +221,8 @@ object VectorStaticModule {
gitRevisionDate = BuildConfig.GIT_REVISION_DATE,
gitBranchName = BuildConfig.GIT_BRANCH_NAME,
buildNumber = BuildConfig.BUILD_NUMBER,
flavorDescription = BuildConfig.FLAVOR_DESCRIPTION,
flavorShortDescription = BuildConfig.SHORT_FLAVOR_DESCRIPTION,
)
@Provides

View file

@ -27,4 +27,6 @@ data class BuildMeta(
val gitRevisionDate: String,
val gitBranchName: String,
val buildNumber: String,
val flavorDescription: String,
val flavorShortDescription: String,
)

View file

@ -25,7 +25,6 @@ import android.view.View
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentActivity
import com.squareup.moshi.Types
import im.vector.app.BuildConfig
import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.core.extensions.getAllChildFragments
@ -342,7 +341,7 @@ class BugReporter @Inject constructor(
// add some github labels
builder.addFormDataPart("label", buildMeta.versionName)
builder.addFormDataPart("label", BuildConfig.FLAVOR_DESCRIPTION)
builder.addFormDataPart("label", buildMeta.flavorDescription)
builder.addFormDataPart("label", buildMeta.gitBranchName)
// Special for Element

View file

@ -68,7 +68,7 @@ data class E2EWellKnownConfig(
val secureBackupSetupMethods: List<String>? = null,
/**
* Configuration for sharing keys strategy which should be used instead of [im.vector.app.BuildConfig.outboundSessionKeySharingStrategy].
* Configuration for sharing keys strategy which should be used instead of [im.vector.app.config.Config.KEY_SHARING_STRATEGY].
* One of on_room_opening, on_typing or disabled.
*/
@Json(name = "outbound_keys_pre_sharing_mode")

View file

@ -16,7 +16,6 @@
package im.vector.app.features.version
import im.vector.app.BuildConfig
import im.vector.app.core.resources.BuildMeta
import im.vector.app.core.resources.VersionCodeProvider
import javax.inject.Inject
@ -27,9 +26,9 @@ class VersionProvider @Inject constructor(
) {
fun getVersion(longFormat: Boolean, useBuildNumber: Boolean): String {
var result = "${BuildConfig.VERSION_NAME} [${versionCodeProvider.getVersionCode()}]"
var result = "${buildMeta.versionName} [${versionCodeProvider.getVersionCode()}]"
var flavor = BuildConfig.SHORT_FLAVOR_DESCRIPTION
var flavor = buildMeta.flavorShortDescription
if (flavor.isNotBlank()) {
flavor += "-"

View file

@ -30,4 +30,6 @@ fun aBuildMeta() = BuildMeta(
gitRevisionDate = "01-01-01",
gitBranchName = "a-branch-name",
buildNumber = "100",
flavorDescription = "Gplay",
flavorShortDescription = "",
)