diff --git a/README-CHN.md b/README-CHN.md index 0db01c4..f56e3b7 100644 --- a/README-CHN.md +++ b/README-CHN.md @@ -22,7 +22,19 @@ Android 加载控件库,简洁、易用、可定制性强。用于快速实现 * 1.2.1 ## 使用方式 -* gradle: `compile 'cc.cloudist.acplibrary:library:1.2.1'` +1. 在工程目录下添加maven +``` +allprojects { + repositories { + maven { url "https://jitpack.io" } + ... + } +} +``` +2. module下添加gradle依赖 +``` +implementation 'com.github.chenzhenlindx:ACProgressLite:1.2.2' +``` ## 示例代码 * 花瓣类型 diff --git a/README.md b/README.md index e8e4a55..cb0d8a0 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,17 @@ Similar to iOS [MBProgressHUD](https://github.com/jdg/MBProgressHUD) * 1.2.1 ## Usage -* gradle: `compile 'cc.cloudist.acplibrary:library:1.2.1'` +``` +allprojects { + repositories { + maven { url "https://jitpack.io" } + ... + } +} +``` +``` +implementation 'com.github.chenzhenlindx:ACProgressLite:1.2.2' +``` ## Sample Code * Flower diff --git a/build.gradle b/build.gradle index b618568..f7286ab 100644 --- a/build.gradle +++ b/build.gradle @@ -2,14 +2,15 @@ buildscript { repositories { + google() jcenter() maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'com.android.tools.build:gradle:1.2.3' - classpath 'com.github.dcendents:android-maven-plugin:1.2' + classpath 'com.android.tools.build:gradle:3.2.0' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -18,6 +19,7 @@ buildscript { allprojects { repositories { + google() jcenter() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0c71e76..47225de 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Apr 10 15:27:10 PDT 2013 +#Wed Oct 10 08:43:27 CST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip diff --git a/library/build.gradle b/library/build.gradle index 1a43ebf..f85f77f 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -6,7 +6,7 @@ version = "1.2.1" android { compileSdkVersion 21 - buildToolsVersion "21.1.2" + buildToolsVersion '28.0.2' defaultConfig { minSdkVersion 9 @@ -23,7 +23,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) } //def siteUrl = 'https://github.com/Cloudist/ACProgressLite' diff --git a/library/src/main/java/cc/cloudist/acplibrary/ACProgressFlower.java b/library/src/main/java/cc/cloudist/acplibrary/ACProgressFlower.java index e89daf7..5f7f4ff 100644 --- a/library/src/main/java/cc/cloudist/acplibrary/ACProgressFlower.java +++ b/library/src/main/java/cc/cloudist/acplibrary/ACProgressFlower.java @@ -51,9 +51,13 @@ public void show() { public void run() { int result = mSpinCount % mBuilder.mPetalCount; if (mBuilder.mDirection == ACProgressConstant.DIRECT_CLOCKWISE) { - mFlowerView.updateFocusIndex(result); + if (null != mFlowerView) { + mFlowerView.updateFocusIndex(result); + } } else { - mFlowerView.updateFocusIndex(mBuilder.mPetalCount - 1 - result); + if (null != mFlowerView) { + mFlowerView.updateFocusIndex(mBuilder.mPetalCount - 1 - result); + } } if (result == 0) { mSpinCount = 1; diff --git a/sample/build.gradle b/sample/build.gradle index e7cfd1a..427547e 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 21 - buildToolsVersion "21.1.2" + buildToolsVersion '28.0.2' defaultConfig { applicationId "cc.cloudist.acpsample" @@ -20,6 +20,6 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile project(':library') + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation project(':library') }