Skip to content

Commit

Permalink
build:Module:smartprogressbar 依赖的库由 implementation 改为 compileOnly;
Browse files Browse the repository at this point in the history
  • Loading branch information
FPhoenixCorneaE committed May 1, 2021
1 parent eab0226 commit 357c47c
Show file tree
Hide file tree
Showing 13 changed files with 154 additions and 174 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

implementation 'com.github.FPhoenixCorneaE:SmartProgressBar:1.0.2'
// implementation project(path: ':smartprogressbar')
// implementation 'com.github.FPhoenixCorneaE:SmartProgressBar:1.0.3'
implementation project(path: ':smartProgressBar')
}
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
package="com.wkz.smartprogressbar">
package="com.fphoenixcorneae.smartprogressbar">

<dist:module dist:instant="true" />

Expand All @@ -13,7 +13,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="com.wkz.smartprogressbar.MainActivity"
android:name="com.fphoenixcorneae.smartprogressbar.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.wkz.smartprogressbar
package com.fphoenixcorneae.smartprogressbar

import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.ValueAnimator
import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 28 23:18:06 CST 2021
#Sat May 01 08:41:23 CST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':app'
include ':smartprogressbar'
include ':smartProgressBar'
File renamed without changes.
11 changes: 5 additions & 6 deletions smartprogressbar/build.gradle → smartProgressBar/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.FPhoenixCorneaE'

Expand All @@ -11,7 +10,7 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 30
versionCode 102
versionCode 103
versionName "1.0.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -41,10 +40,10 @@ android {
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core-ktx:1.3.2'
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compileOnly 'androidx.appcompat:appcompat:1.2.0'
compileOnly 'androidx.core:core-ktx:1.3.2'
}

//添加以下配置,否则上传后的jar包看不到注释-------------------------------------------------------------
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class ProgressBarLayout @JvmOverloads constructor(
setProgressEndColor(mProgressEndColor)
setClockwise(mClockwise)
setRadius(mRadius)
mSmartProgressBar.mShowShadow = mShowShadow
mSmartProgressBar.setShowShadow(mShowShadow)
addView(mSmartProgressBar, progressLp)
}

Expand Down Expand Up @@ -417,7 +417,7 @@ class ProgressBarLayout @JvmOverloads constructor(
mRlTemperatureParent!!.visibility = View.VISIBLE

// 更新温度
addProgressAnimatorUpdateListener(ValueAnimator.AnimatorUpdateListener {
addProgressAnimatorUpdateListener {
val animatedValue = it.animatedValue as Float
Log.i("animatedValue", "setTemperatureText---${animatedValue}")
when (isClockwise) {
Expand All @@ -428,7 +428,7 @@ class ProgressBarLayout @JvmOverloads constructor(
mTvTemperature!!.text = beginTemperature.toInt().toString()
}
}
})
}

// 更新圆环进度
val progress = max
Expand Down Expand Up @@ -460,7 +460,7 @@ class ProgressBarLayout @JvmOverloads constructor(
if (mTvTime != null) {
mTvTime!!.visibility = View.VISIBLE
// 更新时间
addProgressAnimatorUpdateListener(ValueAnimator.AnimatorUpdateListener {
addProgressAnimatorUpdateListener {
val animatedValue = it.animatedValue as Float
val time = animatedValue.toLong()
try {
Expand Down Expand Up @@ -489,7 +489,7 @@ class ProgressBarLayout @JvmOverloads constructor(
} catch (e: NumberFormatException) {
e.printStackTrace()
}
})
}

// 更新圆环进度
this.max = secondTotalTime.toFloat()
Expand Down
Loading

0 comments on commit 357c47c

Please sign in to comment.