Skip to content

Commit 6402b3f

Browse files
Add compose module to docs. Test pages again. Fix image trailing slash. Internalize buildconfig.
1 parent 49d694c commit 6402b3f

File tree

8 files changed

+22
-15
lines changed

8 files changed

+22
-15
lines changed

.github/workflows/docs-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Docs
22

33
on:
44
push:
5-
branches: [ 'main' ]
5+
branches: [ 'api-ref', 'main' ]
66

77
permissions:
88
contents: read

build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ tasks.getByName<Delete>("clean") {
7070
dependencies {
7171
dokka(project(":core:"))
7272
dokka(project(":connectors:supabase"))
73+
dokka(project(":compose:"))
7374
}
7475

7576
dokka {
@@ -79,6 +80,7 @@ dokka {
7980
// Serve the generated Dokka documentation using a simple HTTP server
8081
// File changes are not watched here
8182
tasks.register("serveDokka") {
83+
group = "dokka"
8284
dependsOn("dokkaGenerate")
8385
doLast {
8486
val server = HttpServer.create(InetSocketAddress(0), 0)

compose/build.gradle.kts

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ plugins {
88
alias(libs.plugins.compose.compiler)
99
alias(libs.plugins.kotlinter)
1010
id("com.powersync.plugins.sonatype")
11+
id("dokka-convention")
1112
}
1213

1314
kotlin {
@@ -45,3 +46,7 @@ android {
4546
}
4647

4748
setupGithubRepository()
49+
50+
dokka {
51+
moduleName.set("PowerSync Compose")
52+
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
2-
public actual object BuildConfig {
3-
public actual val isDebug: Boolean
2+
internal actual object BuildConfig {
3+
actual val isDebug: Boolean
44
get() = com.powersync.BuildConfig.DEBUG
55
}

core/src/appleMain/kotlin/BuildConfig.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import kotlin.experimental.ExperimentalNativeApi
22
import kotlin.native.Platform
33

44
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
5-
public actual object BuildConfig {
5+
internal actual object BuildConfig {
66
@OptIn(ExperimentalNativeApi::class)
7-
public actual val isDebug: Boolean = Platform.isDebugBinary
7+
actual val isDebug: Boolean = Platform.isDebugBinary
88
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
2-
public expect object BuildConfig {
3-
public val isDebug: Boolean
2+
internal expect object BuildConfig {
3+
val isDebug: Boolean
44
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
2-
public actual object BuildConfig {
2+
internal actual object BuildConfig {
33
/*
44
To debug on the JVM, you can:
55
- Set the com.powersync.debug property with System.setProperty("com.powersync.debug", true) BEFORE calling any powersync API.
66
- Start your java program with the -Dcom.powersync.debug=true command line argument.
77
- Set the POWERSYNC_JVM_DEBUG environment variable to "true" before starting your program.
88
*/
9-
public actual val isDebug: Boolean =
9+
actual val isDebug: Boolean =
1010
System.getProperty("com.powersync.debug") == "true" ||
1111
System.getenv("POWERSYNC_JVM_DEBUG") == "true"
1212
}

docs/assets/dokka-templates/includes/footer.ftl

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
<strong class="footer-title">Community</strong>
77
<div class="footer-icon-row">
88
<a href="https://discord.gg/powersync" target="_blank">
9-
<img src="./${pathToRoot}/images/discord.svg" loading="lazy" alt="Discord" height="24">
9+
<img src="./${pathToRoot}images/discord.svg" loading="lazy" alt="Discord" height="24">
1010
</a>
1111
<a href="https://twitter.com/powersync_" target="_blank">
12-
<img src="./${pathToRoot}/images/x.svg" loading="lazy" alt="Twitter" height="20">
12+
<img src="./${pathToRoot}images/x.svg" loading="lazy" alt="Twitter" height="20">
1313
</a>
1414
<a href="https://www.youtube.com/@powersync_" target="_blank">
15-
<img src="./${pathToRoot}/images/youtube.svg" loading="lazy" alt="YouTube" width="32" height="28">
15+
<img src="./${pathToRoot}images/youtube.svg" loading="lazy" alt="YouTube" width="32" height="28">
1616
</a>
1717
<a href="https://www.linkedin.com/showcase/journeyapps-powersync/" target="_blank">
18-
<img src="./${pathToRoot}/images/linkedin.svg" loading="lazy" alt="LinkedIn" height="24">
18+
<img src="./${pathToRoot}images/linkedin.svg" loading="lazy" alt="LinkedIn" height="24">
1919
</a>
2020
</div>
2121
</div>
@@ -24,10 +24,10 @@
2424
<strong class="footer-title">More</strong>
2525
<div class="footer-icon-row">
2626
<a href="https://github.com/powersync-ja" target="_blank">
27-
<img src="./${pathToRoot}/images/github.svg" loading="lazy" alt="GitHub" height="24">
27+
<img src="./${pathToRoot}images/github.svg" loading="lazy" alt="GitHub" height="24">
2828
</a>
2929
<a href="https://www.powersync.com/" target="_blank">
30-
<img src="./${pathToRoot}/images/web.svg" loading="lazy" alt="Website" height="30">
30+
<img src="./${pathToRoot}images/web.svg" loading="lazy" alt="Website" height="30">
3131
</a>
3232
</div>
3333
</div>

0 commit comments

Comments
 (0)