Skip to content

Commit

Permalink
chore(fdroid): remove timestamp
Browse files Browse the repository at this point in the history
i don't know why i was so adamant on keeping it tbh.
  • Loading branch information
abdallahmehiz committed Sep 1, 2024
1 parent 52d2479 commit 4d74db0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 30 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 0 additions & 15 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
},
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<string name="pref_about_title">About</string>
<string name="pref_about_summary">Acknowledgments, licenses</string>
<string name="pref_about_app_version">App version</string>
<string name="pref_about_app_version_formatted">%s %s (%s)</string>
<string name="pref_about_app_version_formatted">%s %s</string>
<string name="pref_about_oss_libraries">Open source libraries</string>

<string name="player_sheets_add_ext_sub">Add external subtitles</string>
Expand Down

0 comments on commit 4d74db0

Please sign in to comment.