Skip to content

Commit ccc2616

Browse files
author
Yuriy Budiyev
committed
Dev
1 parent d62a187 commit ccc2616

File tree

4 files changed

+134
-141
lines changed

4 files changed

+134
-141
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
11
# Circular Progress Bar
2-
[ ![Download](https://api.bintray.com/packages/yuriy-budiyev/maven/circular-progress-bar/images/download.svg) ](https://bintray.com/yuriy-budiyev/maven/circular-progress-bar/_latestVersion)
32
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Circular%20Progress%20Bar-blue.svg?style=flat)](https://android-arsenal.com/details/1/6515)
43
[![API](https://img.shields.io/badge/API-14%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=14)
5-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/04aff697e57642bb96579fbaa6cc3dad)](https://www.codacy.com/app/yuriy-budiyev/circular-progress-bar?utm_source=github.com&utm_medium=referral&utm_content=yuriy-budiyev/circular-progress-bar&utm_campaign=Badge_Grade)
64

75
Circular progress bar, supports animations and indeterminate mode, highly customizable, Kotlin-friendly
86

97
### Usage ([sample](https://github.com/yuriy-budiyev/lib-demo-app))
10-
Add dependency:
8+
9+
Step 1. Add it in your root build.gradle at the end of repositories:
10+
```gradle
11+
allprojects {
12+
repositories {
13+
...
14+
maven { url 'https://jitpack.io' }
15+
}
16+
}
17+
```
18+
19+
or in settings.gradle file:
20+
```gradle
21+
dependencyResolutionManagement {
22+
...
23+
repositories {
24+
...
25+
maven { url 'https://jitpack.io' }
26+
}
27+
}
28+
```
29+
30+
Step 2. Add dependency:
1131
```gradle
1232
dependencies {
13-
implementation 'com.budiyev.android:circular-progress-bar:1.2.2'
33+
implementation 'com.github.yuriy-budiyev:circular-progress-bar:1.2.3'
1434
}
1535
```
36+
1637
Define a view in your layout file:
1738
```xml
1839
<?xml version="1.0" encoding="utf-8"?>
@@ -43,6 +64,7 @@ Define a view in your layout file:
4364
app:startAngle="270"/>
4465
</FrameLayout>
4566
```
67+
4668
And (or) add following code to your activity:
4769

4870
Kotlin

build.gradle

Lines changed: 38 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,53 @@
11
buildscript {
2+
23
repositories {
4+
35
google()
4-
jcenter()
6+
7+
mavenCentral()
58
}
69

710
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.2.1'
9-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
10-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
11+
12+
classpath 'com.android.tools.build:gradle:7.0.4'
1113
}
1214
}
1315

1416
allprojects {
17+
1518
repositories {
19+
1620
google()
17-
jcenter()
21+
22+
mavenCentral()
1823
}
1924
}
2025

2126
apply plugin: 'com.android.library'
22-
apply plugin: 'com.github.dcendents.android-maven'
23-
apply plugin: 'com.jfrog.bintray'
27+
apply plugin: 'maven-publish'
2428

2529
ext {
26-
libraryName = 'CircularProgressBar'
27-
libraryDescription = 'Circular progress bar'
28-
libraryVersion = '1.2.2'
29-
artifact = 'circular-progress-bar'
30-
developerId = 'yuriy-budiyev'
31-
developerName = 'Yuriy Budiyev'
32-
developerEmail = 'yuriy.budiyev@yandex.ru'
30+
libraryVersion = '1.2.3'
3331
publishedGroupId = 'com.budiyev.android'
34-
siteUrl = 'https://github.com/yuriy-budiyev/circular-progress-bar'
35-
gitUrl = 'https://github.com/yuriy-budiyev/circular-progress-bar.git'
36-
bintrayRepo = 'maven'
37-
bintrayName = 'circular-progress-bar'
38-
licenseName = 'MIT License'
39-
allLicenses = ['MIT']
4032
}
4133

34+
group = publishedGroupId
35+
version = libraryVersion
36+
4237
android {
43-
compileSdkVersion 28
38+
compileSdkVersion 31
39+
buildToolsVersion '31.0.0'
4440

4541
defaultConfig {
4642
minSdkVersion 14
47-
targetSdkVersion 28
48-
versionCode 23
43+
targetSdkVersion 31
44+
versionCode 24
4945
versionName libraryVersion
5046
}
5147

5248
compileOptions {
53-
sourceCompatibility JavaVersion.VERSION_1_6
54-
targetCompatibility JavaVersion.VERSION_1_6
49+
sourceCompatibility JavaVersion.VERSION_1_7
50+
targetCompatibility JavaVersion.VERSION_1_7
5551
}
5652

5753
buildTypes {
@@ -63,89 +59,40 @@ android {
6359
}
6460

6561
dependencies {
66-
api 'androidx.annotation:annotation:1.0.1'
67-
}
68-
69-
group = publishedGroupId
70-
71-
install {
72-
repositories.mavenInstaller {
73-
pom {
74-
project {
75-
packaging 'aar'
76-
groupId publishedGroupId
77-
artifactId artifact
78-
name libraryName
79-
description libraryDescription
80-
url siteUrl
81-
82-
licenses {
83-
license {
84-
name licenseName
85-
}
86-
}
87-
88-
developers {
89-
developer {
90-
id developerId
91-
name developerName
92-
email developerEmail
93-
}
94-
}
95-
96-
scm {
97-
connection gitUrl
98-
developerConnection gitUrl
99-
url siteUrl
100-
}
101-
}
102-
}
103-
}
62+
api 'androidx.annotation:annotation:1.3.0'
10463
}
10564

106-
version = libraryVersion
107-
10865
task sourcesJar(type: Jar) {
109-
classifier = 'sources'
66+
archiveClassifier.set('sources')
11067
from android.sourceSets.main.java.srcDirs
11168
}
11269

11370
task javadoc(type: Javadoc) {
114-
source = android.sourceSets.main.java.srcDirs
71+
options.charSet = 'UTF-8'
72+
failOnError false
73+
source = android.sourceSets.main.java.sourceFiles
11574
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
116-
failOnError = false
11775
}
11876

11977
task javadocJar(type: Jar, dependsOn: javadoc) {
120-
classifier = 'javadoc'
121-
from javadoc.getDestinationDir()
78+
archiveClassifier.set('javadoc')
79+
from javadoc.destinationDir
12280
}
12381

12482
artifacts {
125-
archives javadocJar
12683
archives sourcesJar
84+
archives javadocJar
12785
}
12886

129-
Properties properties = new Properties()
130-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
131-
132-
bintray {
133-
user = properties.getProperty('bintray.user')
134-
key = properties.getProperty('bintray.apikey')
135-
configurations = ['archives']
136-
137-
pkg {
138-
repo = bintrayRepo
139-
name = bintrayName
140-
desc = libraryDescription
141-
websiteUrl = siteUrl
142-
vcsUrl = gitUrl
143-
licenses = allLicenses
144-
publish = true
145-
146-
version {
147-
desc = libraryDescription
148-
vcsTag = 'v' + libraryVersion
87+
afterEvaluate {
88+
publishing {
89+
publications {
90+
release(MavenPublication) {
91+
from components.release
92+
artifactId = 'circular-progress-bar'
93+
groupId = publishedGroupId
94+
version = libraryVersion
95+
}
14996
}
15097
}
15198
}

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-4.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

0 commit comments

Comments
 (0)