Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sangcomz committed Feb 2, 2022
2 parents 95c77f5 + c07e6ba commit 69d4879
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 57 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
15 changes: 7 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
4 changes: 3 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".JavaExampleActivity"></activity>
<activity android:name=".MainActivity">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
17 changes: 9 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,30 @@
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
}
}

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

Expand Down
130 changes: 130 additions & 0 deletions gradle/release.gradle
Original file line number Diff line number Diff line change
@@ -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 = '[email protected]'
}
}
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
}
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-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
9 changes: 4 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -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')
gradle.ext.set('targetSdk', 31)
gradle.ext.set('compileSdk', 31)
33 changes: 10 additions & 23 deletions stickytimelineview/build.gradle
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -15,8 +10,6 @@ android {
defaultConfig {
minSdkVersion gradle.minSdk
targetSdkVersion gradle.targetSdk
versionName gradle.versionName
versionCode gradle.versionCode
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -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
}

0 comments on commit 69d4879

Please sign in to comment.