Skip to content

Commit

Permalink
Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuriy Budiyev committed Feb 18, 2022
1 parent d62a187 commit ccc2616
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 141 deletions.
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
# Circular Progress Bar
[ ![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)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Circular%20Progress%20Bar-blue.svg?style=flat)](https://android-arsenal.com/details/1/6515)
[![API](https://img.shields.io/badge/API-14%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![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)

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

### Usage ([sample](https://github.com/yuriy-budiyev/lib-demo-app))
Add dependency:

Step 1. Add it in your root build.gradle at the end of repositories:
```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```

or in settings.gradle file:
```gradle
dependencyResolutionManagement {
...
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```

Step 2. Add dependency:
```gradle
dependencies {
implementation 'com.budiyev.android:circular-progress-bar:1.2.2'
implementation 'com.github.yuriy-budiyev:circular-progress-bar:1.2.3'
}
```

Define a view in your layout file:
```xml
<?xml version="1.0" encoding="utf-8"?>
Expand Down Expand Up @@ -43,6 +64,7 @@ Define a view in your layout file:
app:startAngle="270"/>
</FrameLayout>
```

And (or) add following code to your activity:

Kotlin
Expand Down
129 changes: 38 additions & 91 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,57 +1,53 @@
buildscript {

repositories {

google()
jcenter()

mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'

classpath 'com.android.tools.build:gradle:7.0.4'
}
}

allprojects {

repositories {

google()
jcenter()

mavenCentral()
}
}

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'

ext {
libraryName = 'CircularProgressBar'
libraryDescription = 'Circular progress bar'
libraryVersion = '1.2.2'
artifact = 'circular-progress-bar'
developerId = 'yuriy-budiyev'
developerName = 'Yuriy Budiyev'
developerEmail = '[email protected]'
libraryVersion = '1.2.3'
publishedGroupId = 'com.budiyev.android'
siteUrl = 'https://github.com/yuriy-budiyev/circular-progress-bar'
gitUrl = 'https://github.com/yuriy-budiyev/circular-progress-bar.git'
bintrayRepo = 'maven'
bintrayName = 'circular-progress-bar'
licenseName = 'MIT License'
allLicenses = ['MIT']
}

group = publishedGroupId
version = libraryVersion

android {
compileSdkVersion 28
compileSdkVersion 31
buildToolsVersion '31.0.0'

defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 23
targetSdkVersion 31
versionCode 24
versionName libraryVersion
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

buildTypes {
Expand All @@ -63,89 +59,40 @@ android {
}

dependencies {
api 'androidx.annotation:annotation:1.0.1'
}

group = publishedGroupId

install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact
name libraryName
description libraryDescription
url siteUrl

licenses {
license {
name licenseName
}
}

developers {
developer {
id developerId
name developerName
email developerEmail
}
}

scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
api 'androidx.annotation:annotation:1.3.0'
}

version = libraryVersion

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

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
options.charSet = 'UTF-8'
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
failOnError = false
}

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

artifacts {
archives javadocJar
archives sourcesJar
archives javadocJar
}

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 = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true

version {
desc = libraryDescription
vcsTag = 'v' + libraryVersion
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
artifactId = 'circular-progress-bar'
groupId = publishedGroupId
version = libraryVersion
}
}
}
}
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-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
Loading

0 comments on commit ccc2616

Please sign in to comment.