Skip to content
Merged
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
6 changes: 2 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maven stuff
GROUP=com.mikepenz
VERSION_NAME=0.39.0
VERSION_CODE=3900
VERSION_NAME=0.39.1
VERSION_CODE=3901
#
POM_URL=https://github.com/mikepenz/multiplatform-markdown-renderer
POM_SCM_URL=https://github.com/mikepenz/multiplatform-markdown-renderer
Expand Down Expand Up @@ -34,8 +34,6 @@ org.jetbrains.compose.experimental.wasm.enabled=true
org.jetbrains.compose.experimental.uikit.enabled=true
org.jetbrains.compose.experimental.jscanvas.enabled=true
org.jetbrains.compose.experimental.macos.enabled=true
# Screenshot test
android.experimental.enableScreenshotTest=true
# Dokka
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
Expand Down
25 changes: 14 additions & 11 deletions multiplatform-markdown-renderer-code/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
plugins {
id("com.mikepenz.convention.android-library")
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.compose")
id("com.mikepenz.convention.publishing")
}

android {
namespace = "com.mikepenz.markdown.code"
}
kotlin {
android {
namespace = "com.mikepenz.markdown.code"
}

dependencies {
commonMainApi(projects.multiplatformMarkdownRenderer)
commonMainCompileOnly(compose.runtime)
commonMainCompileOnly(compose.ui)
commonMainCompileOnly(compose.foundation)
sourceSets {
commonMain.dependencies {
api(projects.multiplatformMarkdownRenderer)
compileOnly(baseLibs.jetbrains.compose.runtime)
compileOnly(baseLibs.jetbrains.compose.ui)
compileOnly(baseLibs.jetbrains.compose.foundation)

commonMainApi(libs.highlights)
}
api(libs.highlights)
}
}
}
24 changes: 14 additions & 10 deletions multiplatform-markdown-renderer-coil2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
plugins {
id("com.mikepenz.convention.android-library")
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.compose")
id("com.mikepenz.convention.publishing")
}

android {
namespace = "com.mikepenz.markdown.coil2"
}

dependencies {
commonMainApi(projects.multiplatformMarkdownRenderer)
commonMainCompileOnly(compose.runtime)
commonMainCompileOnly(compose.ui)
kotlin {
android {
namespace = "com.mikepenz.markdown.coil2"
}
sourceSets {
commonMain.dependencies {
api(projects.multiplatformMarkdownRenderer)
compileOnly(baseLibs.jetbrains.compose.runtime)
compileOnly(baseLibs.jetbrains.compose.ui)
}

androidMainApi(libs.coil2.core)
androidMain.dependencies {
api(libs.coil2.core)
}
}
}
23 changes: 12 additions & 11 deletions multiplatform-markdown-renderer-coil3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
plugins {
id("com.mikepenz.convention.android-library")
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.compose")
id("com.mikepenz.convention.publishing")
}

android {
namespace = "com.mikepenz.markdown.coil3"
}

dependencies {
commonMainApi(projects.multiplatformMarkdownRenderer)

commonMainApi(libs.coil.core) {
exclude(group = "org.jetbrains.compose.runtime")
kotlin {
android {
namespace = "com.mikepenz.markdown.coil3"
}
sourceSets {
commonMain.dependencies {
api(projects.multiplatformMarkdownRenderer)
api(libs.coil.core.get().toString()) {
exclude(group = "org.jetbrains.compose.runtime")
}
compileOnly(baseLibs.jetbrains.compose.runtime)
}
}
commonMainCompileOnly(compose.runtime)
}
24 changes: 13 additions & 11 deletions multiplatform-markdown-renderer-m2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
plugins {
id("com.mikepenz.convention.android-library")
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.compose")
id("com.mikepenz.convention.publishing")
}

android {
namespace = "com.mikepenz.markdown.m2"
}

dependencies {
commonMainApi(projects.multiplatformMarkdownRenderer)
commonMainApi(libs.markdown)
kotlin {
android {
namespace = "com.mikepenz.markdown.m2"
}
sourceSets {
commonMain.dependencies {
api(projects.multiplatformMarkdownRenderer)
api(libs.markdown)

commonMainCompileOnly(compose.runtime)
commonMainCompileOnly(compose.material)
}
compileOnly(baseLibs.jetbrains.compose.runtime)
compileOnly(baseLibs.jetbrains.compose.material)
}
}
}
24 changes: 13 additions & 11 deletions multiplatform-markdown-renderer-m3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
plugins {
id("com.mikepenz.convention.android-library")
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.compose")
id("com.mikepenz.convention.publishing")
}

android {
namespace = "com.mikepenz.markdown.m3"
}

dependencies {
commonMainApi(projects.multiplatformMarkdownRenderer)
commonMainApi(libs.markdown)
kotlin {
android {
namespace = "com.mikepenz.markdown.m3"
}
sourceSets {
commonMain.dependencies {
api(projects.multiplatformMarkdownRenderer)
api(libs.markdown)

commonMainCompileOnly(compose.runtime)
commonMainCompileOnly(compose.material3)
}
compileOnly(baseLibs.jetbrains.compose.runtime)
compileOnly(baseLibs.jetbrains.compose.material3)
}
}
}
27 changes: 15 additions & 12 deletions multiplatform-markdown-renderer/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
plugins {
id("com.mikepenz.convention.android-library")
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.compose")
id("com.mikepenz.convention.publishing")
}

android {
namespace = "com.mikepenz.markdown"
kotlin {
android {
namespace = "com.mikepenz.markdown"
}

sourceSets {
commonMain.dependencies {
api(libs.markdown)
api(baseLibs.kotlinx.collections.immutable)

compileOnly(baseLibs.jetbrains.compose.runtime)
compileOnly(baseLibs.jetbrains.compose.ui)
compileOnly(baseLibs.jetbrains.compose.foundation)
}
}
}

composeCompiler {
stabilityConfigurationFiles.add(project.layout.projectDirectory.file("stability_config.conf"))
}

dependencies {
commonMainApi(libs.markdown)
commonMainApi(baseLibs.kotlinx.collections.immutable)

commonMainCompileOnly(compose.runtime)
commonMainCompileOnly(compose.ui)
commonMainCompileOnly(compose.foundation)
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,12 @@ fun AnnotatedString.Builder.appendMarkdownReference(
buildMarkdownAnnotatedString(content, linkText.mapAutoLinkToType(), annotatorSettings)
}
} else {
// if no reference is found, reference links are just rendered as normal text.
append(node.getUnescapedTextInNode(content))
// if no reference is found, reference links are rendered as their individual components
val linkText = node.findChildOfType(MarkdownElementTypes.LINK_TEXT)
if (linkText != null) {
buildMarkdownAnnotatedString(content, linkText, annotatorSettings)
}
buildMarkdownAnnotatedString(content, labelNode, annotatorSettings)
}
}

Expand Down
14 changes: 4 additions & 10 deletions sample/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
plugins {
id("com.mikepenz.convention.android-application")
id("com.mikepenz.convention.kotlin")
id("com.mikepenz.convention.compose")
id("com.mikepenz.aboutlibraries.plugin")
id("com.mikepenz.aboutlibraries.plugin.android")
alias(baseLibs.plugins.screenshot)
}

android {
Expand All @@ -14,20 +12,16 @@ android {
applicationId = "com.mikepenz.markdown"
base.archivesName = "markdown-renderer-sample-v$versionName-c$versionCode"
}

@Suppress("UnstableApiUsage")
experimentalProperties["android.experimental.enableScreenshotTest"] = true
}

dependencies {
implementation(project(":sample:shared"))
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.material3)
implementation(baseLibs.jetbrains.compose.foundation)
implementation(baseLibs.jetbrains.compose.material)
implementation(baseLibs.jetbrains.compose.material3)
implementation(libs.androidx.activity.compose)
implementation(libs.ktor.client.okhttp)
debugImplementation(compose.uiTooling)
"screenshotTestImplementation"(compose.uiTooling)
debugImplementation(baseLibs.jetbrains.compose.ui.tooling)
}

aboutLibraries {
Expand Down
3 changes: 2 additions & 1 deletion sample/desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ plugins {
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.compose")
id("com.mikepenz.aboutlibraries.plugin")
alias(baseLibs.plugins.composeHotreload)
}

kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":sample:shared"))
implementation(compose.components.resources)
implementation(baseLibs.jetbrains.compose.components.resources)
}
jvmMain.dependencies {
implementation(compose.desktop.currentOs)
Expand Down
3 changes: 2 additions & 1 deletion sample/desktop/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
com.mikepenz.binary-compatibility-validator.enabled=false
com.mikepenz.hotreload.enabled=true
com.mikepenz.java.version=21
com.mikepenz.java.version=21
com.mikepenz.android.enabled=false
22 changes: 10 additions & 12 deletions sample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
plugins {
id("com.mikepenz.convention.android-library")
id("com.mikepenz.convention.kotlin-multiplatform")
id("com.mikepenz.convention.compose")
id("com.mikepenz.aboutlibraries.plugin")
}

kotlin {
androidTarget()
androidLibrary {
namespace = "com.mikepenz.markdown.sample.shared"
experimentalProperties["android.experimental.kmp.enableAndroidResources"] = true
}

listOf(
iosX64(),
Expand All @@ -27,12 +29,12 @@ kotlin {
api(projects.multiplatformMarkdownRendererCoil3)
api(projects.multiplatformMarkdownRendererCode)

implementation(compose.foundation)
implementation(compose.ui)
implementation(compose.uiUtil)
implementation(compose.components.resources)
implementation(compose.material)
implementation(compose.material3)
implementation(baseLibs.jetbrains.compose.foundation)
implementation(baseLibs.jetbrains.compose.ui)
implementation(baseLibs.jetbrains.compose.ui.util)
implementation(baseLibs.jetbrains.compose.components.resources)
implementation(baseLibs.jetbrains.compose.material)
implementation(baseLibs.jetbrains.compose.material3)

// required for coil
implementation(libs.ktor.client.core)
Expand All @@ -49,10 +51,6 @@ kotlin {
}
}

android {
namespace = "com.mikepenz.markdown.sample.shared"
}

compose.resources {
packageOfResClass = "com.mikepenz.markdown.sample.shared.resources"
}
Expand Down
7 changes: 2 additions & 5 deletions sample/web/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":sample:shared"))
implementation(compose.foundation)
implementation(compose.components.resources)
implementation(baseLibs.jetbrains.compose.foundation)
implementation(baseLibs.jetbrains.compose.components.resources)
}
}
}
Expand All @@ -32,9 +32,6 @@ compose.resources {
}

aboutLibraries {
android {
registerAndroidTasks = false
}
export {
exportVariant = "wasmJs"
outputPath = file("src/commonMain/composeResources/files/aboutlibraries.json")
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencyResolutionManagement {

versionCatalogs {
create("baseLibs") {
from("com.mikepenz:version-catalog:0.10.1")
from("com.mikepenz:version-catalog:0.12.0")
}
}
}
Expand Down
Loading