mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-29 08:20:51 +00:00
Make release channel flavors, remove mlkit from fdroid channel
This commit is contained in:
parent
faa29675db
commit
e9c0d350e1
@ -33,19 +33,45 @@ android {
|
|||||||
resValue "string", "app_name", "@string/app_name_debug"
|
resValue "string", "app_name", "@string/app_name_debug"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flavorDimensions "channel"
|
||||||
|
|
||||||
|
productFlavors {
|
||||||
|
play {
|
||||||
|
dimension "channel"
|
||||||
|
}
|
||||||
|
|
||||||
|
fdroid {
|
||||||
|
dimension "channel"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
splits {
|
||||||
|
abi {
|
||||||
|
enable true
|
||||||
|
reset()
|
||||||
|
include "x86", "x86_64"
|
||||||
|
universalApk false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '11'
|
jvmTarget = '11'
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
compose true
|
compose true
|
||||||
}
|
}
|
||||||
|
|
||||||
composeOptions {
|
composeOptions {
|
||||||
kotlinCompilerExtensionVersion "1.4.3"
|
kotlinCompilerExtensionVersion "1.4.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
resources {
|
resources {
|
||||||
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
||||||
@ -135,10 +161,10 @@ dependencies {
|
|||||||
implementation "com.halilibo.compose-richtext:richtext-commonmark:0.16.0"
|
implementation "com.halilibo.compose-richtext:richtext-commonmark:0.16.0"
|
||||||
|
|
||||||
// Local model for language identification
|
// Local model for language identification
|
||||||
implementation 'com.google.mlkit:language-id:17.0.4'
|
playImplementation 'com.google.mlkit:language-id:17.0.4'
|
||||||
|
|
||||||
// Google services model the translate text
|
// Google services model the translate text
|
||||||
implementation 'com.google.mlkit:translate:17.0.1'
|
playImplementation 'com.google.mlkit:translate:17.0.1'
|
||||||
|
|
||||||
// Automatic memory leak detection
|
// Automatic memory leak detection
|
||||||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.vitorpamplona.amethyst.ui.components
|
||||||
|
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.navigation.NavController
|
||||||
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun TranslateableRichTextViewer(
|
||||||
|
content: String,
|
||||||
|
canPreview: Boolean,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
|
tags: List<List<String>>?,
|
||||||
|
backgroundColor: Color,
|
||||||
|
accountViewModel: AccountViewModel,
|
||||||
|
navController: NavController
|
||||||
|
) = ExpandableRichTextViewer(
|
||||||
|
content,
|
||||||
|
canPreview,
|
||||||
|
modifier,
|
||||||
|
tags,
|
||||||
|
backgroundColor,
|
||||||
|
accountViewModel,
|
||||||
|
navController
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user