Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
detekt:
name: Static Code Analysis with Detekt
runs-on: ubuntu-latest
env:
ORG_GRADLE_JAVA_INSTALLATIONS_AUTO_DOWNLOAD: "false"

steps:
# ✅ Step 1: Checkout Repository
Expand Down Expand Up @@ -73,4 +75,4 @@ jobs:
path: |
*/build/reports/detekt/*.html
*/build/reports/detekt/*.md
*/build/reports/detekt/*.xml
*/build/reports/detekt/*.xml
2 changes: 1 addition & 1 deletion analytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ kotlin {

android {
namespace = "net.opendasharchive.openarchive.analytics"
compileSdk = 36
compileSdk = 37

defaultConfig {
minSdk = 29
Expand Down
6 changes: 4 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ android {

namespace = "net.opendasharchive.openarchive"

compileSdk = 36
compileSdk = 37

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
Expand All @@ -66,7 +66,7 @@ android {
defaultConfig {
applicationId = "net.opendasharchive.openarchive"
minSdk = 29
targetSdk = 36
targetSdk = 37
versionCode = 30043
versionName = "4.0.5"
multiDexEnabled = true
Expand Down Expand Up @@ -108,6 +108,7 @@ android {

// Distribution dimension
create("gms") {
isDefault = true
dimension = "distribution"
buildConfigField("boolean", "IS_GMS_BUILD", "true")
buildConfigField("boolean", "IS_FOSS_BUILD", "false")
Expand All @@ -127,6 +128,7 @@ android {

// Environment dimension
create("dev") {
isDefault = true
dimension = "env"
versionNameSuffix = "-dev"
applicationIdSuffix = ".debug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package net.opendasharchive.openarchive.db
import android.annotation.SuppressLint
import androidx.room3.Database
import androidx.room3.RoomDatabase
import androidx.room3.TypeConverters
import androidx.room3.ColumnTypeConverters
import androidx.room3.AutoMigration
import androidx.room3.DeleteColumn
import androidx.room3.migration.AutoMigrationSpec
Expand Down Expand Up @@ -38,7 +38,7 @@ import androidx.room3.migration.AutoMigrationSpec
version = 4,
exportSchema = true
)
@TypeConverters(Converters::class)
@ColumnTypeConverters(Converters::class)
abstract class AppDatabase : RoomDatabase() {
abstract fun vaultDao(): VaultDao
abstract fun archiveDao(): ArchiveDao
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.opendasharchive.openarchive.db

import androidx.room3.TypeConverter
import androidx.room3.ColumnTypeConverter
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toInstant
Expand All @@ -10,37 +10,37 @@ import net.opendasharchive.openarchive.core.domain.EvidenceStatus
import kotlin.time.Instant

class Converters {
@TypeConverter
@ColumnTypeConverter
fun fromTimestamp(value: Long?): LocalDateTime? {
return value?.let {
Instant.fromEpochMilliseconds(it).toLocalDateTime(TimeZone.currentSystemDefault())
}
}

@TypeConverter
@ColumnTypeConverter
fun dateToTimestamp(date: LocalDateTime?): Long? {
return date?.toInstant(TimeZone.currentSystemDefault())?.toEpochMilliseconds()
}

@TypeConverter
@ColumnTypeConverter
fun fromVaultType(value: VaultType): Int = when (value) {
VaultType.PRIVATE_SERVER -> 0
VaultType.INTERNET_ARCHIVE -> 1
VaultType.DWEB_STORAGE -> 5
}

@TypeConverter
@ColumnTypeConverter
fun toVaultType(value: Int): VaultType = when (value) {
0 -> VaultType.PRIVATE_SERVER
1 -> VaultType.INTERNET_ARCHIVE
5 -> VaultType.DWEB_STORAGE
else -> VaultType.PRIVATE_SERVER
}

@TypeConverter
@ColumnTypeConverter
fun fromEvidenceStatus(value: EvidenceStatus): Int = value.id

@TypeConverter
@ColumnTypeConverter
fun toEvidenceStatus(value: Int): EvidenceStatus = when (value) {
0 -> EvidenceStatus.NEW
1 -> EvidenceStatus.LOCAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ import androidx.room3.Relation
data class VaultWithDweb(
@Embedded val vault: VaultEntity,
@Relation(
parentColumn = "id",
entityColumn = "vaultId"
parentColumns = ["id"],
entityColumns = ["vaultId"]
)
val dwebMetadata: VaultDwebEntity?
)

data class ArchiveWithDweb(
@Embedded val archive: ArchiveEntity,
@Relation(
parentColumn = "id",
entityColumn = "archiveId"
parentColumns = ["id"],
entityColumns = ["archiveId"]
)
val dwebMetadata: ArchiveDwebEntity?
)

data class EvidenceWithDweb(
@Embedded val evidence: EvidenceEntity,
@Relation(
parentColumn = "id",
entityColumn = "evidenceId"
parentColumns = ["id"],
entityColumns = ["evidenceId"]
)
val dwebMetadata: EvidenceDwebEntity?
)
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
alias(libs.plugins.android.library) apply false

// Kotlin
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.compose.compiler) apply false

Expand All @@ -17,8 +18,8 @@ plugins {

// Google Services - Using direct IDs instead of catalog for FOSS compatibility
// These plugins are conditionally applied in app/build.gradle.kts for GMS builds only
id("com.google.gms.google-services") version "4.4.4" apply false
id("com.google.firebase.crashlytics") version "3.0.6" apply false
id("com.google.gms.google-services") version "4.5.0" apply false
id("com.google.firebase.crashlytics") version "3.0.7" apply false
}

tasks.register<Delete>("clean") {
Expand Down
22 changes: 11 additions & 11 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/536afcd1dff540251f85e5d2c80458cf/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/67a0fee3c4236b6397dcbe8575ca2011/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/29ee363f71d060405f729a8f1b7f7aef/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/67a0fee3c4236b6397dcbe8575ca2011/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/10fc3bf1ee0001078a473afe6e43cfdb/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/9c55677aff3966382f3d853c0959bfb2/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/29ee363f71d060405f729a8f1b7f7aef/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/67a0fee3c4236b6397dcbe8575ca2011/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/248ffb1098f61659502d0c09aa348294/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/ac151d55def6b6a9a159dc4cb4642851/redirect
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/491f83666ae7f4d6ebb28fee72ebb035/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/0d1a1acdc708062093673f65aa9aba4b/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/491f83666ae7f4d6ebb28fee72ebb035/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/0d1a1acdc708062093673f65aa9aba4b/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7083b89563e7ce20943037b8cd2b8cc2/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/060bbb778a1f55ea705fdebd2ccfeab9/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/491f83666ae7f4d6ebb28fee72ebb035/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/0d1a1acdc708062093673f65aa9aba4b/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d09679dc60fe5aa05ef7d03efdefac20/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/ed4e3bf2f5e7c5d9aabc4cbd8acd555e/redirect
toolchainVendor=JETBRAINS
toolchainVersion=21
toolchainVersion=17
61 changes: 31 additions & 30 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
[versions]
activity = "1.13.0"
agp = "9.1.1"
agp = "9.3.0"
androidx-exifinterface = "1.4.2"
androidx-security-crypto = "1.1.0"
androidx-test-runner = "1.7.0"
appcompat = "1.7.1"
biometric = "1.1.0"
camerax = "1.6.0"
appcompat = "1.8.0-alpha01"
biometric = "1.4.0-alpha07"
camerax = "1.7.0-alpha02"
clean-insights = "2.8.0"
coil = "3.4.0"
compose = "1.11.0"
coil = "3.5.0"
compose = "1.12.0-beta02"
compose-preference = "2.2.0"
core-ktx = "1.18.0"
core-ktx = "1.19.0"
core-splashscreen = "1.2.0"
datastore = "1.3.0-alpha08"
coroutines = "1.10.2"
datastore = "1.3.0-alpha09"
coroutines = "1.11.0"
detekt = "1.23.8"
detekt-compose = "0.5.8"
detekt-compose = "0.6.3"
detekt-rules-compose = "1.4.0"
dotsindicator = "5.1.0"
dotsindicator = "5.1.1"
firebase-analytics = "23.2.0"
firebase-crashlytics = "20.0.5"
firebase-crashlytics = "20.1.0"
fragment = "1.8.9"
google-play-app-update-ktx = "2.1.0"
google-play-review = "2.0.2"
gson = "2.14.0"
jtorctl = "0.4.5.7"
junit = "4.13.2"
junit-android = "1.3.0"
koin = "4.2.1"
kotlin = "2.3.21"
kotlinx-collections-immutable = "0.4.0"
kotlinx-datetime = "0.7.1"
ksp = "2.3.6"
lifecycle = "2.10.0"
material = "1.13.0"
material3 = "1.5.0-alpha18"
material-adaptive = "1.2.0"
media3 = "1.10.0"
mixpanel = "8.6.0"
navigation = "2.9.8"
navigation3 = "1.1.1"
navigation-events = "1.1.0"
koin = "4.2.2"
kotlin = "2.4.10"
kotlinx-collections-immutable = "0.5.1"
kotlinx-datetime = "0.8.0"
ksp = "2.3.10"
lifecycle = "2.11.0"
material = "1.14.0"
material3 = "1.5.0-alpha24"
material-adaptive = "1.3.0-rc01"
media3 = "1.10.1"
mixpanel = "8.9.0"
navigation = "2.10.0-alpha06"
navigation3 = "1.2.0-alpha06"
navigation-events = "1.2.0-alpha02"
accompanist = "0.37.3"
okhttp = "5.3.2"
okhttp = "5.4.0"
preference = "1.2.1"
recyclerview = "1.4.0"
reorderable = "3.1.0"
retrofit = "3.0.0"
robolectric = "4.16.1"
room = "3.0.0-alpha03"
room = "3.0.0"
satyan-sugar = "1.5"
serialization = "1.11.0"
swiperefreshlayout = "1.2.0"
timber = "5.0.1"
tor-android = "0.4.9.6"
work = "2.11.2"
tor-android = "0.4.9.11"
work = "2.12.0-alpha01"
zxing-core = "3.5.4"
zxing-android-embedded = "4.3.0"

Expand Down Expand Up @@ -217,6 +217,7 @@ android-library = { id = "com.android.library", version.ref = "agp" }
androidx-room3 = { id = "androidx.room3", version.ref = "room" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
detekt-plugin = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigation" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-all.zip
41 changes: 0 additions & 41 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,6 @@ pluginManagement {
google()
mavenCentral()
gradlePluginPortal()

maven("https://plugins.gradle.org/m2/") {
content {
includeGroupByRegex("com\\.google.*")
includeGroup("com.squareup")
includeGroupByRegex("commons-.*")
includeModule("org.jdom", "jdom2")
includeModule("org.ow2", "ow2")
includeGroup("org.ow2.asm")
includeGroupByRegex("org\\.jetbrains.*")
includeGroup("org.slf4j")
includeModule("org.bitbucket.b_c", "jose4j")
includeModule("org.checkerframework", "checker-qual")
includeGroup("net.java.dev.jna")
includeModule("net.java", "jvnet-parent")
includeModule("javax.annotation", "javax.annotation-api")
includeGroupByRegex("org\\.apache.*")
includeGroupByRegex("com\\.sun.*")
includeModule("xerces", "xercesImpl")
includeModule("xml-apis", "xml-apis")
includeGroup("org.bouncycastle")
includeGroupByRegex("net\\.sf.*")
includeModule("javax.inject", "javax.inject")
includeModule("org.tensorflow", "tensorflow-lite-metadata")
includeModule("org.json", "json")
includeGroup("io.grpc")
includeGroup("io.netty")
includeModule("io.perfmark", "perfmark-api")
includeModule("org.codehaus.mojo", "animal-sniffer-annotations")
includeGroup("org.glassfish.jaxb")
includeGroupByRegex("jakarta.*")
includeModule("org.jvnet.staxex", "stax-ex")
includeGroup("com.testdroid")
includeModule("log4j", "log4j")
includeModule("com.fasterxml", "oss-parent")
includeGroupByRegex("com\\.fasterxml\\.jackson.*")
includeModule("org.sonatype.oss", "oss-parent")
includeModule("org.eclipse.ee4j", "project")
includeGroup("org.codehaus.mojo")
}
}
}
}
plugins {
Expand Down
Loading