Skip to content

Commit 69d4879

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 95c77f5 + c07e6ba commit 69d4879

File tree

8 files changed

+169
-57
lines changed

8 files changed

+169
-57
lines changed

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44

55
StickyTimeLine is timeline view for android.
66

7-
## What's New in 0.1.1? :tada:
8-
- Remove the way of using xml view of VerticalSectionItemDecoration
9-
- Add dot size attribute
10-
- `timeLineDotRadius`, `timeLineDotStrokeSize`
11-
- Support RTL (#26)
7+
## What's New? :tada:
8+
- [Improvement] Move to MavenCentral
9+
- [Improvement] lib version update
1210

1311
## Result Screen
1412

@@ -21,14 +19,10 @@ StickyTimeLine is timeline view for android.
2119
## How to Use
2220

2321
### Gradle
22+
[![Maven Central](https://img.shields.io/maven-central/v/io.github.sangcomz/stickytimeline)](https://search.maven.org/artifact/io.github.sangcomz/stickytimeline)
2423
```groovy
25-
repositories {
26-
maven { url 'https://jitpack.io' }
27-
}
28-
2924
dependencies {
30-
//StickyTimeLine v0.0.20 and above only supports projects that have been migrated to androidx.
31-
compile 'com.github.sangcomz:StickyTimeLine:v0.1.1'
25+
implementation 'io.github.sangcomz:StickyTimeLine:x.x.x'
3226
}
3327
```
3428
### Usage

app/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,16 @@ android {
4444
dependencies {
4545
implementation fileTree(include: ['*.jar'], dir: 'libs')
4646
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
47-
implementation "androidx.appcompat:appcompat:1.2.0"
47+
implementation 'androidx.appcompat:appcompat:1.3.1'
4848
implementation "androidx.constraintlayout:constraintlayout:$constraint_version"
49-
implementation "androidx.recyclerview:recyclerview:1.1.0"
49+
implementation "androidx.recyclerview:recyclerview:1.2.1"
5050
implementation 'androidx.cardview:cardview:1.0.0'
5151
implementation project(':stickytimelineview')
52-
// implementation 'com.github.sangcomz:StickyTimeLine:v0.1.1'
5352

5453

55-
implementation "androidx.appcompat:appcompat:1.2.0"
56-
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
57-
testImplementation 'junit:junit:4.13'
58-
androidTestImplementation 'androidx.test:runner:1.3.0'
59-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
54+
implementation "androidx.appcompat:appcompat:1.4.1"
55+
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
56+
testImplementation 'junit:junit:4.13.2'
57+
androidTestImplementation 'androidx.test:runner:1.4.0'
58+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
6059
}

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
android:supportsRtl="true"
1111
android:theme="@style/AppTheme">
1212
<activity android:name=".JavaExampleActivity"></activity>
13-
<activity android:name=".MainActivity">
13+
<activity
14+
android:name=".MainActivity"
15+
android:exported="true">
1416
<intent-filter>
1517
<action android:name="android.intent.action.MAIN" />
1618

build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,30 @@
33
buildscript {
44

55
ext {
6-
kotlin_version = '1.3.72'
7-
constraint_version = '2.0.1'
6+
kotlin_version = '1.6.10'
7+
constraint_version = '2.1.3'
88
}
99

1010
repositories {
11-
mavenLocal()
11+
mavenCentral()
1212
google()
13-
jcenter()
13+
maven {
14+
url "https://plugins.gradle.org/m2/"
15+
}
1416
}
1517
dependencies {
16-
classpath 'com.android.tools.build:gradle:4.1.0'
18+
classpath 'com.android.tools.build:gradle:7.1.0'
1719
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
18-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
20+
classpath "io.github.sabujak-sabujak:gradle-github-release-plugin:0.0.2"
1921
// NOTE: Do not place your application dependencies here; they belong
2022
// in the individual module build.gradle files
2123
}
2224
}
2325

2426
allprojects {
2527
repositories {
26-
mavenLocal()
28+
mavenCentral()
2729
google()
28-
jcenter()
2930
}
3031
}
3132

gradle/release.gradle

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
apply plugin: "maven-publish"
2+
apply plugin: "signing"
3+
apply plugin: "io.github.sabujak-sabujak"
4+
5+
if (project.rootProject.file('local.properties').isFile()) {
6+
Properties props = new Properties()
7+
props.load(new FileInputStream(rootProject.file("local.properties")))
8+
project.ext {
9+
setProperty("ossrhUsername", props["ossrhUsername"] ?: ' ')
10+
setProperty("ossrhPassword", props["ossrhPassword"] ?: ' ')
11+
setProperty("signingKeyId", props["signing.keyId"] ?: ' ')
12+
setProperty("signingPassword", props["signing.password"] ?: ' ')
13+
setProperty("signingKey", props["signing.key"] ?: ' ')
14+
setProperty("githubAccessTokens", props["github_access_tokens"] ?: ' ')
15+
}
16+
} else {
17+
project.ext {
18+
setProperty("ossrhUsername", ' ')
19+
setProperty("ossrhPassword", ' ')
20+
setProperty("signingKeyId", ' ')
21+
setProperty("signingPassword", ' ')
22+
setProperty("signingKey", ' ')
23+
setProperty("githubAccessTokens", ' ')
24+
}
25+
}
26+
27+
group = "io.github.sangcomz"
28+
version = gradle.versionName
29+
archivesBaseName = "StickyTimeLine"
30+
31+
def siteUrl = 'https://github.com/sangcomz/StickyTimeLine' // Homepage URL of the library
32+
def gitUrl = 'https://github.com/sangcomz/StickyTimeLine.git' // Git repository URL
33+
34+
afterEvaluate {
35+
36+
task sourceJar(type: Jar) {
37+
from android.sourceSets.main.java.srcDirs
38+
archiveClassifier.set("sources")
39+
}
40+
41+
task javadoc(type: Javadoc) {
42+
source = android.sourceSets.main.java.srcDirs
43+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
44+
}
45+
46+
task javadocJar(type: Jar, dependsOn: javadoc) {
47+
archiveClassifier.set("javadoc")
48+
from javadoc.destinationDir
49+
}
50+
51+
// https://docs.gradle.org/current/userguide/publishing_maven.html
52+
publishing {
53+
publications {
54+
// Creates a Maven publication called "release".
55+
release(MavenPublication) {
56+
groupId group
57+
artifactId archivesBaseName
58+
version version
59+
60+
if (project.plugins.findPlugin("com.android.library")) {
61+
from components.release
62+
} else {
63+
from components.java
64+
}
65+
artifact sourceJar
66+
artifact javadocJar
67+
68+
pom {
69+
name = archivesBaseName
70+
description = 'StickyTimeLine is timeline view for android.'
71+
url = siteUrl
72+
licenses {
73+
license {
74+
name = 'The Apache License, Version 2.0'
75+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
76+
}
77+
}
78+
developers {
79+
developer {
80+
id = 'sangcomz'
81+
name = 'Swokwon Jeong'
82+
83+
}
84+
}
85+
scm {
86+
url = gitUrl
87+
}
88+
}
89+
}
90+
}
91+
92+
repositories {
93+
maven {
94+
if (version.endsWith("-SNAPSHOT")) {
95+
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
96+
} else {
97+
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
98+
}
99+
credentials {
100+
username ossrhUsername
101+
password ossrhPassword
102+
}
103+
}
104+
}
105+
}
106+
107+
signing {
108+
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
109+
sign publishing.publications.release
110+
}
111+
112+
javadoc {
113+
if (JavaVersion.current().isJava9Compatible()) {
114+
options.addBooleanOption('html5', true)
115+
}
116+
}
117+
}
118+
119+
githubRelease {
120+
owner = 'sangcomz'
121+
repo = 'StickyTimeLine'
122+
token = githubAccessTokens
123+
tagName = version
124+
targetCommitish = 'master'
125+
body = """## Release Note
126+
* [Improvement] Move to MavenCentral
127+
* [Improvement] lib version update
128+
"""
129+
name = version
130+
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip

settings.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
include ':app', ':stickytimelineview'
22

3-
gradle.ext.set('versionCode', 9)
4-
gradle.ext.set('versionName', '0.1.1')
3+
gradle.ext.set('versionCode', 10)
4+
gradle.ext.set('versionName', '1.0.0')
55

66
gradle.ext.set('minSdk', 16)
7-
gradle.ext.set('targetSdk', 28)
8-
gradle.ext.set('compileSdk', 28)
9-
gradle.ext.set('buildTools', '28.0.2')
7+
gradle.ext.set('targetSdk', 31)
8+
gradle.ext.set('compileSdk', 31)

stickytimelineview/build.gradle

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'com.github.dcendents.android-maven'
4-
apply plugin: 'maven-publish'
5-
6-
group = 'com.github.sangcomz'
7-
version = 'v' + gradle.versionName
83

94
repositories {
105
mavenCentral()
@@ -15,8 +10,6 @@ android {
1510
defaultConfig {
1611
minSdkVersion gradle.minSdk
1712
targetSdkVersion gradle.targetSdk
18-
versionName gradle.versionName
19-
versionCode gradle.versionCode
2013
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2114
}
2215

@@ -29,26 +22,20 @@ android {
2922

3023
}
3124

25+
apply from: '../gradle/release.gradle'
26+
3227
dependencies {
3328
implementation fileTree(include: ['*.jar'], dir: 'libs')
3429
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
35-
implementation 'androidx.appcompat:appcompat:1.2.0'
36-
compile 'androidx.recyclerview:recyclerview:1.1.0'
37-
compile "androidx.constraintlayout:constraintlayout:$constraint_version"
38-
39-
testImplementation 'junit:junit:4.13'
40-
androidTestImplementation 'androidx.test:runner:1.3.0'
41-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
30+
implementation 'androidx.appcompat:appcompat:1.3.1'
31+
implementation 'androidx.recyclerview:recyclerview:1.2.1'
32+
implementation "androidx.constraintlayout:constraintlayout:$constraint_version"
4233

34+
testImplementation 'junit:junit:4.13.2'
35+
androidTestImplementation 'androidx.test:runner:1.4.0'
36+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
4337
}
4438

45-
install {
46-
repositories.mavenInstaller {
47-
// only necessary if artifact ID diverges from project name
48-
// the latter defaults to project directory name and can be
49-
// configured in settings.gradle
50-
pom.artifactId = 'StickyTimeLine'
51-
// shouldn't be needed as this is the default anyway
52-
pom.packaging = 'aar'
53-
}
39+
tasks.withType(Javadoc).all {
40+
enabled = false
5441
}

0 commit comments

Comments
 (0)