Java Connector Using Gradle
Prerequisites
Create Gradle Project
gradle init --type java-libraryGet MariaDB Java Driver
// Apply the Java-library plugin to add support for Java Library
apply plugin: 'java-library'
// In this section, you declare where to find the dependencies of your project
repositories.
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
// This dependency is exported to consumers, that is to say, found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their compile classpath.
implementation 'com.google.guava:guava:22.0'
// Use JUnit test framework
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
implementation 'org.mariadb.jdbc:mariadb-java-client:3.4.1'
}Connection
See Also
Last updated
Was this helpful?

