Compare commits
1 Commits
release/v2
...
e726db9606
| Author | SHA1 | Date | |
|---|---|---|---|
| e726db9606 |
@@ -26,6 +26,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
with:
|
with:
|
||||||
# Full history so the base..HEAD diff below has a merge-base.
|
# Full history so the base..HEAD diff below has a merge-base.
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Resolve version and whether it is a new release
|
- name: Resolve version and whether it is a new release
|
||||||
id: v
|
id: v
|
||||||
@@ -82,6 +84,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "floret-kit"]
|
||||||
|
path = floret-kit
|
||||||
|
url = https://gitea.jeanlucmakiola.de/makiolaj/floret-kit.git
|
||||||
@@ -159,6 +159,7 @@ dependencies {
|
|||||||
implementation(libs.androidx.glance.material3)
|
implementation(libs.androidx.glance.material3)
|
||||||
|
|
||||||
implementation(libs.kotlinx.datetime)
|
implementation(libs.kotlinx.datetime)
|
||||||
|
implementation("de.jeanlucmakiola.floret:core-time")
|
||||||
implementation(libs.kotlinx.coroutines.core)
|
implementation(libs.kotlinx.coroutines.core)
|
||||||
|
|
||||||
debugImplementation(libs.androidx.ui.tooling)
|
debugImplementation(libs.androidx.ui.tooling)
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package de.jeanlucmakiola.calendula.data.calendar
|
package de.jeanlucmakiola.calendula.data.calendar
|
||||||
|
|
||||||
|
import de.jeanlucmakiola.floret.time.toEpochMillis
|
||||||
|
import de.jeanlucmakiola.floret.time.toKotlinInstantFromEpochMillis
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.ContentResolver
|
import android.content.ContentResolver
|
||||||
import android.content.ContentUris
|
import android.content.ContentUris
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package de.jeanlucmakiola.calendula.data.calendar
|
package de.jeanlucmakiola.calendula.data.calendar
|
||||||
|
|
||||||
|
import de.jeanlucmakiola.floret.time.toEpochMillis
|
||||||
import de.jeanlucmakiola.calendula.data.di.IoDispatcher
|
import de.jeanlucmakiola.calendula.data.di.IoDispatcher
|
||||||
import de.jeanlucmakiola.calendula.data.prefs.CalendarPrefs
|
import de.jeanlucmakiola.calendula.data.prefs.CalendarPrefs
|
||||||
import de.jeanlucmakiola.calendula.data.prefs.SettingsPrefs
|
import de.jeanlucmakiola.calendula.data.prefs.SettingsPrefs
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package de.jeanlucmakiola.calendula.data.calendar
|
package de.jeanlucmakiola.calendula.data.calendar
|
||||||
|
|
||||||
|
import de.jeanlucmakiola.floret.time.toKotlinInstantFromEpochMillis
|
||||||
import android.provider.CalendarContract
|
import android.provider.CalendarContract
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import de.jeanlucmakiola.calendula.domain.AccessLevel
|
import de.jeanlucmakiola.calendula.domain.AccessLevel
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package de.jeanlucmakiola.calendula.data.calendar
|
package de.jeanlucmakiola.calendula.data.calendar
|
||||||
|
|
||||||
|
import de.jeanlucmakiola.floret.time.toKotlinInstantFromEpochMillis
|
||||||
import de.jeanlucmakiola.calendula.domain.EventStatus
|
import de.jeanlucmakiola.calendula.domain.EventStatus
|
||||||
import de.jeanlucmakiola.calendula.domain.ics.IcsEvent
|
import de.jeanlucmakiola.calendula.domain.ics.IcsEvent
|
||||||
import de.jeanlucmakiola.calendula.domain.ics.deriveIcsUid
|
import de.jeanlucmakiola.calendula.domain.ics.deriveIcsUid
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package de.jeanlucmakiola.calendula.data.calendar
|
package de.jeanlucmakiola.calendula.data.calendar
|
||||||
|
|
||||||
|
import de.jeanlucmakiola.floret.time.toKotlinInstantFromEpochMillis
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import de.jeanlucmakiola.calendula.domain.EventInstance
|
import de.jeanlucmakiola.calendula.domain.EventInstance
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package de.jeanlucmakiola.calendula.data.calendar
|
package de.jeanlucmakiola.calendula.data.calendar
|
||||||
|
|
||||||
|
import de.jeanlucmakiola.floret.time.toKotlinInstantFromEpochMillis
|
||||||
import de.jeanlucmakiola.calendula.domain.EventInstance
|
import de.jeanlucmakiola.calendula.domain.EventInstance
|
||||||
import de.jeanlucmakiola.calendula.domain.ics.parseRfc2445DurationMillis
|
import de.jeanlucmakiola.calendula.domain.ics.parseRfc2445DurationMillis
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
package de.jeanlucmakiola.calendula.data.calendar
|
|
||||||
|
|
||||||
import kotlin.time.Instant
|
|
||||||
|
|
||||||
fun Long.toKotlinInstantFromEpochMillis(): Instant = Instant.fromEpochMilliseconds(this)
|
|
||||||
|
|
||||||
fun Instant.toEpochMillis(): Long = toEpochMilliseconds()
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package de.jeanlucmakiola.calendula.data.calendar
|
|
||||||
|
|
||||||
import com.google.common.truth.Truth.assertThat
|
|
||||||
import kotlin.time.Instant
|
|
||||||
import org.junit.jupiter.api.Test
|
|
||||||
|
|
||||||
class TimeBridgeTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `epoch millis round-trips through Instant`() {
|
|
||||||
val original = 1_717_840_800_000L // 2024-06-08T10:00:00Z
|
|
||||||
val instant = original.toKotlinInstantFromEpochMillis()
|
|
||||||
assertThat(instant.toEpochMillis()).isEqualTo(original)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `zero millis maps to Instant epoch`() {
|
|
||||||
assertThat(0L.toKotlinInstantFromEpochMillis()).isEqualTo(Instant.fromEpochMilliseconds(0L))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `negative epoch millis is supported`() {
|
|
||||||
val original = -1_000_000L
|
|
||||||
assertThat(original.toKotlinInstantFromEpochMillis().toEpochMillis()).isEqualTo(original)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -43,11 +43,21 @@ Builds:
|
|||||||
versionCode: 20705
|
versionCode: 20705
|
||||||
commit: v2.7.5
|
commit: v2.7.5
|
||||||
subdir: app
|
subdir: app
|
||||||
|
submodules: true
|
||||||
gradle:
|
gradle:
|
||||||
- yes
|
- yes
|
||||||
# No NDK / no flavors. The release buildType applies a signingConfig only
|
# No NDK / no flavors. The release buildType applies a signingConfig only
|
||||||
# when key.properties exists; on the buildserver it does not, so this
|
# when key.properties exists; on the buildserver it does not, so this
|
||||||
# produces the unsigned APK F-Droid compares against our binary.
|
# produces the unsigned APK F-Droid compares against our binary.
|
||||||
|
#
|
||||||
|
# submodules: true — REQUIRED from v2.11.0 onward, where the build pulls
|
||||||
|
# shared code from the `floret-kit` git submodule via a Gradle composite
|
||||||
|
# build (`includeBuild("floret-kit")`). Without it F-Droid checks out an
|
||||||
|
# empty floret-kit/ and the from-source build fails, stalling publishing.
|
||||||
|
# Inert for v2.7.5 (no submodule yet); kept here so AutoUpdateMode copies it
|
||||||
|
# onto every auto-generated future build entry. The kit is plain-Kotlin and
|
||||||
|
# carries no foojay toolchain resolver, so it clears the same reproducibility
|
||||||
|
# bar (enforced by scripts/check_reproducible_release.sh).
|
||||||
|
|
||||||
# SHA-256 of our app signing certificate (public; embedded in every published
|
# SHA-256 of our app signing certificate (public; embedded in every published
|
||||||
# APK). Locks F-Droid to publish only binaries signed with our key.
|
# APK). Locks F-Droid to publish only binaries signed with our key.
|
||||||
|
|||||||
1
floret-kit
Submodule
1
floret-kit
Submodule
Submodule floret-kit added at 554d536b2f
@@ -34,8 +34,15 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# 2. The foojay toolchain resolver must not be present in any Gradle script.
|
# 2. The foojay toolchain resolver must not be present in any Gradle script.
|
||||||
|
# This includes the floret-kit submodule: it's an included build (composite
|
||||||
|
# build via `includeBuild`), so F-Droid evaluates its Gradle scripts too when
|
||||||
|
# building from source — the same offline-scanner bar applies to it.
|
||||||
gradle_files=("$SETTINGS" "$APP")
|
gradle_files=("$SETTINGS" "$APP")
|
||||||
[ -f build.gradle.kts ] && gradle_files+=(build.gradle.kts)
|
[ -f build.gradle.kts ] && gradle_files+=(build.gradle.kts)
|
||||||
|
if [ -d floret-kit ]; then
|
||||||
|
while IFS= read -r f; do gradle_files+=("$f"); done \
|
||||||
|
< <(find floret-kit -name '*.gradle.kts' -not -path '*/build/*')
|
||||||
|
fi
|
||||||
if grep -qi 'foojay' "${gradle_files[@]}"; then
|
if grep -qi 'foojay' "${gradle_files[@]}"; then
|
||||||
echo "ERROR: foojay toolchain resolver found in: $(grep -li foojay "${gradle_files[@]}" | tr '\n' ' ')" >&2
|
echo "ERROR: foojay toolchain resolver found in: $(grep -li foojay "${gradle_files[@]}" | tr '\n' ' ')" >&2
|
||||||
echo " F-Droid's source scanner rejects org.gradle.toolchains.foojay-resolver" >&2
|
echo " F-Droid's source scanner rejects org.gradle.toolchains.foojay-resolver" >&2
|
||||||
|
|||||||
@@ -22,3 +22,4 @@ dependencyResolutionManagement {
|
|||||||
|
|
||||||
rootProject.name = "Calendula"
|
rootProject.name = "Calendula"
|
||||||
include(":app")
|
include(":app")
|
||||||
|
includeBuild("floret-kit")
|
||||||
|
|||||||
Reference in New Issue
Block a user