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.eclipsesource:j2v8:'
}
dependencies {
implementation("com.github.eclipsesource:j2v8:")
}
<dependency>
<groupId>com.github.eclipsesource</groupId>
<artifactId>j2v8</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.eclipsesource" % "j2v8" % ""
:dependencies [[com.github.eclipsesource/j2v8 ""]]
J2V8 is a set of Java bindings for V8. J2V8 focuses on performance and tight integration with V8. It also takes a 'primitive first' approach, meaning that if a value can be accessed as a primitive, then it should be. This forces a more static type system between the JS and Java code, but it also improves the performance since intermediate Objects are not created.
We developed J2V8 as a high performance engine for our multi-platform mobile toolkit tabris.js and it is a great choice for executing JavaScript on Android devices.
Building J2V8 requires building both the native parts and the Java library (.jar/.aar file). To build the native parts we first build V8 as a monolithic library and then statically link J2V8 to that. The Java parts are built with maven/gradle.
J2V8 uses a cross-platform, cross-compiling build-system written in Python.
For any further build instructions & details please read BUILDING.md
Here is a list of articles I've written on J2V8 http://eclipsesource.com/blogs/tag/j2v8/.
Here are some projects that use J2V8:
The code is published under the terms of the Eclipse Public License, version 1.0.