Set skeleton for LeakCanary supporting library

Follow the setup of adblib.

Bug: 336417209
Test: N/A
Change-Id: If3f8571a63aa2f6542a29193cc88721c0f721ef6
diff --git a/leakcanarylib/BUILD b/leakcanarylib/BUILD
new file mode 100644
index 0000000..2e665d2
--- /dev/null
+++ b/leakcanarylib/BUILD
@@ -0,0 +1,14 @@
+load("//tools/base/bazel:bazel.bzl", "iml_module")
+
+# managed by go/iml_to_build
+iml_module(
+    name = "studio.android.sdktools.leakcanarylib",
+    srcs = ["src"],
+    iml_files = ["android.sdktools.leakcanarylib.iml"],
+    visibility = ["//visibility:public"],
+    # do not sort: must match IML order
+    deps = [
+        "@intellij//:intellij-sdk",
+        "@intellij//:com.intellij.java",
+    ],
+)
diff --git a/leakcanarylib/OWNERS b/leakcanarylib/OWNERS
new file mode 100644
index 0000000..7215bec
--- /dev/null
+++ b/leakcanarylib/OWNERS
@@ -0,0 +1 @@
+include platform/tools/base:/owners/profilers_OWNERS
\ No newline at end of file
diff --git a/leakcanarylib/README.md b/leakcanarylib/README.md
new file mode 100644
index 0000000..9e7943a
--- /dev/null
+++ b/leakcanarylib/README.md
@@ -0,0 +1,6 @@
+# Overview
+
+The `leakcanarylib` is the interface between Android Studio and the
+LeakCanary memory leak detection tool (https://square.github.io/leakcanary/).
+This Kotlin-based library facilitates integration and streamlines the process
+of identifying and addressing memory leaks in Android applications.
diff --git a/leakcanarylib/android.sdktools.leakcanarylib.iml b/leakcanarylib/android.sdktools.leakcanarylib.iml
new file mode 100644
index 0000000..a0d3a10
--- /dev/null
+++ b/leakcanarylib/android.sdktools.leakcanarylib.iml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="library" name="studio-sdk" level="project" />
+    <orderEntry type="library" name="studio-plugin-com.intellij.java" level="project" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
diff --git a/leakcanarylib/src/com/android/leakcanarylib/LeakCanarySerializer.kt b/leakcanarylib/src/com/android/leakcanarylib/LeakCanarySerializer.kt
new file mode 100644
index 0000000..c3d1ded
--- /dev/null
+++ b/leakcanarylib/src/com/android/leakcanarylib/LeakCanarySerializer.kt
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+package com.android.leakcanarylib
+
+class LeakCanarySerializer {
+    var logcatMessage: String = ""
+
+    /** Test function **/
+    fun test(logcatMessage: String): String {
+        return logcatMessage
+    }
+}
+