mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 23:03:03 +04:00
Enable Android AAR package build with SDK project itself without Python
- Added JavaDoc package build and publishing - Added Source package build and publishing - More metadata for publishing - Disable native samples build with aar, because prefab is not complete yet
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
//
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven-publish'
|
||||
@KOTLIN_PLUGIN_DECLARATION@
|
||||
|
||||
def openCVersionName = "@OPENCV_VERSION@"
|
||||
@@ -137,6 +138,17 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
aidl true
|
||||
prefabPublishing true
|
||||
buildConfig true
|
||||
}
|
||||
prefab {
|
||||
opencv_jni_shared {
|
||||
headers "native/jni/include"
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
jniLibs.srcDirs = ['native/libs']
|
||||
@@ -147,6 +159,13 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
singleVariant('release') {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path (project.projectDir.toString() + '/libcxx_helper/CMakeLists.txt')
|
||||
@@ -154,5 +173,25 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
release(MavenPublication) {
|
||||
groupId = 'org.opencv'
|
||||
artifactId = 'opencv'
|
||||
version = '@OPENCV_VERSION_PLAIN@'
|
||||
|
||||
afterEvaluate {
|
||||
from components.release
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
name = 'myrepo'
|
||||
url = "${project.buildDir}/repo"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(opencv_jni_shared)
|
||||
|
||||
# dummy target to bring libc++_shared.so into packages
|
||||
add_library(opencv_jni_shared STATIC dummy.cpp)
|
||||
|
||||
Reference in New Issue
Block a user