1plugins { 2 id 'com.android.library' 3} 4 5android { 6 compileSdk {{PLATFORM_SDK_VERSION}} 7 externalNativeBuild { 8 cmake { 9 path file('src/CMakeLists.txt') 10 version '3.18.1' 11 } 12 } 13 defaultConfig { 14 targetSdk {{PLATFORM_SDK_VERSION}} 15 minSdk 29 16 } 17} 18 19ext.copyArtifact = { arch, suffix, outputDir -> 20 tasks.register("copy${arch}", Copy) { 21 dependsOn 'externalNativeBuildDebug' 22 from layout.buildDirectory.file("intermediates/cmake/debug/obj/${arch}/nativepoc") 23 rename ('nativepoc', "${project.name.replaceFirst(/-native/, '')}${suffix}") 24 into layout.buildDirectory.dir(outputDir) 25 } 26} 27 28copyArtifact('armeabi-v7a', '_sts32', 'testcases_arm') 29copyArtifact('arm64-v8a', '_sts64', 'testcases_arm') 30copyArtifact('x86', '_sts32', 'testcases_x86') 31copyArtifact('x86_64', '_sts64', 'testcases_x86') 32 33