Skip to content

Commit

Permalink
升级 AndroidAOP 版本,升级 agcp 版本。
Browse files Browse the repository at this point in the history
  • Loading branch information
anjiemo committed Mar 18, 2024
1 parent 0105344 commit 327684d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ dependencies {
// Shape 框架:https://github.com/getActivity/ShapeView
implementation 'com.github.getActivity:ShapeView:8.5'

implementation 'io.github.FlyJingFish.AndroidAop:android-aop-core:1.4.0'
implementation 'io.github.FlyJingFish.AndroidAop:android-aop-annotation:1.4.0'
ksp 'io.github.FlyJingFish.AndroidAop:android-aop-ksp:1.4.0'
implementation "io.github.FlyJingFish.AndroidAop:android-aop-core:${android_aop_version}"
implementation "io.github.FlyJingFish.AndroidAop:android-aop-annotation:${android_aop_version}"
ksp "io.github.FlyJingFish.AndroidAop:android-aop-ksp:${android_aop_version}"

// 图片加载框架:https://github.com/bumptech/glide
// 官方使用文档:https://github.com/Muyangmin/glide-docs-cn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LogInterceptCut : BasePointCut<Log> {
// 方法名
val methodName: String = targetMethod.name
// 方法参数值集合
val parameterValues: Array<Any?> = joinPoint.args
val parameterValues: Array<out Any?> = joinPoint.args.orEmpty()

// 记录并打印方法的信息
val builder: StringBuilder = getMethodLogInfo(className, methodName, parameterValues)
Expand All @@ -49,7 +49,7 @@ class LogInterceptCut : BasePointCut<Log> {
private fun getMethodLogInfo(
className: String,
methodName: String,
parameterValues: Array<Any?>
parameterValues: Array<out Any?>
): StringBuilder {
val builder: StringBuilder = StringBuilder("\u21E2 ")
builder.append(className)
Expand Down
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// SunnyBeach-Kotlin 版本
// 导入配置文件
apply from : 'configs.gradle'
apply from: 'configs.gradle'

buildscript {

// 导入通用的 Maven 库配置
apply from : 'maven.gradle'
apply from: 'maven.gradle'

ext.kotlin_version = "1.9.22"
ext.agcp_version = "1.6.3.300"
ext.agcp_version = "1.9.1.303"
ext.hilt_version = "2.47"
ext.android_aop_version = "1.4.7"

repositories {
// 阿里云云效仓库(Gradle 插件):https://maven.aliyun.com/mvn/guide
Expand All @@ -28,7 +29,7 @@ buildscript {
// noinspection GradleDependency
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.9.22-1.0.17"
classpath 'io.github.FlyJingFish.AndroidAop:android-aop-plugin:1.4.0'
classpath "io.github.FlyJingFish.AndroidAop:android-aop-plugin:${android_aop_version}"
// 增加agcp插件配置
classpath "com.huawei.agconnect:agcp:$agcp_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
Expand Down Expand Up @@ -57,7 +58,7 @@ allprojects {
}

// 将构建文件统一输出到项目根目录下的 build 文件夹
setBuildDir(new File(rootDir, "build/${path.replaceAll(':', '/')}"))
layout.buildDirectory.set(file("$rootDir/build/${path.replace(':', '/')}"))
}

tasks.register('clean', Delete) {
Expand Down

0 comments on commit 327684d

Please sign in to comment.