Browse Source

Add generated screen to show open source licenses.

For Google Play variant only
pull/3207/head
Benoit Marty 2 months ago committed by Benoit Marty
parent
commit
766ae389ce
  1. 4
      app/build.gradle.kts
  2. 32
      app/src/fdroid/kotlin/io/element/android/x/licenses/FdroidOpenSourceLicensesProvider.kt
  3. 12
      app/src/gplay/AndroidManifest.xml
  4. 37
      app/src/gplay/kotlin/io/element/android/x/licenses/OssOpenSourcesLicensesProvider.kt
  5. 25
      app/src/gplay/res/values-night-v27/themes.xml
  6. 45
      app/src/gplay/res/values-night/themes.xml
  7. 25
      app/src/gplay/res/values-v27/themes.xml
  8. 23
      app/src/gplay/res/values/styles.xml
  9. 47
      app/src/gplay/res/values/themes.xml
  10. 1
      build.gradle.kts
  11. 24
      features/preferences/api/src/main/kotlin/io/element/android/features/preferences/api/OpenSourceLicensesProvider.kt
  12. 5
      features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutNode.kt
  13. 6
      features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutPresenter.kt
  14. 2
      features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutState.kt
  15. 8
      features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutStateProvider.kt
  16. 8
      features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutView.kt
  17. 15
      features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/about/AboutPresenterTest.kt
  18. 100
      features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/about/AboutViewTest.kt
  19. 26
      features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/about/FakeOpenSourceLicensesProvider.kt
  20. 2
      gradle/libs.versions.toml

4
app/build.gradle.kts

@ -36,6 +36,7 @@ plugins { @@ -36,6 +36,7 @@ plugins {
id(libs.plugins.firebaseAppDistribution.get().pluginId)
alias(libs.plugins.knit)
id("kotlin-parcelize")
id("com.google.android.gms.oss-licenses-plugin")
// To be able to update the firebase.xml files, uncomment and build the project
// id("com.google.gms.google-services")
}
@ -250,6 +251,7 @@ dependencies { @@ -250,6 +251,7 @@ dependencies {
implementation(projects.anvilannotations)
implementation(projects.appnav)
implementation(projects.appconfig)
implementation(projects.libraries.uiStrings)
anvil(projects.anvilcodegen)
// Comment to not include firebase in the project
@ -257,6 +259,8 @@ dependencies { @@ -257,6 +259,8 @@ dependencies {
// Comment to not include unified push in the project
implementation(projects.libraries.pushproviders.unifiedpush)
"gplayImplementation"(libs.play.services.oss.licenses)
implementation(libs.appyx.core)
implementation(libs.androidx.splash)
implementation(libs.androidx.core)

32
app/src/fdroid/kotlin/io/element/android/x/licenses/FdroidOpenSourceLicensesProvider.kt

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.x.licenses
import android.app.Activity
import com.squareup.anvil.annotations.ContributesBinding
import io.element.android.features.preferences.api.OpenSourceLicensesProvider
import io.element.android.libraries.di.AppScope
import javax.inject.Inject
@ContributesBinding(AppScope::class)
class FdroidOpenSourceLicensesProvider @Inject constructor() : OpenSourceLicensesProvider {
override val hasOpenSourceLicenses: Boolean = false
override fun navigateToOpenSourceLicenses(activity: Activity) {
error("Not supported, please ensure that hasOpenSourcesLicenses is true before calling this method")
}
}

12
app/src/gplay/AndroidManifest.xml

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="@style/Theme.OssLicenses" />
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:theme="@style/Theme.OssLicenses" />
</application>
</manifest>

37
app/src/gplay/kotlin/io/element/android/x/licenses/OssOpenSourcesLicensesProvider.kt

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.x.licenses
import android.app.Activity
import android.content.Intent
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import com.squareup.anvil.annotations.ContributesBinding
import io.element.android.features.preferences.api.OpenSourceLicensesProvider
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.ui.strings.CommonStrings
import javax.inject.Inject
@ContributesBinding(AppScope::class)
class OssOpenSourcesLicensesProvider @Inject constructor() : OpenSourceLicensesProvider {
override val hasOpenSourceLicenses: Boolean = true
override fun navigateToOpenSourceLicenses(activity: Activity) {
val title = activity.getString(CommonStrings.common_open_source_licenses)
OssLicensesMenuActivity.setActivityTitle(title)
activity.startActivity(Intent(activity, OssLicensesMenuActivity::class.java))
}
}

25
app/src/gplay/res/values-night-v27/themes.xml

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2024 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="Theme.OssLicenses.v27" parent="Base.Theme.OssLicenses">
<item name="android:windowLightNavigationBar">false</item>
</style>
<style name="Theme.OssLicenses" parent="Theme.OssLicenses.v27"/>
</resources>

45
app/src/gplay/res/values-night/themes.xml

@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2024 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<!-- Use a few colors from compoundColorsLight -->
<!-- DarkColorTokens.colorThemeBg -->
<color name="colorThemeBg">#FF101317</color>
<!-- DarkColorTokens.colorGray1400 -->
<color name="textPrimary">#FFEBEEF2</color>
<!-- DarkColorTokens.colorGray900 -->
<color name="textSecondary">#ff808994</color>
<style name="Base.Theme.OssLicenses" parent="Theme.MaterialComponents">
<!-- Background of title bar -->
<item name="colorPrimary">@color/colorThemeBg</item>
<!-- Background of the screen -->
<item name="android:colorBackground">@color/colorThemeBg</item>
<!-- Text of the licenses -->
<item name="android:textColor">@color/textSecondary</item>
<!-- Title, back button and license item text color -->
<item name="android:textColorPrimary">@color/textPrimary</item>
<!-- Background of status bar -->
<item name="android:statusBarColor">@color/colorThemeBg</item>
<item name="android:windowLightStatusBar">false</item>
<!-- Background of navigation bar -->
<item name="android:navigationBarColor">@color/colorThemeBg</item>
</style>
<style name="Theme.OssLicenses" parent="Base.Theme.OssLicenses" />
</resources>

25
app/src/gplay/res/values-v27/themes.xml

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2024 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="Theme.OssLicenses.Light.v27" parent="Base.Theme.OssLicenses.Light">
<item name="android:windowLightNavigationBar">true</item>
</style>
<style name="Theme.OssLicenses" parent="Theme.OssLicenses.Light.v27"/>
</resources>

23
app/src/gplay/res/values/styles.xml

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2024 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="NoElevationToolbar" parent="Widget.MaterialComponents.Toolbar">
<item name="android:elevation">0dp</item>
</style>
</resources>

47
app/src/gplay/res/values/themes.xml

@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2024 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<!-- Use a few colors from compoundColorsLight -->
<!-- LightColorTokens.colorThemeBg -->
<color name="colorThemeBg">#FFFFFFFF</color>
<!-- LightColorTokens.colorGray1400 -->
<color name="textPrimary">#FF1B1D22</color>
<!-- LightColorTokens.colorGray900 -->
<color name="textSecondary">#FF656D77</color>
<style name="Base.Theme.OssLicenses.Light" parent="Theme.MaterialComponents.Light">
<!-- Background of title bar -->
<item name="colorPrimary">@color/colorThemeBg</item>
<!-- Background of the screen -->
<item name="android:colorBackground">@color/colorThemeBg</item>
<!-- Text of the licenses -->
<item name="android:textColor">@color/textSecondary</item>
<!-- Title, back button and license item text color -->
<item name="android:textColorPrimary">@color/textPrimary</item>
<!-- Background of status bar -->
<item name="android:statusBarColor">@color/colorThemeBg</item>
<item name="android:windowLightStatusBar">true</item>
<!-- Background of navigation bar -->
<item name="android:navigationBarColor">@color/colorThemeBg</item>
<!-- Try to remove Toolbar elevation, but it does not work :/ -->
<item name="toolbarStyle">@style/NoElevationToolbar</item>
</style>
<style name="Theme.OssLicenses" parent="Base.Theme.OssLicenses.Light" />
</resources>

1
build.gradle.kts

@ -5,6 +5,7 @@ buildscript { @@ -5,6 +5,7 @@ buildscript {
dependencies {
classpath(libs.kotlin.gradle.plugin)
classpath(libs.gms.google.services)
classpath(libs.oss.licenses.plugin)
}
}

24
features/preferences/api/src/main/kotlin/io/element/android/features/preferences/api/OpenSourceLicensesProvider.kt

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.api
import android.app.Activity
interface OpenSourceLicensesProvider {
val hasOpenSourceLicenses: Boolean
fun navigateToOpenSourceLicenses(activity: Activity)
}

5
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutNode.kt

@ -27,6 +27,7 @@ import dagger.assisted.Assisted @@ -27,6 +27,7 @@ import dagger.assisted.Assisted
import dagger.assisted.AssistedInject
import io.element.android.anvilannotations.ContributesNode
import io.element.android.compound.theme.ElementTheme
import io.element.android.features.preferences.api.OpenSourceLicensesProvider
import io.element.android.libraries.androidutils.browser.openUrlInChromeCustomTab
import io.element.android.libraries.di.SessionScope
@ -35,6 +36,7 @@ class AboutNode @AssistedInject constructor( @@ -35,6 +36,7 @@ class AboutNode @AssistedInject constructor(
@Assisted buildContext: BuildContext,
@Assisted plugins: List<Plugin>,
private val presenter: AboutPresenter,
private val openSourceLicensesProvider: OpenSourceLicensesProvider,
) : Node(buildContext, plugins = plugins) {
private fun onElementLegalClick(
activity: Activity,
@ -55,6 +57,9 @@ class AboutNode @AssistedInject constructor( @@ -55,6 +57,9 @@ class AboutNode @AssistedInject constructor(
onElementLegalClick = { elementLegal ->
onElementLegalClick(activity, isDark, elementLegal)
},
onOpenSourceLicensesClick = {
openSourceLicensesProvider.navigateToOpenSourceLicenses(activity)
},
modifier = modifier
)
}

6
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutPresenter.kt

@ -17,14 +17,18 @@ @@ -17,14 +17,18 @@
package io.element.android.features.preferences.impl.about
import androidx.compose.runtime.Composable
import io.element.android.features.preferences.api.OpenSourceLicensesProvider
import io.element.android.libraries.architecture.Presenter
import javax.inject.Inject
class AboutPresenter @Inject constructor() : Presenter<AboutState> {
class AboutPresenter @Inject constructor(
private val openSourceLicensesProvider: OpenSourceLicensesProvider,
) : Presenter<AboutState> {
@Composable
override fun present(): AboutState {
return AboutState(
elementLegals = getAllLegals(),
hasOpenSourcesLicenses = openSourceLicensesProvider.hasOpenSourceLicenses,
)
}
}

2
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutState.kt

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package io.element.android.features.preferences.impl.about
// Do not use default value, so no member get forgotten in the presenters.
data class AboutState(
val elementLegals: List<ElementLegal>,
val hasOpenSourcesLicenses: Boolean,
)

8
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutStateProvider.kt

@ -21,10 +21,14 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider @@ -21,10 +21,14 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider
open class AboutStateProvider : PreviewParameterProvider<AboutState> {
override val values: Sequence<AboutState>
get() = sequenceOf(
aAboutState(),
anAboutState(),
anAboutState(hasOpenSourcesLicenses = true),
)
}
fun aAboutState() = AboutState(
fun anAboutState(
hasOpenSourcesLicenses: Boolean = false,
) = AboutState(
elementLegals = getAllLegals(),
hasOpenSourcesLicenses = hasOpenSourcesLicenses,
)

8
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutView.kt

@ -30,6 +30,7 @@ import io.element.android.libraries.ui.strings.CommonStrings @@ -30,6 +30,7 @@ import io.element.android.libraries.ui.strings.CommonStrings
fun AboutView(
state: AboutState,
onElementLegalClick: (ElementLegal) -> Unit,
onOpenSourceLicensesClick: () -> Unit,
onBackClick: () -> Unit,
modifier: Modifier = Modifier,
) {
@ -44,6 +45,12 @@ fun AboutView( @@ -44,6 +45,12 @@ fun AboutView(
onClick = { onElementLegalClick(elementLegal) }
)
}
if (state.hasOpenSourcesLicenses) {
PreferenceText(
title = stringResource(id = CommonStrings.common_open_source_licenses),
onClick = onOpenSourceLicensesClick,
)
}
}
}
@ -53,6 +60,7 @@ internal fun AboutViewPreview(@PreviewParameter(AboutStateProvider::class) state @@ -53,6 +60,7 @@ internal fun AboutViewPreview(@PreviewParameter(AboutStateProvider::class) state
AboutView(
state = state,
onElementLegalClick = {},
onOpenSourceLicensesClick = {},
onBackClick = {},
)
}

15
features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/about/AboutPresenterTest.kt

@ -31,12 +31,25 @@ class AboutPresenterTest { @@ -31,12 +31,25 @@ class AboutPresenterTest {
@Test
fun `present - initial state`() = runTest {
val presenter = AboutPresenter()
val presenter = AboutPresenter(FakeOpenSourceLicensesProvider(hasOpenSourceLicenses = true))
moleculeFlow(RecompositionMode.Immediate) {
presenter.present()
}.test {
val initialState = awaitItem()
assertThat(initialState.elementLegals).isEqualTo(getAllLegals())
assertThat(initialState.hasOpenSourcesLicenses).isTrue()
}
}
@Test
fun `present - initial state, no open source licenses`() = runTest {
val presenter = AboutPresenter(FakeOpenSourceLicensesProvider(hasOpenSourceLicenses = false))
moleculeFlow(RecompositionMode.Immediate) {
presenter.present()
}.test {
val initialState = awaitItem()
assertThat(initialState.elementLegals).isEqualTo(getAllLegals())
assertThat(initialState.hasOpenSourcesLicenses).isFalse()
}
}
}

100
features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/about/AboutViewTest.kt

@ -0,0 +1,100 @@ @@ -0,0 +1,100 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.about
import androidx.activity.ComponentActivity
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.test.ext.junit.runners.AndroidJUnit4
import io.element.android.libraries.ui.strings.CommonStrings
import io.element.android.tests.testutils.EnsureNeverCalled
import io.element.android.tests.testutils.EnsureNeverCalledWithParam
import io.element.android.tests.testutils.clickOn
import io.element.android.tests.testutils.ensureCalledOnce
import io.element.android.tests.testutils.ensureCalledOnceWithParam
import io.element.android.tests.testutils.pressBack
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestRule
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class AboutViewTest {
@get:Rule val rule = createAndroidComposeRule<ComponentActivity>()
@Test
fun `clicking on back invokes back callback`() {
ensureCalledOnce { callback ->
rule.setAboutView(
anAboutState(),
onBackClick = callback,
)
rule.pressBack()
}
}
@Test
fun `clicking on an item invokes the expected callback`() {
val state = anAboutState()
ensureCalledOnceWithParam(state.elementLegals.first()) { callback ->
rule.setAboutView(
state,
onElementLegalClick = callback,
)
rule.clickOn(state.elementLegals.first().titleRes)
}
}
@Test
fun `if open source licenses are not available, the entry is not displayed`() {
rule.setAboutView(
anAboutState(),
)
val text = rule.activity.getString(CommonStrings.common_open_source_licenses)
rule.onNodeWithText(text).assertDoesNotExist()
}
@Test
fun `if open source licenses are available, clicking on the entry invokes the expected callback`() {
ensureCalledOnce { callback ->
rule.setAboutView(
anAboutState(
hasOpenSourcesLicenses = true,
),
onOpenSourceLicensesClick = callback,
)
rule.clickOn(CommonStrings.common_open_source_licenses)
}
}
}
private fun <R : TestRule> AndroidComposeTestRule<R, ComponentActivity>.setAboutView(
state: AboutState,
onElementLegalClick: (ElementLegal) -> Unit = EnsureNeverCalledWithParam(),
onOpenSourceLicensesClick: () -> Unit = EnsureNeverCalled(),
onBackClick: () -> Unit = EnsureNeverCalled(),
) {
setContent {
AboutView(
state = state,
onElementLegalClick = onElementLegalClick,
onOpenSourceLicensesClick = onOpenSourceLicensesClick,
onBackClick = onBackClick,
)
}
}

26
features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/about/FakeOpenSourceLicensesProvider.kt

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.about
import android.app.Activity
import io.element.android.features.preferences.api.OpenSourceLicensesProvider
class FakeOpenSourceLicensesProvider(
override val hasOpenSourceLicenses: Boolean,
) : OpenSourceLicensesProvider {
override fun navigateToOpenSourceLicenses(activity: Activity) = Unit
}

2
gradle/libs.versions.toml

@ -70,6 +70,7 @@ gms_google_services = "com.google.gms:google-services:4.4.2" @@ -70,6 +70,7 @@ gms_google_services = "com.google.gms:google-services:4.4.2"
google_firebase_bom = "com.google.firebase:firebase-bom:33.1.2"
firebase_appdistribution_gradle = { module = "com.google.firebase:firebase-appdistribution-gradle", version.ref = "firebaseAppDistribution" }
autonomousapps_dependencyanalysis_plugin = { module = "com.autonomousapps:dependency-analysis-gradle-plugin", version.ref = "dependencyAnalysis" }
oss_licenses_plugin = "com.google.android.gms:oss-licenses-plugin:0.10.6"
# AndroidX
androidx_core = { module = "androidx.core:core", version.ref = "core" }
@ -182,6 +183,7 @@ maplibre_annotation = "org.maplibre.gl:android-plugin-annotation-v9:3.0.0" @@ -182,6 +183,7 @@ maplibre_annotation = "org.maplibre.gl:android-plugin-annotation-v9:3.0.0"
opusencoder = "io.element.android:opusencoder:1.1.0"
kotlinpoet = "com.squareup:kotlinpoet:1.18.1"
zxing_cpp = "io.github.zxing-cpp:android:2.2.0"
play_services_oss_licenses = "com.google.android.gms:play-services-oss-licenses:17.1.0"
# Analytics
posthog = "com.posthog:posthog-android:3.4.2"

Loading…
Cancel
Save