Loading tracinglib/Android.bp +51 −8 Original line number Diff line number Diff line Loading @@ -19,27 +19,70 @@ package { java_library { name: "tracinglib-platform", defaults: ["tracinglib-defaults"], srcs: ["src/platform/kotlin/**/*.kt"], static_libs: [ "kotlinx_coroutines_android", "com_android_systemui_flags_lib", ], srcs: ["src/androidPlatformApi/kotlin/**/*.kt"], } java_library { name: "tracinglib-androidx", defaults: ["tracinglib-defaults"], srcs: ["src/androidx/kotlin/**/*.kt"], static_libs: [ "kotlinx_coroutines_android", "com_android_systemui_flags_lib", "androidx.tracing_tracing", ], srcs: ["src/androidMinApi19/kotlin/**/*.kt"], sdk_version: "31", min_sdk_version: "19", } java_test_host { name: "tracinglib-host-test", defaults: ["tracinglib-defaults"], srcs: [ "src/fakeMain/kotlin/**/*.kt", "src/fakeTest/kotlin/**/*.kt", ], static_libs: [ "androidx.tracing_tracing", "kotlinx_coroutines", "kotlinx_coroutines_test", ], libs: [ "junit", ], } java_defaults { name: "tracinglib-defaults", common_srcs: ["src/common/kotlin/**/*.kt"], android_app { name: "TracingLibTestApp", platform_apis: true, manifest: "empty-manifest.xml", use_resource_processor: true, } android_robolectric_test { enabled: true, name: "tracinglib-robolectric-test", defaults: ["tracinglib-defaults"], srcs: ["src/androidRoboTest/kotlin/**/*.kt"], java_resource_dirs: ["test_config"], static_libs: [ "kotlinx_coroutines_android", "com_android_systemui_flags_lib", "kotlinx_coroutines", "kotlinx_coroutines_test", ], libs: [ "androidx.test.core", "androidx.test.runner", ], instrumentation_for: "TracingLibTestApp", upstream: true, } java_defaults { name: "tracinglib-defaults", common_srcs: ["src/commonMain/kotlin/**/*.kt"], kotlincflags: [ "-Xjvm-default=all", "-Xmulti-platform", Loading tracinglib/empty-manifest.xml 0 → 100644 +17 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2024 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.app.tracing" /> tracinglib/src/androidx/kotlin/com/android/app/tracing/TraceProxy.androidx.kt→tracinglib/src/androidMinApi19/kotlin/com/android/app/tracing/TraceProxy.jetpack.kt +5 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,11 @@ package com.android.app.tracing import androidx.tracing.Trace import kotlin.random.Random @PublishedApi internal actual fun isEnabled(): Boolean { return Trace.isEnabled() } internal actual fun traceCounter(counterName: String, counterValue: Int) { Trace.setCounter(counterName, counterValue) } Loading tracinglib/src/platform/kotlin/com/android/app/tracing/TraceProxy.platform.kt→tracinglib/src/androidPlatformApi/kotlin/com/android/app/tracing/TraceProxy.platform.kt +5 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,11 @@ package com.android.app.tracing import android.os.Trace @PublishedApi internal actual fun isEnabled(): Boolean { return Trace.isEnabled() } internal actual fun traceCounter(counterName: String, counterValue: Int) { Trace.traceCounter(Trace.TRACE_TAG_APP, counterName, counterValue) } Loading tracinglib/src/platform/kotlin/com/android/app/tracing/TraceUtils.platform.kt→tracinglib/src/androidPlatformApi/kotlin/com/android/app/tracing/TraceUtils.platform.kt +0 −0 File moved. View file Loading
tracinglib/Android.bp +51 −8 Original line number Diff line number Diff line Loading @@ -19,27 +19,70 @@ package { java_library { name: "tracinglib-platform", defaults: ["tracinglib-defaults"], srcs: ["src/platform/kotlin/**/*.kt"], static_libs: [ "kotlinx_coroutines_android", "com_android_systemui_flags_lib", ], srcs: ["src/androidPlatformApi/kotlin/**/*.kt"], } java_library { name: "tracinglib-androidx", defaults: ["tracinglib-defaults"], srcs: ["src/androidx/kotlin/**/*.kt"], static_libs: [ "kotlinx_coroutines_android", "com_android_systemui_flags_lib", "androidx.tracing_tracing", ], srcs: ["src/androidMinApi19/kotlin/**/*.kt"], sdk_version: "31", min_sdk_version: "19", } java_test_host { name: "tracinglib-host-test", defaults: ["tracinglib-defaults"], srcs: [ "src/fakeMain/kotlin/**/*.kt", "src/fakeTest/kotlin/**/*.kt", ], static_libs: [ "androidx.tracing_tracing", "kotlinx_coroutines", "kotlinx_coroutines_test", ], libs: [ "junit", ], } java_defaults { name: "tracinglib-defaults", common_srcs: ["src/common/kotlin/**/*.kt"], android_app { name: "TracingLibTestApp", platform_apis: true, manifest: "empty-manifest.xml", use_resource_processor: true, } android_robolectric_test { enabled: true, name: "tracinglib-robolectric-test", defaults: ["tracinglib-defaults"], srcs: ["src/androidRoboTest/kotlin/**/*.kt"], java_resource_dirs: ["test_config"], static_libs: [ "kotlinx_coroutines_android", "com_android_systemui_flags_lib", "kotlinx_coroutines", "kotlinx_coroutines_test", ], libs: [ "androidx.test.core", "androidx.test.runner", ], instrumentation_for: "TracingLibTestApp", upstream: true, } java_defaults { name: "tracinglib-defaults", common_srcs: ["src/commonMain/kotlin/**/*.kt"], kotlincflags: [ "-Xjvm-default=all", "-Xmulti-platform", Loading
tracinglib/empty-manifest.xml 0 → 100644 +17 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2024 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.app.tracing" />
tracinglib/src/androidx/kotlin/com/android/app/tracing/TraceProxy.androidx.kt→tracinglib/src/androidMinApi19/kotlin/com/android/app/tracing/TraceProxy.jetpack.kt +5 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,11 @@ package com.android.app.tracing import androidx.tracing.Trace import kotlin.random.Random @PublishedApi internal actual fun isEnabled(): Boolean { return Trace.isEnabled() } internal actual fun traceCounter(counterName: String, counterValue: Int) { Trace.setCounter(counterName, counterValue) } Loading
tracinglib/src/platform/kotlin/com/android/app/tracing/TraceProxy.platform.kt→tracinglib/src/androidPlatformApi/kotlin/com/android/app/tracing/TraceProxy.platform.kt +5 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,11 @@ package com.android.app.tracing import android.os.Trace @PublishedApi internal actual fun isEnabled(): Boolean { return Trace.isEnabled() } internal actual fun traceCounter(counterName: String, counterValue: Int) { Trace.traceCounter(Trace.TRACE_TAG_APP, counterName, counterValue) } Loading
tracinglib/src/platform/kotlin/com/android/app/tracing/TraceUtils.platform.kt→tracinglib/src/androidPlatformApi/kotlin/com/android/app/tracing/TraceUtils.platform.kt +0 −0 File moved. View file