File tree Expand file tree Collapse file tree 5 files changed +451
-633
lines changed
Expand file tree Collapse file tree 5 files changed +451
-633
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,28 @@ get_android_jar_path(CMAKE_JAVA_INCLUDE_PATH ANDROID_SDK_ROOT ANDROID_PLATFORM)
4141set (OLP_SDK_NETWORK_VERSION 0.0.1)
4242set (OLP_SDK_ANDROID_HTTP_CLIENT_JAR OlpHttpClient)
4343
44+ set (MAVEN_DEPS_OUTPUT ${CMAKE_BINARY_DIR} /maven-deps)
45+ set (ALL_MAVEN_PACKAGES
46+ ${MAVEN_DEPS_OUTPUT} /okhttp-4.12.0.jar
47+ ${MAVEN_DEPS_OUTPUT} /okio-3.10.2.jar
48+ )
49+
50+ add_custom_command (
51+ OUTPUT ${ALL_MAVEN_PACKAGES}
52+ COMMAND mvn -f ${CMAKE_CURRENT_LIST_DIR} /pom.xml dependency:copy-dependencies -DoutputDirectory=${MAVEN_DEPS_OUTPUT}
53+ COMMENT "Downloading Maven packages"
54+ )
55+
56+ add_custom_target (olp-cpp-sdk-core.maven DEPENDS ${ALL_MAVEN_PACKAGES} )
57+
4458add_jar(${OLP_SDK_ANDROID_HTTP_CLIENT_JAR}
45- SOURCES ${CMAKE_CURRENT_LIST_DIR} /../src/http/android/HttpClient .java
59+ SOURCES ${CMAKE_CURRENT_LIST_DIR} /../src/http/android/OlpHttpClient .java
4660 VERSION ${OLP_SDK_NETWORK_VERSION}
61+ INCLUDE_JARS ${ALL_MAVEN_PACKAGES}
4762)
4863
64+ add_dependencies (${OLP_SDK_ANDROID_HTTP_CLIENT_JAR} olp-cpp-sdk-core.maven)
65+
4966# add_jar() doesn't add the symlink to the version automatically under Windows
5067if (WIN32 )
5168 include (SymlinkHelpers)
Original file line number Diff line number Diff line change 1+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
3+ <modelVersion >4.0.0</modelVersion >
4+ <groupId >com.here.olp</groupId >
5+ <artifactId >download-jars</artifactId >
6+ <version >1.0-SNAPSHOT</version >
7+ <dependencies >
8+ <dependency >
9+ <groupId >com.squareup.okhttp3</groupId >
10+ <artifactId >okhttp</artifactId >
11+ <version >4.12.0</version >
12+ </dependency >
13+ <dependency >
14+ <groupId >com.squareup.okio</groupId >
15+ <artifactId >okio</artifactId >
16+ <version >3.10.2</version >
17+ </dependency >
18+ </dependencies >
19+ </project >
You can’t perform that action at this time.
0 commit comments