From 4d74db0bc93a9f5afebeac8f80f7f9ef456bd0f3 Mon Sep 17 00:00:00 2001 From: AbdallahMehiz Date: Sun, 1 Sep 2024 07:25:26 +0100 Subject: [PATCH] chore(fdroid): remove timestamp i don't know why i was so adamant on keeping it tbh. --- .github/workflows/release.yml | 14 ++------------ app/build.gradle.kts | 15 --------------- .../mpvkt/presentation/crash/CrashActivity.kt | 2 +- .../live/mehiz/mpvkt/ui/player/PlayerActivity.kt | 1 + .../mehiz/mpvkt/ui/preferences/AboutScreen.kt | 1 - app/src/main/res/values/strings.xml | 2 +- 6 files changed, 5 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0efb3d9..5c930a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,15 +23,8 @@ jobs: distribution: 'adopt' java-version: 17 - - name: Pre-build - run: | - set -e - - timestamp=`date +%s` - echo -e "\ntimestamp=$timestamp" >> gradle.properties - echo "BUILD_TIMESTAMP=$timestamp" >> $GITHUB_ENV - - chmod +x ./gradlew + - name: Make gradlew executable + run: chmod +x ./gradlew - name: Build release with Gradle run: ./gradlew assembleRelease @@ -63,8 +56,6 @@ jobs: cp app/build/outputs/apk/release/app-{}-release-unsigned-signed.apk mpvKt-{}-${{ env.VERSION_TAG }}.apk sha=$(sha256sum mpvKt-{}-${{ env.VERSION_TAG }}.apk | awk '\''{ print $1 }'\'') echo "apk-{}-sha256=$sha" >> $GITHUB_ENV' - - echo '{"timestamp": ${{ env.BUILD_TIMESTAMP }}}' | jq >> build-metadata.json - name: Create release uses: softprops/action-gh-release@v1 @@ -84,7 +75,6 @@ jobs: | x86 | ${{ env.apk-x86-sha256 }} | x86_64 | ${{ env.apk-x86_64-sha256 }} | files: | - build-metadata.json mpvKt-universal-${{ env.VERSION_TAG }}.apk mpvKt-arm64-v8a-${{ env.VERSION_TAG }}.apk mpvKt-armeabi-v7a-${{ env.VERSION_TAG }}.apk diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cbd06e6..d4a54b7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,9 +1,6 @@ import com.android.build.api.variant.FilterConfiguration import io.gitlab.arturbosch.detekt.Detekt import org.apache.commons.io.output.ByteArrayOutputStream -import java.time.Instant -import java.time.ZoneOffset -import java.time.format.DateTimeFormatter plugins { alias(libs.plugins.ksp) @@ -30,18 +27,6 @@ android { useSupportLibrary = true } - val timestamp: Long = if (project.hasProperty("timestamp")) { - project.properties["timestamp"].toString().toLong() - } else { - Instant.now().epochSecond - } - val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss") - buildConfigField( - "String", - "BUILD_TIME", - "\"${Instant.ofEpochSecond(timestamp).atOffset(ZoneOffset.UTC).format(dateTimeFormatter)}\"", - ) - buildConfigField("String", "GIT_SHA", "\"${getCommitSha()}\"") buildConfigField("int", "GIT_COUNT", getCommitCount()) } diff --git a/app/src/main/java/live/mehiz/mpvkt/presentation/crash/CrashActivity.kt b/app/src/main/java/live/mehiz/mpvkt/presentation/crash/CrashActivity.kt index 6a3c4e4..2278afd 100644 --- a/app/src/main/java/live/mehiz/mpvkt/presentation/crash/CrashActivity.kt +++ b/app/src/main/java/live/mehiz/mpvkt/presentation/crash/CrashActivity.kt @@ -255,7 +255,7 @@ class CrashActivity : ComponentActivity() { fun collectDeviceInfo(): String { return """ - App version: ${BuildConfig.VERSION_NAME} (${BuildConfig.GIT_SHA}/${BuildConfig.BUILD_TIME}) + App version: ${BuildConfig.VERSION_NAME} (${BuildConfig.GIT_SHA}) Android version: ${Build.VERSION.RELEASE} (${Build.VERSION.SDK_INT}) Device brand: ${Build.BRAND} Device manufacturer: ${Build.MANUFACTURER} diff --git a/app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerActivity.kt b/app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerActivity.kt index 8f6e5b5..cdcf6e8 100644 --- a/app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerActivity.kt +++ b/app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerActivity.kt @@ -263,6 +263,7 @@ class PlayerActivity : AppCompatActivity() { MPVLib.setPropertyBoolean("sub-italic", subtitlesPreferences.italic.get()) MPVLib.setPropertyString("sub-justify", subtitlesPreferences.justification.get().value) MPVLib.setPropertyString("sub-color", subtitlesPreferences.textColor.get().toColorHexString()) + MPVLib.setPropertyInt("sub-border-size", subtitlesPreferences.borderSize.get()) MPVLib.setPropertyString("sub-border-color", subtitlesPreferences.borderColor.get().toColorHexString()) MPVLib.setPropertyString("sub-back-color", subtitlesPreferences.backgroundColor.get().toColorHexString()) diff --git a/app/src/main/java/live/mehiz/mpvkt/ui/preferences/AboutScreen.kt b/app/src/main/java/live/mehiz/mpvkt/ui/preferences/AboutScreen.kt index f05317a..551e94d 100644 --- a/app/src/main/java/live/mehiz/mpvkt/ui/preferences/AboutScreen.kt +++ b/app/src/main/java/live/mehiz/mpvkt/ui/preferences/AboutScreen.kt @@ -93,7 +93,6 @@ object AboutScreen : Screen() { id = R.string.pref_about_app_version_formatted, BuildConfig.BUILD_TYPE.replaceFirstChar { it.uppercaseChar() }, BuildConfig.VERSION_NAME, - BuildConfig.BUILD_TIME ) ) }, diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d8a32b6..6293dab 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -99,7 +99,7 @@ About Acknowledgments, licenses App version - %s %s (%s) + %s %s Open source libraries Add external subtitles