diff --git a/.github/workflows/actions/build/action.yml b/.github/workflows/actions/build/action.yml index 2202ac1..5111f58 100644 --- a/.github/workflows/actions/build/action.yml +++ b/.github/workflows/actions/build/action.yml @@ -6,13 +6,13 @@ runs: steps: - uses: ./.github/workflows/actions/prepare - - name: Build material-html-text + - name: Build html-text-material shell: bash - run: ./gradlew :material-html-text:assembleRelease + run: ./gradlew :html-text-material:assembleRelease - - name: Build material3-html-text + - name: Build html-text-material3 shell: bash - run: ./gradlew :material3-html-text:assembleRelease + run: ./gradlew :html-text-material3:assembleRelease - name: Build sample apps shell: bash diff --git a/.gitignore b/.gitignore index d3dde65..a180505 100644 --- a/.gitignore +++ b/.gitignore @@ -163,8 +163,13 @@ $RECYCLE.BIN/ /.idea/artifacts/common_jvm.xml /.idea/kotlinc.xml -/.idea/artifacts/material_html_text_jvm.xml -/.idea/artifacts/material3_html_text_jvm.xml +/.idea/artifacts/html_text_common_jvm.xml +/.idea/artifacts/html_text_material_jvm.xml +/.idea/artifacts/html_text_material3_jvm.xml /.idea/inspectionProfiles/Project_Default.xml /.idea/runConfigurations.xml /.idea/copilotDiffState.xml + +/.idea/markdown.xml +/.idea/migrations.xml +/.idea/misc.xml diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 3b0be22..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index aec8622..6554dde 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ `HtmlText` is a Kotlin Multiplatform library that allows you to render HTML content as Compose `AnnotatedString`s. It supports basic formatting, hyperlinks, and color styling in a multiplatform-friendly way. `HtmlText` has been made accessible for screen readers and keyboard operation. > [!WARNING] -> Starting with version 3.0.0-beta01, the Maven GroupId has changed to `de.charlex.compose` +> Starting with version 3.0.0-beta02, the Maven GroupId has changed to `de.charlex.compose` and artifact names changed from `material-html-text` to `html-text-material`. > [!NOTE] > 🚀 HtmlText is now Compose Multiplatform @@ -56,7 +56,7 @@ Add actual HtmlText library: ```groovy dependencies { - implementation 'de.charlex.compose:material-html-text:3.0.0-beta01' + implementation 'de.charlex.compose:html-text-material:3.0.0-beta02' } ``` @@ -64,14 +64,14 @@ or ```groovy dependencies { - implementation 'de.charlex.compose:material3-html-text:3.0.0-beta01' + implementation 'de.charlex.compose:html-text-material3:3.0.0-beta02' } ``` License -------- - Copyright 2021 Alexander Karkossa + Copyright 2025 Alexander Karkossa Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/common/build.gradle.kts b/common/build.gradle.kts deleted file mode 100644 index 79199e6..0000000 --- a/common/build.gradle.kts +++ /dev/null @@ -1,21 +0,0 @@ -import de.charlex.convention.config.configureIosTargets - -plugins { - id("de.charlex.convention.android.library") - id("de.charlex.convention.kotlin.multiplatform.mobile") - id("de.charlex.convention.compose.multiplatform") -} -kotlin { - configureIosTargets() - jvm() - - sourceSets { - commonMain { - dependencies { - implementation(compose.runtime) - implementation(compose.foundation) - implementation(libs.mohamedrejeb.ksoup.html) - } - } - } -} \ No newline at end of file diff --git a/html-text-common/build.gradle.kts b/html-text-common/build.gradle.kts new file mode 100644 index 0000000..c0e1be1 --- /dev/null +++ b/html-text-common/build.gradle.kts @@ -0,0 +1,47 @@ +import de.charlex.convention.config.configureIosTargets + +plugins { + id("de.charlex.convention.android.library") + id("de.charlex.convention.kotlin.multiplatform.mobile") + id("de.charlex.convention.centralPublish") + id("de.charlex.convention.compose.multiplatform") +} + +mavenPublishConfig { + description = "A Kotlin Multiplatform library to render HTML content as Compose AnnotatedString in Material, supporting basic formatting and hyperlinks." + url = "https://github.com/ch4rl3x/HtmlText" + + scm { + connection = "scm:git:github.com/ch4rl3x/HtmlText.git" + developerConnection = "scm:git:ssh://github.com/ch4rl3x/HtmlText.git" + url = "https://github.com/ch4rl3x/HtmlText/tree/main" + } + + developers { + developer { + id = "ch4rl3x" + name = "Alexander Karkossa" + email = "alexander.karkossa@googlemail.com" + } + developer { + id = "kalinjul" + name = "Julian Kalinowski" + email = "julakali@gmail.com" + } + } +} + +kotlin { + configureIosTargets() + jvm() + + sourceSets { + commonMain { + dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(libs.mohamedrejeb.ksoup.html) + } + } + } +} \ No newline at end of file diff --git a/common/src/androidMain/kotlin/System.kt b/html-text-common/src/androidMain/kotlin/System.kt similarity index 100% rename from common/src/androidMain/kotlin/System.kt rename to html-text-common/src/androidMain/kotlin/System.kt diff --git a/common/src/commonMain/kotlin/BaseHtmlText.kt b/html-text-common/src/commonMain/kotlin/BaseHtmlText.kt similarity index 100% rename from common/src/commonMain/kotlin/BaseHtmlText.kt rename to html-text-common/src/commonMain/kotlin/BaseHtmlText.kt diff --git a/common/src/commonMain/kotlin/HtmlParser.kt b/html-text-common/src/commonMain/kotlin/HtmlParser.kt similarity index 100% rename from common/src/commonMain/kotlin/HtmlParser.kt rename to html-text-common/src/commonMain/kotlin/HtmlParser.kt diff --git a/common/src/commonMain/kotlin/HtmlTextUtil.kt b/html-text-common/src/commonMain/kotlin/HtmlTextUtil.kt similarity index 100% rename from common/src/commonMain/kotlin/HtmlTextUtil.kt rename to html-text-common/src/commonMain/kotlin/HtmlTextUtil.kt diff --git a/common/src/commonMain/kotlin/System.kt b/html-text-common/src/commonMain/kotlin/System.kt similarity index 100% rename from common/src/commonMain/kotlin/System.kt rename to html-text-common/src/commonMain/kotlin/System.kt diff --git a/common/src/iosMain/kotlin/System.kt b/html-text-common/src/iosMain/kotlin/System.kt similarity index 100% rename from common/src/iosMain/kotlin/System.kt rename to html-text-common/src/iosMain/kotlin/System.kt diff --git a/common/src/jvmMain/kotlin/System.kt b/html-text-common/src/jvmMain/kotlin/System.kt similarity index 100% rename from common/src/jvmMain/kotlin/System.kt rename to html-text-common/src/jvmMain/kotlin/System.kt diff --git a/material-html-text/.gitignore b/html-text-material/.gitignore similarity index 100% rename from material-html-text/.gitignore rename to html-text-material/.gitignore diff --git a/material-html-text/build.gradle.kts b/html-text-material/build.gradle.kts similarity index 94% rename from material-html-text/build.gradle.kts rename to html-text-material/build.gradle.kts index a27af3d..5fe49b1 100644 --- a/material-html-text/build.gradle.kts +++ b/html-text-material/build.gradle.kts @@ -8,7 +8,6 @@ plugins { } mavenPublishConfig { - name = "material-html-text" description = "A Kotlin Multiplatform library to render HTML content as Compose AnnotatedString in Material, supporting basic formatting and hyperlinks." url = "https://github.com/ch4rl3x/HtmlText" @@ -45,7 +44,7 @@ kotlin { implementation(compose.material) implementation(compose.components.resources) - implementation(project(":common")) + implementation(project(":html-text-common")) } } } diff --git a/material-html-text/proguard-rules.pro b/html-text-material/proguard-rules.pro similarity index 100% rename from material-html-text/proguard-rules.pro rename to html-text-material/proguard-rules.pro diff --git a/material-html-text/src/androidMain/kotlin/HtmlText.android.kt b/html-text-material/src/androidMain/kotlin/HtmlText.android.kt similarity index 98% rename from material-html-text/src/androidMain/kotlin/HtmlText.android.kt rename to html-text-material/src/androidMain/kotlin/HtmlText.android.kt index 7484e2e..764eb2c 100644 --- a/material-html-text/src/androidMain/kotlin/HtmlText.android.kt +++ b/html-text-material/src/androidMain/kotlin/HtmlText.android.kt @@ -8,7 +8,6 @@ import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.TextLayoutResult @@ -22,7 +21,6 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.unit.sp import de.charlex.compose.htmltext.core.htmlToAnnotatedString -import kotlin.Int /** * Simple Text composable to show the text with html styling from string resources. diff --git a/material-html-text/src/commonMain/kotlin/HtmlText.kt b/html-text-material/src/commonMain/kotlin/HtmlText.kt similarity index 100% rename from material-html-text/src/commonMain/kotlin/HtmlText.kt rename to html-text-material/src/commonMain/kotlin/HtmlText.kt diff --git a/material3-html-text/.gitignore b/html-text-material3/.gitignore similarity index 100% rename from material3-html-text/.gitignore rename to html-text-material3/.gitignore diff --git a/material3-html-text/build.gradle.kts b/html-text-material3/build.gradle.kts similarity index 94% rename from material3-html-text/build.gradle.kts rename to html-text-material3/build.gradle.kts index b978b75..ed5c18c 100644 --- a/material3-html-text/build.gradle.kts +++ b/html-text-material3/build.gradle.kts @@ -8,7 +8,6 @@ plugins { } mavenPublishConfig { - name = "material3-html-text" description = "A Kotlin Multiplatform library to render HTML content as Compose AnnotatedString in Material 3, supporting basic formatting and hyperlinks." url = "https://github.com/ch4rl3x/HtmlText" @@ -44,7 +43,7 @@ kotlin { implementation(compose.material3) implementation(compose.components.resources) - implementation(project(":common")) + implementation(projects.htmlTextCommon) } } } diff --git a/material3-html-text/proguard-rules.pro b/html-text-material3/proguard-rules.pro similarity index 100% rename from material3-html-text/proguard-rules.pro rename to html-text-material3/proguard-rules.pro diff --git a/material3-html-text/src/androidMain/kotlin/HtmlText.android.kt b/html-text-material3/src/androidMain/kotlin/HtmlText.android.kt similarity index 100% rename from material3-html-text/src/androidMain/kotlin/HtmlText.android.kt rename to html-text-material3/src/androidMain/kotlin/HtmlText.android.kt diff --git a/material3-html-text/src/commonMain/kotlin/HtmlText.kt b/html-text-material3/src/commonMain/kotlin/HtmlText.kt similarity index 100% rename from material3-html-text/src/commonMain/kotlin/HtmlText.kt rename to html-text-material3/src/commonMain/kotlin/HtmlText.kt diff --git a/sample-app/shared/build.gradle.kts b/sample-app/shared/build.gradle.kts index a776818..19c31ba 100644 --- a/sample-app/shared/build.gradle.kts +++ b/sample-app/shared/build.gradle.kts @@ -23,8 +23,8 @@ kotlin { implementation(compose.material) implementation(compose.material3) - implementation(project(":material-html-text")) - implementation(project(":material3-html-text")) + implementation(projects.htmlTextMaterial) + implementation(projects.htmlTextMaterial3) } } } @@ -37,5 +37,3 @@ kotlin { } } } - - diff --git a/settings.gradle b/settings.gradle index 02afa26..0d263f0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -21,8 +21,10 @@ dependencyResolutionManagement { } } rootProject.name = "HtmlText" -include(":material-html-text") -include(":material3-html-text") -include(":common") +include(':html-text-material') +include(':html-text-material3') +include(':html-text-common') include(":sample-app:shared") include(":sample-app:android-app") + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") \ No newline at end of file