Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NativeApp/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ target_link_libraries(${TARGET}
${FBJNI_LIBRARY}
${OPENCV_LIBRARY}
log)

file(COPY ${OPENCV_LIB_DIR} DESTINATION ${CMAKE_SOURCE_DIR}/src/main/jniLibs/)
29 changes: 11 additions & 18 deletions NativeApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ android {
targetSdkVersion 28
versionCode 1
versionName "1.0"
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared"
}
}
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared"
}
}
}
buildTypes {
release {
Expand All @@ -49,22 +49,15 @@ dependencies {
extractForNativeBuild 'org.pytorch:pytorch_android:1.6.0-SNAPSHOT'
}

task extractAARForNativeBuild {
doLast {
configurations.extractForNativeBuild.files.each {
def file = it.absoluteFile
afterEvaluate {
configurations.extractForNativeBuild.files.each {
def zipPath = it.absoluteFile
if (!file("$buildDir/$zipPath.name").exists())
copy {
from zipTree(file)
into "$buildDir/$file.name"
from zipTree(zipPath)
into "$buildDir/$zipPath.name"
include "headers/**"
include "jni/**"
}
}
}
}

tasks.whenTaskAdded { task ->
if (task.name.contains('externalNativeBuild')) {
task.dependsOn(extractAARForNativeBuild)
}
}
Binary file added NativeApp/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions NativeApp/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Tue Oct 01 13:22:43 PDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
172 changes: 172 additions & 0 deletions NativeApp/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions NativeApp/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.