Compare commits

..

3 commits

Author SHA1 Message Date
54fb000cc8 Add renovate.json
Some checks failed
Build & Test / Validate (pull_request) Successful in 16s
Build & Test / Run Unit Tests (pull_request) Failing after 3m31s
2024-11-17 01:04:59 +00:00
0b26a16f1f
Remove Plausible
Some checks failed
Build & Test / Validate (push) Successful in 17s
Build & Test / Run Unit Tests (push) Failing after 6m18s
2024-11-16 17:54:43 -07:00
dba5313c74
fixup! Bump various dependencies
Some checks failed
Build & Test / Run Unit Tests (push) Has been cancelled
Build & Test / Validate (push) Successful in 2m28s
2024-11-16 17:49:53 -07:00
7 changed files with 16 additions and 57 deletions

View file

@ -16,7 +16,18 @@ object PiHelperModule {
@Provides @Provides
@Singleton @Singleton
fun providesAnalyticsHelper(): AnalyticsHelper = PlausibleAnalyticsHelper fun providesAnalyticsHelper(): AnalyticsHelper = object : AnalyticsHelper {
override fun pageView(route: Route) {
// Not implemented
}
override fun event(
event: AnalyticsEvent,
route: Route
) {
// Not implemented
}
}
@Provides @Provides
@Singleton @Singleton

View file

@ -7,6 +7,4 @@
<string name="action_disable_30_seconds_short">Disable for 30 seconds</string> <string name="action_disable_30_seconds_short">Disable for 30 seconds</string>
<string name="action_disable_5_minutes">Disable for 5 minutes</string> <string name="action_disable_5_minutes">Disable for 5 minutes</string>
<string name="action_disable_5_minutes_short">Disable for 5 minutes</string> <string name="action_disable_5_minutes_short">Disable for 5 minutes</string>
<string name="plausible_domain">pihelper.android.wbrawner.com</string>
<string name="plausible_host">https://plausible.wbrawner.com</string>
</resources> </resources>

View file

@ -1,38 +1,15 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins { plugins {
kotlin("jvm") alias(libs.plugins.kotlin.jvm)
id("org.jetbrains.compose") alias(libs.plugins.compose)
alias(libs.plugins.jetbrainsCompose)
java java
} }
group = "com.wbrawner.pihelper" group = "com.wbrawner.pihelper"
version = "1.0-SNAPSHOT" version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
}
val osName = System.getProperty("os.name")
val targetOs = when {
osName == "Mac OS X" -> "macos"
osName.startsWith("Win") -> "windows"
osName.startsWith("Linux") -> "linux"
else -> error("Unsupported OS: $osName")
}
val targetArch = when (val osArch = System.getProperty("os.arch")) {
"x86_64", "amd64" -> "x64"
"aarch64" -> "arm64"
else -> error("Unsupported arch: $osArch")
}
val skikoVersion = "0.7.77" // or any more recent version
val target = "${targetOs}-${targetArch}"
dependencies { dependencies {
// Note, if you develop a library, you should use compose.desktop.common. // Note, if you develop a library, you should use compose.desktop.common.
// compose.desktop.currentOs should be used in launcher-sourceSet // compose.desktop.currentOs should be used in launcher-sourceSet
@ -40,9 +17,8 @@ dependencies {
// With compose.desktop.common you will also lose @Preview functionality // With compose.desktop.common you will also lose @Preview functionality
implementation(project(":shared")) implementation(project(":shared"))
implementation(compose.desktop.currentOs) implementation(compose.desktop.currentOs)
// implementation("org.jetbrains.skiko:skiko-awt-runtime-$target:$skikoVersion")
implementation(libs.kotlinx.coroutines.jvm) implementation(libs.kotlinx.coroutines.jvm)
implementation("ch.qos.logback:logback-classic:1.4.5") implementation(libs.logback.classic)
} }
compose.desktop { compose.desktop {

View file

@ -23,7 +23,6 @@ material = "1.12.0"
maxSdk = "35" maxSdk = "35"
minSdk = "23" minSdk = "23"
okhttp = "4.10.0" okhttp = "4.10.0"
plausible = "0.1.0-SNAPSHOT"
settings = "0.8.1" settings = "0.8.1"
versionCode = "5" versionCode = "5"
versionName = "1.1.1" versionName = "1.1.1"
@ -63,7 +62,6 @@ material = { module = "com.google.android.material:material", version.ref = "mat
mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" } mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
multiplatform-settings = { module = "com.russhwolf:multiplatform-settings-no-arg", version.ref = "settings" } multiplatform-settings = { module = "com.russhwolf:multiplatform-settings-no-arg", version.ref = "settings" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version = "navigation" } navigation-compose = { module = "androidx.navigation:navigation-compose", version = "navigation" }
plausible = { module = "com.wbrawner.plausible:plausible-android", version.ref = "plausible" }
preference = { module = "androidx.preference:preference-ktx", version = "1.2.0" } preference = { module = "androidx.preference:preference-ktx", version = "1.2.0" }
test-ext = { module = "androidx.test.ext:junit", version = "1.1.5" } test-ext = { module = "androidx.test.ext:junit", version = "1.1.5" }

View file

@ -37,7 +37,6 @@ kotlin {
val androidMain by getting { val androidMain by getting {
dependencies { dependencies {
implementation(libs.plausible)
api(compose.runtime) api(compose.runtime)
} }
} }

View file

@ -1,18 +0,0 @@
package com.wbrawner.pihelper.shared
import com.wbrawner.plausible.android.Plausible
object PlausibleAnalyticsHelper : AnalyticsHelper {
override fun pageView(route: Route) {
Plausible.pageView(route.path)
}
override fun event(event: AnalyticsEvent, route: Route) {
val props = when (event) {
is AnalyticsEvent.DisableButtonClicked -> mapOf("duration" to event.duration)
is AnalyticsEvent.LinkClicked -> mapOf("link" to event.link)
else -> null
}
Plausible.event(event.name, route.path, props = props)
}
}

View file

@ -104,11 +104,6 @@ fun InfoScreen(onBackClicked: () -> Unit, onForgetPiholeClicked: () -> Unit) {
) { ) {
message.getStringAnnotations(it, it).firstOrNull()?.let { annotation -> message.getStringAnnotations(it, it).firstOrNull()?.let { annotation ->
uriHandler.openUri(annotation.item) uriHandler.openUri(annotation.item)
// TODO: Move this to the store?
// PlausibleAnalyticsHelper.event(
// AnalyticsEvent.LinkClicked(annotation.item),
// Route.ABOUT
// )
} }
} }
TextButton(onClick = onForgetPiholeClicked) { TextButton(onClick = onForgetPiholeClicked) {