Gradle plugin for instrumenting your project's model classes for the ActiveJDBC ORM framework.
Add the plugin in addition to Java plugin to the build.gradle file as follows:
plugins {
id 'java'
id 'de.schablinski.activejdbc-gradle-plugin' version '1.2'
}
This will create a task instrumentJavaModels
in the task group build
which is added as doLast
action to the compileJava
task.
The version of the ActiveJDBC instrumentation tool can be configured as follows:
activejdbc.toolVersion = 2.2
The default version is 2.3.
To instrument ActiveJDBC model classes written in Scala, configure the plugin as shown in the build script below (Gradle >= 4.0):
plugins {
id 'scala'
id 'de.schablinski.activejdbc-gradle-plugin'
}
dependencies {
compile 'org.scala-lang:scala-library:2.12.6'
compile 'org.javalite:activejdbc:2.2'
activejdbc 'org.scala-lang:scala-library:2.12.6'
}
repositories {
jcenter()
}
The Scala library must be added on the classpath of ActiveJDBC instrumentation tool (s. configuration activejdbc), because the model classes have a dependency on the Scala library.
This project started as a hard fork of the gradle-plugin module of ActiveJDBC to make it available on Gradle's plugin portal.