feat: 埋点数据收集SDK

This commit is contained in:
yangxisong 2025-12-09 15:39:03 +08:00
parent 16fec58089
commit b63ca43ace
3 changed files with 18 additions and 9 deletions

Binary file not shown.

Binary file not shown.

View File

@ -8,9 +8,7 @@ version = "1.0.0"
android {
namespace = "com.yuanxuan.tracking_point.library"
compileSdk {
version = release(36)
}
compileSdk = 36
defaultConfig {
minSdk = 23
@ -64,23 +62,34 @@ dependencies {
tasks.register("buildAar") {
group = "build"
description = "Build AAR manually"
description = "Build and copy release and debug AARs."
dependsOn("assembleRelease")
dependsOn("assembleDebug", "assembleRelease")
doLast {
val releaseDestDir = rootProject.file("aar/release")
val debugDestDir = rootProject.file("aar/debug")
val aarVersion = project.version
// Copy release AAR
copy {
from(layout.buildDirectory.file("outputs/aar/library-release.aar"))
into(releaseDestDir)
rename { "trackingPoint-${project.version}.aar" }
rename { "trackingPoint-release-$aarVersion.aar" }
}
// Copy debug AAR
copy {
from(layout.buildDirectory.file("outputs/aar/library-debug.aar"))
into(debugDestDir)
rename { "trackingPoint-debug-$aarVersion.aar" }
}
println(
"""
AARs have been built and copied:
- Release: ${releaseDestDir.absolutePath}/trackingPoint.aar
- Release: ${releaseDestDir.absolutePath}/trackingPoint-$aarVersion.aar
- Debug: ${debugDestDir.absolutePath}/trackingPoint-$aarVersion.aar
""".trimIndent()
)
}