Skip to content
/ withDb Public

Gradle Plugin to add runtime dependencies for your favorite database

License

Notifications You must be signed in to change notification settings

rkennel/withDb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

withDb

Gradle Plugin to add runtime dependencies for your favorite database

Scenario

Often times the database that you use in production is not the same database that you use on your desktop due to the hassle of running a production representative database locally. Many developers fix this problem by just including both jdbc drivers in the gradle dependency. This is (somewhat) wasteful and could also lead to driver conflicts.

Solution

The WithDB plugin allows for the engineer to insert the gradle runtime dependency dynamically using your favorite gradle dependencies.

Using the Plugin

In your build.gradle file, make sure to include this Plugin

build.gradle

plugins { id 'java' id 'rkennel.withdb' version '1.0.0' }

Then just add your favorite db to your gradle script. For example, to use MySQL. ./gradlew bootRun withMySql

Note: order of gradle tasks does not matter.

Supported DBs

  • H2 - withH2
  • MySQL - withMySql
  • Postgresql - withPostgres
  • Micrsoft SQL Server - withMsSql
  • SQLite - withSqlite
  • MongoDB - withMongo
  • MariaDB - withMaria
  • Oracle - withOracle
  • DB2 -withDb2
  • Google Cloud SQL (MySQL) - withGoogleMySql
  • Google Cloud SQL (Postgres) - withGooglePostgres
  • Google Spanner - withGoogleSpanner
  • Google BigQuery - withGoogleBigQuery

About

Gradle Plugin to add runtime dependencies for your favorite database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages