Skip to content
Draft
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
9 changes: 9 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
namespace 'com.rayworks.richtextview'

defaultConfig {
applicationId "com.rayworks.richtextview"
Expand All @@ -16,6 +18,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rayworks.richtextview">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
21 changes: 9 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,28 @@

buildscript {
ext {
minSdkVersion = 15
targetSdkVersion = 28
compileSdkVersion = 28
supportLibraryVersion = '28.0.0'
appcompat_x = '1.1.0'
minSdkVersion = 21
targetSdkVersion = 34
compileSdkVersion = 34
appcompat_x = '1.6.1'
kotlin_version = '1.9.22'
}

repositories {
google()
jcenter()
mavenCentral()
}

dependencies {

classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'

classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.android.tools.build:gradle:8.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
97 changes: 25 additions & 72 deletions richtextview/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'kotlin-android'

version = "2.0.0"

android {
compileSdkVersion rootProject.ext.compileSdkVersion
namespace 'com.rayworks.library'

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
Expand All @@ -19,83 +19,36 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.8"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation "androidx.appcompat:appcompat:$rootProject.ext.appcompat_x"
implementation 'androidx.core:core-ktx:1.12.0'

implementation 'com.jakewharton.timber:timber:4.1.2'
}

def siteUrl = 'https://github.com/rayworks/RichTextView'
def gitUrl = 'https://github.com/rayworks/RichTextView.git'
group = "com.rayworks.library"

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
name 'RichTextView for Android'
url siteUrl
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'rayworks'
name 'Sean Zhou'
email 'crayzhou@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"
name = "RichTextView"
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
// Jetpack Compose BOM — pins all compose-* versions consistently.
def composeBom = platform('androidx.compose:compose-bom:2024.02.01')
implementation composeBom
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-text'
implementation 'androidx.compose.foundation:foundation'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.runtime:runtime'
implementation 'androidx.compose.animation:animation'
}
3 changes: 1 addition & 2 deletions richtextview/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rayworks.library">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
Loading