Skip to content

Commit

Permalink
移除appcompat依赖,适配AndroidX
Browse files Browse the repository at this point in the history
  • Loading branch information
jenly1314 committed Aug 19, 2019
1 parent bb0f933 commit 77998cd
Show file tree
Hide file tree
Showing 19 changed files with 121 additions and 92 deletions.
27 changes: 27 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-28
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Run Tests
command: ./gradlew lint test
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results
25 changes: 0 additions & 25 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/markdown-navigator/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
language: android
dist: trusty
jdk: oraclejdk8
before_install:
- yes | sdkmanager "platforms;android-28"
sudo: false

env:
global:
- ANDROID_API_LEVEL=28
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
- TRAVIS_SECURE_ENV_VARS=true

before_install:
- chmod +x gradlew
- mkdir "$ANDROID_HOME/licenses" || true
# Hack to accept Android licenses
- yes | sdkmanager "platforms;android-$ANDROID_API_LEVEL"


android:
components:
# The BuildTools version used by your project
- tools
- platform-tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- extra-android-m2repository
- extra-google-android-support

# The SDK version used to compile your project
- android-$ANDROID_API_LEVEL
licenses:
- '.+'
- extra-android-m2repository
- extra-google-android-support

script:
- ./gradlew clean
- ./gradlew assembleDebug
- ./gradlew assembleRelease
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# CircleProgressView

[![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/CircleProgressView/master/app/release/app-release.apk)
[![Jitpack](https://jitpack.io/v/jenly1314/CircleProgressView.svg)](https://jitpack.io/#jenly1314/CircleProgressView)
[![JitPack](https://jitpack.io/v/jenly1314/CircleProgressView.svg)](https://jitpack.io/#jenly1314/CircleProgressView)
[![CI](https://travis-ci.org/jenly1314/CircleProgressView.svg?branch=master)](https://travis-ci.org/jenly1314/CircleProgressView)
[![CircleCI](https://circleci.com/gh/jenly1314/CircleProgressView.svg?style=svg)](https://circleci.com/gh/jenly1314/CircleProgressView)
[![API](https://img.shields.io/badge/API-16%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=16)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php)
[![Blog](https://img.shields.io/badge/blog-Jenly-9933CC.svg)](http://blog.csdn.net/jenly121)
[![Blog](https://img.shields.io/badge/blog-Jenly-9933CC.svg)](https://jenly1314.github.io/)
[![QQGroup](https://img.shields.io/badge/QQGroup-20867961-blue.svg)](http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1411582c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad)

CircleProgressView for Android 是一个圆形的进度动画控件,动画效果纵享丝滑。
Expand Down Expand Up @@ -43,18 +44,18 @@ CircleProgressView for Android 是一个圆形的进度动画控件,动画效
<dependency>
<groupId>com.king.view</groupId>
<artifactId>circleprogressview</artifactId>
<version>1.0.1</version>
<version>1.1.0</version>
<type>pom</type>
</dependency>
```
### Gradle:
```gradle
implementation 'com.king.view:circleprogressview:1.0.1'
implementation 'com.king.view:circleprogressview:1.1.0'
```

### Lvy:
```lvy
<dependency org='com.king.view' name='circleprogressview' rev='1.0.1'>
<dependency org='com.king.view' name='circleprogressview' rev='1.1.0'>
<artifact name='$AID' ext='pom'></artifact>
</dependency>
```
Expand All @@ -68,11 +69,6 @@ allprojects {
}
```

## 引入的库:
```gradle
compileOnly 'com.android.support:appcompat-v7:28.0.0'
```

## 示例

布局示例
Expand All @@ -96,6 +92,9 @@ compileOnly 'com.android.support:appcompat-v7:28.0.0'

## 版本记录

#### v1.1.0:2019-8-19
* 移除appcompat依赖,适配AndroidX

#### v1.0.1:2019-5-23
* 新增cpvTurn属性(是否旋转)

Expand All @@ -118,6 +117,8 @@ compileOnly 'com.android.support:appcompat-v7:28.0.0'

CSDN: <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a>

博客园: <a title="博客园" href="https://www.cnblogs.com/jenly" target="_blank">jenly</a>

Github: <a title="Github开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a>

加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1411582c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a>
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
targetSdkVersion build_versions.targetSdk
versionCode app_version.versionCode
versionName app_version.versionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}
buildTypes {
Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2,"versionName":"1.0.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":3,"versionName":"1.1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.king.circleprogressview;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

import static org.junit.Assert.*;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.king.circleprogressview;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;

import com.king.view.circleprogressview.CircleProgressView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

private CircleProgressView cpv;
Expand Down
10 changes: 3 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
buildscript {
apply from: 'versions.gradle'

repositories {
google()
jcenter()
}
addRepos(repositories)

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.novoda:bintray-release:0.9'
Expand All @@ -17,9 +15,7 @@ buildscript {
}

allprojects {
repositories {
addRepos(repositories)
}
addRepos(repositories)
}

task clean(type: Delete) {
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ org.gradle.jvmargs = -Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.useAndroidX=true
android.enableJetifier=true

11 changes: 6 additions & 5 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase = GRADLE_USER_HOME
distributionPath = wrapper/dists
distributionUrl = https\://services.gradle.org/distributions/gradle-4.6-all.zip
zipStoreBase = GRADLE_USER_HOME
zipStorePath = wrapper/dists
#Mon Aug 19 10:11:07 CST 2019
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
4 changes: 1 addition & 3 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
versionCode app_version.versionCode
versionName app_version.versionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}
buildTypes {
Expand All @@ -32,6 +32,4 @@ dependencies {
androidTestImplementation deps.test.runner
androidTestImplementation deps.test.espresso

compileOnly deps.support.appcompat

}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.king.view.circleprogressview;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

import static org.junit.Assert.*;

/**
Expand Down
Loading

0 comments on commit 77998cd

Please sign in to comment.