mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
format gracefully and beautifully from buildgradle.kts
This commit is contained in:
parent
b205907e62
commit
e80dc9585d
3 changed files with 7 additions and 15 deletions
|
@ -3,6 +3,8 @@ import org.jetbrains.dokka.gradle.DokkaTask
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.net.URL
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
|
@ -69,10 +71,9 @@ android {
|
|||
// Reads local.properties
|
||||
val localProperties = gradleLocalProperties(rootDir)
|
||||
|
||||
buildConfigField(
|
||||
"String",
|
||||
buildConfigField ("String",
|
||||
"BUILDDATE",
|
||||
"new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm\").format(new java.util.Date(" + System.currentTimeMillis() + "L));"
|
||||
"\"${SimpleDateFormat("dd/MM/yy hh:mm a").format(Date())}\""
|
||||
)
|
||||
buildConfigField(
|
||||
"String",
|
||||
|
|
|
@ -30,8 +30,6 @@ import com.lagradost.cloudstream3.utils.UIHelper.navigate
|
|||
import com.lagradost.cloudstream3.utils.UIHelper.setImage
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.toPx
|
||||
import java.io.File
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class SettingsFragment : Fragment() {
|
||||
companion object {
|
||||
|
@ -183,17 +181,10 @@ class SettingsFragment : Fragment() {
|
|||
val appVersion = getString(R.string.app_version)
|
||||
val commitInfo = getString(R.string.commit_hash)
|
||||
val buildDate = BuildConfig.BUILDDATE
|
||||
val formattedDate = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault())
|
||||
.parse(buildDate)?.let { date ->
|
||||
SimpleDateFormat("dd/MM/yy hh:mm a", Locale.getDefault()).format(date)
|
||||
}
|
||||
|
||||
binding?.buildDate?.text = formattedDate
|
||||
binding?.buildDate?.text = buildDate
|
||||
binding?.appVersionInfo?.setOnLongClickListener {
|
||||
clipboardHelper(
|
||||
txt(R.string.extension_version),
|
||||
"$appVersion $commitInfo $formattedDate"
|
||||
)
|
||||
clipboardHelper(txt(R.string.extension_version), "$appVersion $commitInfo $buildDate")
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:textColor="?attr/textColor"
|
||||
tools:text="21-03-2024 19:01"/>
|
||||
tools:text="21/03/2024 09:02 pm"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue