diff --git a/README.md b/README.md
index 497aee8..c177685 100644
--- a/README.md
+++ b/README.md
@@ -4,11 +4,9 @@
StickyTimeLine is timeline view for android.
-## What's New in 0.1.1? :tada:
-- Remove the way of using xml view of VerticalSectionItemDecoration
-- Add dot size attribute
- - `timeLineDotRadius`, `timeLineDotStrokeSize`
-- Support RTL (#26)
+## What's New? :tada:
+- [Improvement] Move to MavenCentral
+- [Improvement] lib version update
## Result Screen
@@ -21,14 +19,10 @@ StickyTimeLine is timeline view for android.
## How to Use
### Gradle
+[![Maven Central](https://img.shields.io/maven-central/v/io.github.sangcomz/stickytimeline)](https://search.maven.org/artifact/io.github.sangcomz/stickytimeline)
```groovy
- repositories {
- maven { url 'https://jitpack.io' }
- }
-
dependencies {
- //StickyTimeLine v0.0.20 and above only supports projects that have been migrated to androidx.
- compile 'com.github.sangcomz:StickyTimeLine:v0.1.1'
+ implementation 'io.github.sangcomz:StickyTimeLine:x.x.x'
}
```
### Usage
diff --git a/app/build.gradle b/app/build.gradle
index 1b9af00..81f3b8c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -44,17 +44,16 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation "androidx.appcompat:appcompat:1.2.0"
+ implementation 'androidx.appcompat:appcompat:1.3.1'
implementation "androidx.constraintlayout:constraintlayout:$constraint_version"
- implementation "androidx.recyclerview:recyclerview:1.1.0"
+ implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation 'androidx.cardview:cardview:1.0.0'
implementation project(':stickytimelineview')
-// implementation 'com.github.sangcomz:StickyTimeLine:v0.1.1'
- implementation "androidx.appcompat:appcompat:1.2.0"
- implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
- testImplementation 'junit:junit:4.13'
- androidTestImplementation 'androidx.test:runner:1.3.0'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+ implementation "androidx.appcompat:appcompat:1.4.1"
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test:runner:1.4.0'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f011697..1a13136 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -10,7 +10,9 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
-
+
diff --git a/build.gradle b/build.gradle
index be38669..53e88d4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,19 +3,21 @@
buildscript {
ext {
- kotlin_version = '1.3.72'
- constraint_version = '2.0.1'
+ kotlin_version = '1.6.10'
+ constraint_version = '2.1.3'
}
repositories {
- mavenLocal()
+ mavenCentral()
google()
- jcenter()
+ maven {
+ url "https://plugins.gradle.org/m2/"
+ }
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.1.0'
+ classpath 'com.android.tools.build:gradle:7.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
+ classpath "io.github.sabujak-sabujak:gradle-github-release-plugin:0.0.2"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
@@ -23,9 +25,8 @@ buildscript {
allprojects {
repositories {
- mavenLocal()
+ mavenCentral()
google()
- jcenter()
}
}
diff --git a/gradle/release.gradle b/gradle/release.gradle
new file mode 100644
index 0000000..92642b1
--- /dev/null
+++ b/gradle/release.gradle
@@ -0,0 +1,130 @@
+apply plugin: "maven-publish"
+apply plugin: "signing"
+apply plugin: "io.github.sabujak-sabujak"
+
+if (project.rootProject.file('local.properties').isFile()) {
+ Properties props = new Properties()
+ props.load(new FileInputStream(rootProject.file("local.properties")))
+ project.ext {
+ setProperty("ossrhUsername", props["ossrhUsername"] ?: ' ')
+ setProperty("ossrhPassword", props["ossrhPassword"] ?: ' ')
+ setProperty("signingKeyId", props["signing.keyId"] ?: ' ')
+ setProperty("signingPassword", props["signing.password"] ?: ' ')
+ setProperty("signingKey", props["signing.key"] ?: ' ')
+ setProperty("githubAccessTokens", props["github_access_tokens"] ?: ' ')
+ }
+} else {
+ project.ext {
+ setProperty("ossrhUsername", ' ')
+ setProperty("ossrhPassword", ' ')
+ setProperty("signingKeyId", ' ')
+ setProperty("signingPassword", ' ')
+ setProperty("signingKey", ' ')
+ setProperty("githubAccessTokens", ' ')
+ }
+}
+
+group = "io.github.sangcomz"
+version = gradle.versionName
+archivesBaseName = "StickyTimeLine"
+
+def siteUrl = 'https://github.com/sangcomz/StickyTimeLine' // Homepage URL of the library
+def gitUrl = 'https://github.com/sangcomz/StickyTimeLine.git' // Git repository URL
+
+afterEvaluate {
+
+ task sourceJar(type: Jar) {
+ from android.sourceSets.main.java.srcDirs
+ archiveClassifier.set("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) {
+ archiveClassifier.set("javadoc")
+ from javadoc.destinationDir
+ }
+
+ // https://docs.gradle.org/current/userguide/publishing_maven.html
+ publishing {
+ publications {
+ // Creates a Maven publication called "release".
+ release(MavenPublication) {
+ groupId group
+ artifactId archivesBaseName
+ version version
+
+ if (project.plugins.findPlugin("com.android.library")) {
+ from components.release
+ } else {
+ from components.java
+ }
+ artifact sourceJar
+ artifact javadocJar
+
+ pom {
+ name = archivesBaseName
+ description = 'StickyTimeLine is timeline view for android.'
+ url = siteUrl
+ licenses {
+ license {
+ name = 'The Apache License, Version 2.0'
+ url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ }
+ }
+ developers {
+ developer {
+ id = 'sangcomz'
+ name = 'Swokwon Jeong'
+ email = 'dev.seokwon2@gmail.com'
+ }
+ }
+ scm {
+ url = gitUrl
+ }
+ }
+ }
+ }
+
+ repositories {
+ maven {
+ if (version.endsWith("-SNAPSHOT")) {
+ url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
+ } else {
+ url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
+ }
+ credentials {
+ username ossrhUsername
+ password ossrhPassword
+ }
+ }
+ }
+ }
+
+ signing {
+ useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
+ sign publishing.publications.release
+ }
+
+ javadoc {
+ if (JavaVersion.current().isJava9Compatible()) {
+ options.addBooleanOption('html5', true)
+ }
+ }
+}
+
+githubRelease {
+ owner = 'sangcomz'
+ repo = 'StickyTimeLine'
+ token = githubAccessTokens
+ tagName = version
+ targetCommitish = 'master'
+ body = """## Release Note
+* [Improvement] Move to MavenCentral
+* [Improvement] lib version update
+"""
+ name = version
+}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index ca0609e..e1235da 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -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-6.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
diff --git a/settings.gradle b/settings.gradle
index 1ff9db9..8c40e4a 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,9 +1,8 @@
include ':app', ':stickytimelineview'
-gradle.ext.set('versionCode', 9)
-gradle.ext.set('versionName', '0.1.1')
+gradle.ext.set('versionCode', 10)
+gradle.ext.set('versionName', '1.0.0')
gradle.ext.set('minSdk', 16)
-gradle.ext.set('targetSdk', 28)
-gradle.ext.set('compileSdk', 28)
-gradle.ext.set('buildTools', '28.0.2')
\ No newline at end of file
+gradle.ext.set('targetSdk', 31)
+gradle.ext.set('compileSdk', 31)
\ No newline at end of file
diff --git a/stickytimelineview/build.gradle b/stickytimelineview/build.gradle
index 8e47cd7..80aad11 100644
--- a/stickytimelineview/build.gradle
+++ b/stickytimelineview/build.gradle
@@ -1,10 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
-apply plugin: 'com.github.dcendents.android-maven'
-apply plugin: 'maven-publish'
-
-group = 'com.github.sangcomz'
-version = 'v' + gradle.versionName
repositories {
mavenCentral()
@@ -15,8 +10,6 @@ android {
defaultConfig {
minSdkVersion gradle.minSdk
targetSdkVersion gradle.targetSdk
- versionName gradle.versionName
- versionCode gradle.versionCode
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -29,26 +22,20 @@ android {
}
+apply from: '../gradle/release.gradle'
+
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation 'androidx.appcompat:appcompat:1.2.0'
- compile 'androidx.recyclerview:recyclerview:1.1.0'
- compile "androidx.constraintlayout:constraintlayout:$constraint_version"
-
- testImplementation 'junit:junit:4.13'
- androidTestImplementation 'androidx.test:runner:1.3.0'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+ implementation 'androidx.appcompat:appcompat:1.3.1'
+ implementation 'androidx.recyclerview:recyclerview:1.2.1'
+ implementation "androidx.constraintlayout:constraintlayout:$constraint_version"
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test:runner:1.4.0'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
-install {
- repositories.mavenInstaller {
- // only necessary if artifact ID diverges from project name
- // the latter defaults to project directory name and can be
- // configured in settings.gradle
- pom.artifactId = 'StickyTimeLine'
- // shouldn't be needed as this is the default anyway
- pom.packaging = 'aar'
- }
+tasks.withType(Javadoc).all {
+ enabled = false
}
\ No newline at end of file