Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
5c05b7bc
Commit
5c05b7bc
authored
5 years ago
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14749 from alalek:fix_android_javadoc
parents
08019732
c6deba60
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
8 deletions
+39
-8
CMakeLists.txt
modules/java/jar/CMakeLists.txt
+2
-0
build.xml.in
modules/java/jar/build.xml.in
+5
-3
build_sdk.py
platforms/android/build_sdk.py
+32
-5
No files found.
modules/java/jar/CMakeLists.txt
View file @
5c05b7bc
...
...
@@ -25,6 +25,8 @@ if(OPENCV_JAVA_TARGET_VERSION)
set
(
OPENCV_ANT_JAVAC_EXTRA_ATTRS
"
${
OPENCV_ANT_JAVAC_EXTRA_ATTRS
}
target=
\"
${
OPENCV_JAVA_TARGET_VERSION
}
\"
"
)
endif
()
set
(
OPENCV_JAVADOC_DESTINATION
"
${
OpenCV_BINARY_DIR
}
/doc/doxygen/html/javadoc"
CACHE STRING
""
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/build.xml.in"
"
${
OPENCV_JAVA_DIR
}
/build.xml"
@ONLY
)
list
(
APPEND depends
"
${
OPENCV_JAVA_DIR
}
/build.xml"
)
...
...
This diff is collapsed.
Click to expand it.
modules/java/jar/build.xml.in
View file @
5c05b7bc
...
...
@@ -30,12 +30,13 @@
<target name="javadoc">
<copy file="@OpenCV_SOURCE_DIR@/doc/mymath.js"
todir="@O
penCV_BINARY_DIR@/doc/doxygen/html/javadoc
" />
todir="@O
PENCV_JAVADOC_DESTINATION@
" />
<!-- synchronize with platforms\android\build_sdk.py -->
<javadoc
packagenames="org.opencv.*"
sourcepath="java"
destdir="@O
penCV_BINARY_DIR@/doc/doxygen/html/javadoc
"
destdir="@O
PENCV_JAVADOC_DESTINATION@
"
Windowtitle="OpenCV @OPENCV_VERSION_PLAIN@ Java documentation"
Doctitle="OpenCV Java documentation (@OPENCV_VERSION@)"
bottom="Generated on ${timestamp} / OpenCV @OPENCV_VCSVERSION@"
...
...
@@ -48,7 +49,8 @@
<![CDATA[
<script>
var url = window.location.href;
url = url.substring(0, url.lastIndexOf('/', url.indexOf('.html'))) + '/../../../mymath.js';
var pos = url.lastIndexOf('/javadoc/');
url = pos >= 0 ? (url.substring(0, pos) + '/javadoc/mymath.js') : (window.location.origin + '/mymath.js');
var script = document.createElement('script');
script.src = '@OPENCV_MATHJAX_RELPATH@/MathJax.js?config=TeX-AMS-MML_HTMLorMML,' + url;
document.getElementsByTagName('head')[0].appendChild(script);
...
...
This diff is collapsed.
Click to expand it.
platforms/android/build_sdk.py
View file @
5c05b7bc
#!/usr/bin/env python
import
os
,
sys
,
subprocess
,
argparse
,
shutil
,
glob
,
re
import
os
,
sys
import
argparse
import
glob
import
re
import
shutil
import
subprocess
import
time
import
logging
as
log
import
xml.etree.ElementTree
as
ET
...
...
@@ -285,14 +292,34 @@ class Builder:
for
f
in
files
:
if
f
==
"android.jar"
or
f
==
"annotations.jar"
:
classpaths
.
append
(
os
.
path
.
join
(
dir
,
f
))
srcdir
=
os
.
path
.
join
(
self
.
resultdest
,
'sdk'
,
'java'
,
'src'
)
dstdir
=
self
.
docdest
# synchronize with modules/java/jar/build.xml.in
shutil
.
copy2
(
os
.
path
.
join
(
SCRIPT_DIR
,
'../../doc/mymath.js'
),
dstdir
)
cmd
=
[
"javadoc"
,
"-header"
,
"OpenCV
%
s"
%
self
.
opencv_version
,
'-windowtitle'
,
'OpenCV
%
s Java documentation'
%
self
.
opencv_version
,
'-doctitle'
,
'OpenCV Java documentation (
%
s)'
%
self
.
opencv_version
,
"-nodeprecated"
,
"-footer"
,
'<a href="http://docs.opencv.org">OpenCV
%
s Documentation</a>'
%
self
.
opencv_version
,
"-public"
,
'-sourcepath'
,
os
.
path
.
join
(
self
.
resultdest
,
'sdk'
,
'java'
,
'src'
),
"-d"
,
self
.
docdest
,
'-sourcepath'
,
srcdir
,
'-encoding'
,
'UTF-8'
,
'-charset'
,
'UTF-8'
,
'-docencoding'
,
'UTF-8'
,
'--allow-script-in-comments'
,
'-header'
,
'''
<script>
var url = window.location.href;
var pos = url.lastIndexOf('/javadoc/');
url = pos >= 0 ? (url.substring(0, pos) + '/javadoc/mymath.js') : (window.location.origin + '/mymath.js');
var script = document.createElement('script');
script.src = '
%
s/MathJax.js?config=TeX-AMS-MML_HTMLorMML,' + url;
document.getElementsByTagName('head')[0].appendChild(script);
</script>
'''
%
'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0'
,
'-bottom'
,
'Generated on
%
s / OpenCV
%
s'
%
(
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
),
self
.
opencv_version
),
"-d"
,
dstdir
,
"-classpath"
,
":"
.
join
(
classpaths
),
'-subpackages'
,
'org.opencv'
,
]
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment