mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Exclude play-services-oss-licenses library from F-Droid build (#814)
This commit is contained in:
parent
8ef5c60e2e
commit
d662b4a9b4
6 changed files with 58 additions and 6 deletions
|
@ -15,6 +15,7 @@ Improvements 🙌:
|
|||
|
||||
Other changes:
|
||||
- Change the way RiotX identifies a session to allow the SDK to support several sessions with the same user (#800)
|
||||
- Exclude play-services-oss-licenses library from F-Droid build (#814)
|
||||
|
||||
Bugfix 🐛:
|
||||
- Fix crash when opening room creation screen from the room filtering screen
|
||||
|
|
|
@ -186,6 +186,7 @@ android {
|
|||
gplay {
|
||||
dimension "store"
|
||||
|
||||
resValue "bool", "isGplay", "true"
|
||||
buildConfigField "boolean", "ALLOW_FCM_USE", "true"
|
||||
buildConfigField "String", "SHORT_FLAVOR_DESCRIPTION", "\"G\""
|
||||
buildConfigField "String", "FLAVOR_DESCRIPTION", "\"GooglePlay\""
|
||||
|
@ -194,6 +195,7 @@ android {
|
|||
fdroid {
|
||||
dimension "store"
|
||||
|
||||
resValue "bool", "isGplay", "false"
|
||||
buildConfigField "boolean", "ALLOW_FCM_USE", "false"
|
||||
buildConfigField "String", "SHORT_FLAVOR_DESCRIPTION", "\"F\""
|
||||
buildConfigField "String", "FLAVOR_DESCRIPTION", "\"FDroid\""
|
||||
|
@ -249,9 +251,6 @@ dependencies {
|
|||
implementation "com.squareup.moshi:moshi-adapters:$moshi_version"
|
||||
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version"
|
||||
|
||||
// OSS License
|
||||
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
|
||||
|
||||
// Log
|
||||
implementation 'com.jakewharton.timber:timber:4.7.1'
|
||||
|
||||
|
@ -343,6 +342,9 @@ dependencies {
|
|||
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
|
||||
}
|
||||
|
||||
// OSS License, gplay flavor only
|
||||
gplayImplementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
|
||||
|
||||
implementation "androidx.emoji:emoji-appcompat:1.0.0"
|
||||
|
||||
// TESTS
|
||||
|
|
22
vector/src/fdroid/java/im/vector/riotx/FlavorCode.kt
Normal file
22
vector/src/fdroid/java/im/vector/riotx/FlavorCode.kt
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright 2020 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
|
||||
*
|
||||
* http://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 im.vector.riotx
|
||||
|
||||
import android.content.Context
|
||||
|
||||
// No op
|
||||
fun openOssLicensesMenuActivity(context: Context) = Unit
|
24
vector/src/gplay/java/im/vector/riotx/FlavorCode.kt
Normal file
24
vector/src/gplay/java/im/vector/riotx/FlavorCode.kt
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright 2020 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
|
||||
*
|
||||
* http://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 im.vector.riotx
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
|
||||
|
||||
fun openOssLicensesMenuActivity(context: Context) = context.startActivity(Intent(context, OssLicensesMenuActivity::class.java))
|
||||
|
|
@ -20,13 +20,13 @@ import android.content.Intent
|
|||
import android.net.Uri
|
||||
import android.provider.Settings
|
||||
import androidx.preference.Preference
|
||||
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
|
||||
import im.vector.matrix.android.api.Matrix
|
||||
import im.vector.riotx.R
|
||||
import im.vector.riotx.core.preference.VectorPreference
|
||||
import im.vector.riotx.core.utils.copyToClipboard
|
||||
import im.vector.riotx.core.utils.displayInWebView
|
||||
import im.vector.riotx.features.version.VersionProvider
|
||||
import im.vector.riotx.openOssLicensesMenuActivity
|
||||
import javax.inject.Inject
|
||||
|
||||
class VectorSettingsHelpAboutFragment @Inject constructor(
|
||||
|
@ -107,10 +107,11 @@ class VectorSettingsHelpAboutFragment @Inject constructor(
|
|||
false
|
||||
}
|
||||
|
||||
// Note: preference is not visible on F-Droid build
|
||||
findPreference<VectorPreference>(VectorPreferences.SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY)!!
|
||||
.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||
// See https://developers.google.com/android/guides/opensource
|
||||
startActivity(Intent(requireActivity(), OssLicensesMenuActivity::class.java))
|
||||
openOssLicensesMenuActivity(requireActivity())
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreference
|
||||
|
@ -40,6 +41,7 @@
|
|||
|
||||
<im.vector.riotx.core.preference.VectorPreference
|
||||
android:key="SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
|
||||
android:title="@string/settings_other_third_party_notices" />
|
||||
android:title="@string/settings_other_third_party_notices"
|
||||
app:isPreferenceVisible="@bool/isGplay" />
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in a new issue