Skip to content

Commit

Permalink
build: separate material and material3
Browse files Browse the repository at this point in the history
  • Loading branch information
ch4rl3x committed Nov 20, 2023
1 parent 400b5fb commit 9bece64
Show file tree
Hide file tree
Showing 15 changed files with 102 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Add actual HtmlText library:

```groovy
dependencies {
implementation 'de.charlex.compose:html-text:1.6.0'
implementation 'de.charlex.compose.material:material-html-text:1.6.0'
}
```

Expand Down
3 changes: 1 addition & 2 deletions buildCompose.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ dependencies {
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"

}
4 changes: 3 additions & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ android {

dependencies {

implementation project(':html-text')
implementation project(':material-html-text')

implementation "androidx.compose.material:material"

implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.tooling.preview.Preview
import de.charlex.compose.HtmlText
import de.charlex.compose.material.HtmlText
import de.charlex.compose.htmltext.example.ui.theme.HtmlTextTheme

class MainActivity : ComponentActivity() {
Expand Down
File renamed without changes.
11 changes: 7 additions & 4 deletions html-text/build.gradle → material-html-text/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ apply from: '../_ktlint.gradle'
apply from: '../buildCompose.gradle'

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

apply from: '../_publish.gradle'

android {
namespace 'de.charlex.compose.htmltext'
namespace 'de.charlex.compose.material.htmltext'

compileSdk 34

Expand Down Expand Up @@ -54,6 +54,9 @@ android {
}

dependencies {

implementation "androidx.compose.material:material"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "androidx.core:core-ktx:1.12.0"
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.charlex.compose
package de.charlex.compose.material

import android.graphics.Typeface
import android.os.Build.VERSION.SDK_INT
Expand Down
1 change: 1 addition & 0 deletions material3-html-text/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
62 changes: 62 additions & 0 deletions material3-html-text/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
}

apply from: '../_ktlint.gradle'
apply from: '../buildCompose.gradle'

ext {
PUBLISH_GROUP_ID = 'de.charlex.compose.material3'
PUBLISH_VERSION = '2.0.0-beta01'
PUBLISH_ARTIFACT_ID = 'material3-html-text'
}

apply from: '../_publish.gradle'

android {
namespace 'de.charlex.compose.material3.htmltext'

compileSdk 34

defaultConfig {
minSdk 21
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures {
buildConfig = false
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

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

publishing {
singleVariant('release') {
withSourcesJar()
}
}
}

dependencies {

implementation "androidx.compose.material3:material3"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "androidx.core:core-ktx:1.12.0"
}
21 changes: 21 additions & 0 deletions material3-html-text/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ dependencyResolutionManagement {
}
}
rootProject.name = "HtmlText"
include ':material-html-text'
include ':material3-html-text'
include ':html-text'
include ':example'

0 comments on commit 9bece64

Please sign in to comment.