From d5867192d5d3118ef35f235620a84d4a77316aa4 Mon Sep 17 00:00:00 2001 From: Yelin Jeong Date: Mon, 22 Apr 2024 14:44:30 +0900 Subject: [PATCH] Gradle/NNSApi: Copy aar file to external This patch adds task in build.gradle.kts to copy aar file. Copied aar file will be used by other modules. Signed-off-by: Yelin Jeong --- .gitignore | 1 + nnstreamer-api/build.gradle.kts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.gitignore b/.gitignore index 08cdfdb..48f7298 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ build # Ignore 3rd party binaries /externals/downloadable /externals/gst-1.0-android-universal +/externals/libs diff --git a/nnstreamer-api/build.gradle.kts b/nnstreamer-api/build.gradle.kts index bc4a9c6..7dc7a0a 100644 --- a/nnstreamer-api/build.gradle.kts +++ b/nnstreamer-api/build.gradle.kts @@ -92,5 +92,20 @@ android { named("preBuild") { dependsOn("genNnsSrc") } + + build { + doLast{ + copy { + val srcAarPath = project.projectDir.toPath().resolve("build/outputs/aar") + val outAarPath = externalDirPath.resolve("libs").apply { + createDirectories() + } + + from(srcAarPath) + include("*-debug.aar") + into(outAarPath) + } + } + } } }