Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.WPIRoboticsProjects:opencv-maven:-SNAPSHOT'
}
dependencies {
implementation("com.github.WPIRoboticsProjects:opencv-maven:-SNAPSHOT")
}
<dependency>
<groupId>com.github.WPIRoboticsProjects</groupId>
<artifactId>opencv-maven</artifactId>
<version>-SNAPSHOT</version>
</dependency>
libraryDependencies += "com.github.WPIRoboticsProjects" % "opencv-maven" % "-SNAPSHOT"
:dependencies [[com.github.WPIRoboticsProjects/opencv-maven "-SNAPSHOT"]]
A maven repository for OpenCV artifacts
To use this as a maven repository:
repositories {
maven {
url 'https://github.com/WPIRoboticsProjects/opencv-maven/raw/mvn-repo'
}
}
Binaries are currently only available for OS X and 64-bit linux. 32-bit linux and 32/64 bit Windows are planned for support as well. The Java library and C++ headers are OS-independent and may be used on any operating system.
Platform-specific artifacts have the platform in the artifact ID. For example, native libraries for 32-bit windows are specified by
opencv-natives-windows-x86
Platform formats:
| OS | Architecture | Platform | |---|---|---| | Windows | x86 | windows-x86 | | Windows | x86_64 | windows-x86_64 | | Mac OS X | x86_64 | osx-x86_64 | | linux | x86 | linux-x86 | | linux | x86_64 | linux-x86_64 | | linux | arm | linux-arm | | linux | armhf | linux-armhf |
Available packages are:
| Name | Description | |---|---| | opencv-java | Java library. Does not include JNI | | opencv-jni | JNI bindings | | opencv-headers | C++ headers | | opencv-natives | Compiled native binaries |
Currently, only OpenCV 3.1.0 is available