Skip to content

Commit

Permalink
feat: add material3 HtmlText
Browse files Browse the repository at this point in the history
  • Loading branch information
ch4rl3x committed Nov 19, 2023
1 parent 6cf8b25 commit b5f61ea
Show file tree
Hide file tree
Showing 6 changed files with 396 additions and 41 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
buildscript {

ext {
kotlin_version = "1.7.0"
compose_version = '1.2.0'
kotlin_version = "1.9.10"
compose_bom_version = '2023.10.01'
compose_compiler_version = "1.5.3"
}

repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:8.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0'

Expand Down
16 changes: 10 additions & 6 deletions buildCompose.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ android {
}

composeOptions {
kotlinCompilerExtensionVersion "$compose_version"
kotlinCompilerExtensionVersion "$compose_compiler_version"
}
}

dependencies {
def composeBom = platform("androidx.compose:compose-bom:$compose_bom_version")
implementation composeBom
androidTestImplementation composeBom

/**
* Compose
*/
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.foundation:foundation:$compose_version"
implementation "androidx.compose.ui:ui-util:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui"
implementation "androidx.compose.foundation:foundation"
implementation "androidx.compose.ui:ui-util"
implementation "androidx.compose.ui:ui-tooling"
implementation "androidx.compose.material:material"
implementation "androidx.compose.material3:material3"
}
37 changes: 14 additions & 23 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ plugins {
id 'kotlin-android'
}

apply from: '../buildCompose.gradle'

android {
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "de.charlex.compose.htmltext.example"
minSdk 26
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0"

Expand All @@ -26,17 +28,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
jvmTarget = JavaVersion.VERSION_17.toString()
}
packagingOptions {
resources {
Expand All @@ -50,17 +46,12 @@ dependencies {

implementation project(':html-text')

implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose:1.5.1'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
implementation 'androidx.activity:activity-compose:1.8.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Aug 22 22:07:44 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
15 changes: 7 additions & 8 deletions html-text/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apply from: '../buildCompose.gradle'

ext {
PUBLISH_GROUP_ID = 'de.charlex.compose'
PUBLISH_VERSION = '1.5.0'
PUBLISH_VERSION = '1.6.0'
PUBLISH_ARTIFACT_ID = 'html-text'
}

Expand All @@ -17,12 +17,11 @@ apply from: '../_publish.gradle'
android {
namespace 'de.charlex.compose.htmltext'

compileSdk 33
buildToolsVersion "30.0.3"
compileSdk 34

defaultConfig {
minSdk 21
targetSdk 33
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -39,12 +38,12 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = JavaVersion.VERSION_17.toString()
}

publishing {
Expand All @@ -56,5 +55,5 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "androidx.core:core-ktx:1.8.0"
implementation "androidx.core:core-ktx:1.12.0"
}
Loading

0 comments on commit b5f61ea

Please sign in to comment.